Changing existing subrepo mappings from absolute to relative paths
Angel Ezquerra
angel.ezquerra at gmail.com
Wed Dec 14 11:48:08 UTC 2011
Hi,
I am in the process of changing the subrepo mappings used in one of
our projects from using absolute paths into using relative paths.
The original .hgsub file looked as follows:
HSPA_MODULES/COMMON = \\mercurial\Mercurial\HSPA\FPGA\COMMON
Note that the actual .hgsub file has more than one subrepo mapping,
but I've only left one in the example to make this discussion simpler.
I started by chaning the .hgsub file into:
HSPA_MODULES/COMMON = HSPA_MODULES/COMMON
After committing the change on a local clone (let's call it A), I
tried to create a new local clone (let's call it B). I was hoping that
mercurial would clone the subrepo from the local clone A. Instead I go
the message: "cloning subrepo HSPA_MODULES/COMMON from
\\mercurial\Mercurial\HSPA\FPGA\COMMON".
I was kind of expecting this to happen since the old revisions refer
to \\mercurial\Mercurial\HSPA\FPGA\COMMON. Nevertheless it would have
made more sense (IMHO) for mercurial to get the subrepo sources from
the most recent version of the .hgsub file (or at least try those
first).
My next attempt was to create an .hg/supaths file with the following contents:
[subpaths]
\\mercurial\Mercurial\HSPA\FPGA\COMMON = HSPA_MODULES/COMMON
I was expecting mercurial to convert all references to
"\\mercurial\Mercurial\HSPA\FPGA\COMMON" into references to
"HSPA_MODULES/COMMON". However, when I tried to clone again I got the
exact same message.
So I am a bit confused at this point. Is there something I'm doing
wrong? Is there some way to create a clone without having to get the
subrepos from the original absolute address?
Note that this is related to the recent discussion on mercurial-devel
regarding changing the subrepo mappings to be "fallbacks" rather than
primary sources. If the subrepo mappings were fallbacks this would
have worked from the start.
Angel
More information about the Mercurial
mailing list