cloning subrepos doesnt set default in hgrc

Saint Germain saintger at gmail.com
Sat Feb 6 08:01:18 CST 2010



On Fri, 5 Feb 2010 23:37:02 +0100, Saint Germain <saintger at gmail.com>
wrote :
> > >> >>> 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,

Well it seems that we are close to a freeze for next mercurial version.
So I proposed a patch:
http://mercurial.selenic.com/bts/issue2026

Regards,


More information about the Mercurial mailing list