[PATCH 0 of 2] Fixes to subrepo relative paths
Edouard Gomez
ed.gomez at free.fr
Wed Mar 10 08:25:52 CST 2010
I'm trying to use subrepos for modular projects of mine. The
repo layout is:
/
/main
/sub
It is both exposed as local collection of repos (access through file layer)
and through http thanks to webdir on a distant server. Pushing to distant
server is ssh based.
My goal was to have "main" use "sub" as follows:
main/
main/sub
Using a .hgsub looking like:
sub = ../sub
When using local only access (file), everything was working fine.
But when i complicated the test case using push through ssh to distant
server and pull from http webdir serving, subrepo code failed.
The first patch addresses the push problem, a wrong config setting
was used it used. paths.default was used instead of paths.default-push
because the push argument of a recrusive absource call was missing.
The second patch makes sure subrepo code doesn't try to pull from
protocol://xxxxx/main/../sub URLs. webdir doesn't handle that, making
relative subrepositories unpullable. The path component of an URL
obeys to POSIX path interpretation in mercurial cases (ssh, and
http). So I fixed the problem by normalizing the path component.
Please apply to crew, and probably to stable.
More information about the Mercurial-devel
mailing list