Changing existing subrepo mappings from absolute to relative paths
Angel Ezquerra
angel.ezquerra at gmail.com
Thu Dec 15 13:19:32 UTC 2011
On Wed, Dec 14, 2011 at 7:03 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
> 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.
Mads,
thank you for your reply. I did not commit the new .hgsub to the tip
of the default branch. The developers working on that particular repo
"abandonned" the default branch a while ago, and kept working on
another branch called "UNIVERSAL" and that is where I changed the
.hgsub file.
I did a dummy merge with the default branch (since de tip of default
was an ancestor of the UNIVERSAL branch) and tried again and now the
clone uses the new .hgsub mappings!
I was not aware of the rule that subrepo mappings are always taken
from the tip of the default branch. Is that the case?
Thanks,
Angel
More information about the Mercurial
mailing list