A case for subrepos with absolute URLs

Angel Ezquerra angel.ezquerra at gmail.com
Tue Dec 13 02:28:38 CST 2011


On Mon, Dec 12, 2011 at 7:12 AM, Arne Babenhauserheide <arne_bab at web.de> wrote:
>
> So maybe a subrepo should always be treated as trivial path, except if that
> path does not provide the required changesets for the substate.
>
> And in that case, we need some fallback-mechanism anyway. And that could be
> the second part of the subrepo definition. It would change the .hgsub definition
> to:
>
> subrepo = <fallback>

I really like this idea of making the path in the .hgsub file a
fallback or a "source of last resort" for subrepos.

If mercurial always tried (or could be configured to always try) to
use the simple relative path first when pulling subrepos, and only
tried to pull from the path configured in the .hgsub path if that
failed, then many of the issues with using absolute paths would simply
go away. They would go away because mercurial would always use
relative paths by default, and it would only use absolute paths in
those cases where it makes sense.

For example, if this was done, creating local clones of repos using
subrepos with absolute paths would be much faster and not require
network access in most cases.

Matt, would you accept any patches that went in this direction?

Angel


More information about the Mercurial-devel mailing list