Improvement to how subrepos are found?

Mads Kiilerich mads at kiilerich.com
Tue Jan 4 15:13:03 CST 2011


On 01/04/2011 11:10 AM, Martin Geisler wrote:
> Hi everybody,
>
> My client sent me the suggestion below, and I think it has some
> interesting elements. The proposal is to make the right-hand side of the
> .hgsub file a fallback location instead of being the main location.

I agree that trivial relative subrepo paths should be used in most cases.

One of the main reasons for not always using trivial relative subrepo 
paths might be that hgweb doesn't have good support for serving 
subrepos. Consider for example the url for a subrepo rooted in "file". 
AFAIK the major hosting sites also don't support in situ subrepos at 
all. It would be nice to get to a point where the repo structure wasn't 
limited by unnecessary technical limitations.

The fallback idea doesn't seem appealing. I see Mercurial as the kind of 
tool that do exactly what it is told, always do it the same way, rather 
would fail and ask for new instructions than try to guess.

More important: Changing existing behavior in subtle ways is probably 
not an option - especially considering how hard it is to recover from 
subrepo inconsistencies. I think the noble goal should be reached in 
another way.

I assume that most projects with external dependencies will have a 
work-flow where they prefer to have a local mirror of the repo. Very few 
users should pull new versions from the external repo. It would be an 
error if other users did it unintentionally, so there is no reason to 
make it easy for everybody to do it.

Couldn't most projects just start using simple relative paths in .hgsub 
and manage the external url by using some combination of documentation 
and local configuration of paths and subpaths? What extra tool support 
would be nice to have?

/Mads


More information about the Mercurial-devel mailing list