Changing existing subrepo mappings from absolute to relative paths

Mads Kiilerich mads at kiilerich.com
Wed Dec 14 12:03:47 CST 2011


On 12/14/2011 12:48 PM, Angel Ezquerra wrote:
> 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).

Was the new .hgsub committed to the tip of the default branch? 'hg clone 
-u branchname A B' might do the right thing.

Or do you get the expected .hgsub with
hg clone -U A B
hg -R B cat -r default .hgsub
?

/Mads


More information about the Mercurial mailing list