cloning subrepos doesnt set default in hgrc
Saint Germain
saintger at gmail.com
Fri Feb 5 16:37:02 CST 2010
On Fri, 5 Feb 2010 22:23:47 +0000 (UTC), Johannes Totz
<jtotz at imperial.ac.uk> wrote :
> 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.
>
Hummm even in case of absolute URLs in .hgsub, I think that the logical
behavior would be to have master repo + path to working subrepo
in .hgsub.
Indeed without subrepo, if a standard repo 'main1' is cloned from an
absolute URL and we clone this 'main1' to 'main2', what is inside hgrc
default path ? The path to main1 and to the absolute URL.
What do you think ?
After this discussion I will propose a patch, hopefuly it will be
included in the next version planned on 2009/03/01 !
Regards,
More information about the Mercurial
mailing list