Make subrepo definitions compatible with "file based" and http cloning
Didly Bom
didlybom at gmail.com
Tue Jun 1 09:26:52 UTC 2010
Hi,
Are relative paths supported to define subrepositories in the .hgsub file
when you do a direct "file" clone (by file clone I mean a non http or ssh
clone)?
I have a "project" repository that contains several subrepositories. These
repositories are currently declared on the .hgsub file as follows:
TX_MODULE = \\remote_server\Mercurial\COMPONENTS\TX_MODULE
COMMON = \\remote_server\Mercurial\COMMON
RX_MODULE = \\remote_server\Mercurial\COMPONENTS\RX_MODULE
Note that these are not exactly the names that we use. I simplified them a
little for the sake of clarity.
This works really well in our current setup in which we do not use a web
server. Instead we clone directly from the remote shared drive.
I'd like to prepare our setup so that in the future we can easily move into
a web server based setup. To do so I'd like to modify the .hgsub file so
that it can work both with our current "shared drive" based setup and with a
web server approach.
My first idea was to make the subrepository definitions relative. This would
have the added advantage that if we ever moved to a different server or if
we moved the root of our repository folder somewhere other than
"\\remote_server\Mercurial" but we kept the same relative folder
distribution everything should keep working.
So I modified our .hgsub file as follows:
TX_MODULE = ../../COMPONENTS/TX_MODULE
COMMON = ../../../COMMON
RX_MODULE = ../../COMPONENTS/RX_MODULE
This takes into account that my "project" repository is in
"\\remote_server\Mercurial\PROJECTS\MAIN_PROJECT" (hence the "../.." to
access the COMPONENTS folder and the "../../.." to access the COMMON
repository).
When I do this, I can clone using the web interface. That is, if I clone
from "http://remote_server:8000/PROJECTS/MAIN_PROJECT/" everything works
fine.
However, if I now try to clone directly from the remote shared drive, this
does not work. I get the following error message:
updating to branch default
resolving manifests
getting .hgignore
getting .hgsub
getting .hgsubstate
pulling subrepo RX_MODULE from COMPONENTS/RX_MODULE
repository COMPONENTS/RX_MODULE not found
[command interrupted]
So it seems that when using the "file" interface the relative paths on the
.hgsub do not work. Is this normal? Am I doing something wrong? Is there a
better solution?
Thank you in advance,
Didly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20100601/abfe5ef6/attachment.html>
More information about the Mercurial
mailing list