Possible hack for the subrepos on hosts with flat namespaces problem

Matt Mackall mpm at selenic.com
Wed Oct 12 01:38:21 CDT 2011


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.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list