Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8096549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:29:12+00:00 2026-06-05T21:29:12+00:00

There are two project in which I collaborate, they live in different servers, A

  • 0

There are two project in which I collaborate, they live in different servers, A and B.
While A has the hg program in /opt/mercurial/bin/hg, B has it in /usr/local/bin/hg.

When I want to pull/push changes to either remote, I have to manually modify .hgrcfile in order for the option remotecmdto point to the right location of hg.

I would like to know if it is possible to setup different remotecmdpaths for different remotes so that I don’t have to manually change the path of the hgprogram everytime I need to do some remote operation.

I saw this question: Setup platform-dependent hgrc but it seemed to me that there should be a more native (something like a built-in setting) way to do this. So far I haven’t been able to find it, so any help will be welcome 🙂

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T21:29:14+00:00Added an answer on June 5, 2026 at 9:29 pm

    Ideally you just get the hg binary into your $PATH on both servers and you don’t have to think about it anymore. That can be done in the system’s /etc/profile or in your .ssh/enviironment on that remote server. Most people never even need to think about remotecmd.

    If they’re separate projects (or even separate clones locally of the same project) you can set the remotecmd in the .hg/hgrc file within each repository — settings don’t just have to be in your ~/hgrc file.

    Also be aware that --remotecmd is available as a command line option for push and pull, so you could use that and even combine it with something like:

    [alias]
    pusha = push --remotecmd /opt/mercurial/bin/hg
    

    and then you can just do hg pusha

    Really though, just try to get hg into your path like everyone else does.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Hudson to build my project from my Mercurial repository. There are two
I have two build definitions for my project which has two branches. Development and
I need to create project in which there are two databases local and remote.
I have a Django project which has two apps (one created as debug test).
I've have two tables in my project which are User and InvoiceLine. It has
I am working on a project which contains two servers, one is written in
There are two projects: 1) applet project that outputs jar file 2) web app
In my project, there are two view controllers - let's say firstViewController and secondViewController.
In virtually every project I've ever worked on, there will be one or two
I have read a document that they say: In java there two types of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.