cloning subrepos doesnt set default in hgrc

Johannes Totz jtotz at imperial.ac.uk
Fri Feb 5 16:23:47 CST 2010


Saint Germain wrote:

>
> On Fri, 5 Feb 2010 20:46:28 +0000 (UTC), Johannes Totz
> <jtotz at imperial.ac.uk> wrote :
>
>> Johannes Totz wrote:
>> 
>> > Matt Mackall wrote:
>> >
>> >> On Thu, 2009-12-10 at 20:37 +0000, Johannes Totz wrote:
>> >>> Hi!
>> >>> 
>> >>> Cloning a repo that has subrepos does not set the default path
>> >>> inside the subrepo's hgrc.
>> >>> It would be nice if it did though! E.g. set its value to what is
>> >>> specified in .hgsub as its URL.
>> >>> 
>> >>> Is there any reason why this might be a bad idea?
>> >>
>> >> Nope. Try this:
>> >>
[snip]
>> 
>> That particular feature of 1.4.2 doesn't work for me though. A
>> default-path entry is added in the subrepo's hgrc but it's empty. I've
>> tried various combinations of relative and absolute paths in .hgsub
>> but that didn't change anything...
>> 
[snip]
> However instead of putting the default path to the URL present
> in master repository .hgsub, it seems for me more logic to put the path
> to the subrepos of the master directory from which it has been cloned.

What I was hoping for is that if .hgsub has absolute URLs then these
should end up in the subrepos default path. If .hgsub has relative paths
then the default path in the subrepo should be a combination of the path
to the master repo + relative path in .hgsub (potentially
mangled/normalised).

Does that make sense? I imagine that if the above would work then that
would ease working with the subrepos as I can push/pull for each one
more easily (i.e. master repo is only glue that keeps subrepo in place).
Of course I can add that path by hand but that gets tedious if I have
many clones.



More information about the Mercurial mailing list