How to clone default-push URL ?

Benjamin Zores benjamin.zores at alcatel-lucent.fr
Thu May 7 03:41:20 CDT 2009


Hi there,

I was wondering if it exists a way to retrieve a default-push URL when 
doing a repository clone.

Let me sum up the situation:
I have a few development sites (developers on each side), each of them 
having a "centralized" set of Mercurial repositories.
One site is master (with R/W capabilities) and others are mirrors (R/O) 
of the master.

This way, developers can clone/pull from local site server (faster) but 
have to push on master instead.

This is easily doable by doing the following in repository .hgrc:

[paths]
default = http://site2/repo1
default-push = http://site1/repo1

Though, as far as I know, when cloning a repository, only the default 
line is setup and default-push never is,
so all developers have to specify one for eah repo they are cloning 
which is not really expected :-)

My questions then is:
- is it possible when cloning to retrieve other lines from remote .hgrc 
then the default one ?
- if not, is the local .hgrc created from the contents of the remote one 
(and then I can extend Mercurial to add more info) ?
- or, worse case scenario, the local .hgrc default URL is created 
through the one specified in hg clone command line and then I'm mostly 
screwed :-(

Thx for any hints on this issue,

Ben




More information about the Mercurial mailing list