Mercurial Remote Subrepos
Posted
by Travis G
on Stack Overflow
See other posts from Stack Overflow
or by Travis G
Published on 2010-04-03T06:50:26Z
Indexed on
2010/04/03
6:53 UTC
Read the original article
Hit count: 549
I'm trying to set up my Mercurial repository system to work with multiple subrepos. I've basically followed these instructions to set up the client repo with Mercurial client v1.5 and I'm using HgWebDir to host my multiple projects.
I have an HgWebDir with the following structure:
http://myserver/hg
fooproj
mylib
where mylib
is some collection of common template library to be consumed by fooproj
. The structure of fooproj
looks like this:
fooproj
doc/
src/
.hgignore
.hgsub
.hgsubstate
And .hgsub
looks like:
src/mylib = http://myserver/hg/mylib
This should work, per my interpretation of the documentation:
The first 'nested' is the path in our working dir, and the second is a URL or path to pull from.
So, let's say I pull down fooproj
to my home folder with:
~$ hg clone http://myserver/hg/fooproj foo
Which pulls down the directory structure properly and adds the folder ~/foo/src/mylib
which is a local Mercurial repository. This is where the problems begin: the mylib
folder is empty aside from the items in .hg
. With 2 seconds of investigation, one can see the src/mylib/.hg/hgrc
is:
[paths]
default = http://myserver/hg/fooproj/src/mylib
which is completely wrong (attempting a pull
of that repo will give a 404 because, well, that URL doesn't make any sense). Logically, the default value should be what I specified in .hgsub
or it would get the files from the repository in some way.
None of the Mercurial commands return error codes (aside from a pull
from within src/mylib
), so it clearly believes that it is behaving properly (and just might be), although this does not seem logical at all.
What am I doing wrong?
© Stack Overflow or respective owner