Chained cloning of subrepos

Edouard Gomez ed.gomez at free.fr
Tue Jul 20 11:09:50 CDT 2010


Le 20/07/2010 16:28, Mads Kiilerich a écrit :
> Martin Geisler wrote, On 07/20/2010 04:01 PM:
>> ...
>>
>> echo 'lib = ../lib'> app/.hgsub
>>
>> ...
>>
>> The problem is that the .hgsub file in the C/app repository is in some
>> sense lying. It uses a relative path which essentially says "you can
>> find the lib subrepo by looking at ../lib, relative to where you found
>> this repo".
>>
>> ...
>>
>> I think this behavior suggests that relative paths should not be allowed
>> to walk outside the repository. They should infact only be of the form
>>
>> foo/bar = foo/bar
>>
>> with identical left- and right-hand sides. That will ensure that a clone
>> can be used as source of further clones.
>>
>> ...
>
> I can follow you reasoning, but I have (currently) accepted that it is
> like it is.

Hey guys,

I'm the one behind that change in subrepos. At the time, chain 
cloning was better handled but the simple case where one 
exposes all his projects in a single root hgwebdir instance 
made relative paths completly useless because shared projects 
were to be mapped everywhere they were used for subrepos to 
work at that time.

Basically a layout in hgwebdir:
main
sub1
sub2

with main subs being:
main/sub1 -> ../sub1
main/sub2 -> ../sub2

Was impossible.

At that time i thought, maybe wrongly, that in cases lot of 
shared modules were to be deployed, one would probably clone 
locally the hgwebdir layout and clone again from that for 
subrepos to work flawlessly.

There had been a discussion at that time with another subrepo 
user, but there had been no consensus (i think both ways are 
valid use cases). Now Martin thinks it's bug, the same way i 
thought it was bug not to be able to clone correctly subrepos 
from such a basic hgwebdir layout.

Dunno what to propose though...

-- 
Edouard Gomez




More information about the Mercurial-devel mailing list