Possible hack for the subrepos on hosts with flat namespaces problem

Matt Mackall mpm at selenic.com
Wed Oct 12 12:02:54 CDT 2011


On Wed, 2011-10-12 at 18:07 +0200, Angel Ezquerra wrote:
> On Wed, Oct 12, 2011 at 8:38 AM, Matt Mackall <mpm at selenic.com> wrote:
> > Problem:
> >  - subrepo prefer trivial relative paths (foo = foo)
> >   when you clone a clone, it clones the local subrepos
> >  - absolute paths/URLS "work" but not well
> >   clones of clones go back to origin, break when unavailable
> >  - non-trivial relative paths are bad (foo = ../foo)
> >   break clones of clones entirely
> >  - most of the hosting services have flat namespace
> >   only work with absolute or broke-relative paths
> >
> > Fix:
> >  - the magic [subpaths] section now works -inside- .hgsub files
> >  - so we set things up the preferred way
> >  - and then remap the broken bits on the hosting service ourselves
> >
> > -----------
> > foo = foo
> > bar = bar
> >
> > [subpaths]
> > # Our main hg-hosting has a flat namespace,
> > # remap our subprojects to real URLs
> > http://hg-hosting.com/alice/project/foo = http://hg-hosting.com/bob/foo-lib
> > # and the bar library lives elsewhere
> > http://hg-hosting.com/alice/project/bar = http://free-hg.org/carl/bar
> >
> > -----------
> >
> > I've done a bit of testing with local absolute paths and it seems to
> > work nicely. This depends on Martin's recent patch that remaps the final
> > path so it'll only work in the default branch.
> 
> I am not sure I really understand how will this work. Does this mean
> that the relative path will be used, except when the source of the
> parent repo is http://hg-hosting.com/alice/project?

Yes.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list