forest: sharing subprojects ( "library"-style) ?

Rafael Villar Burke pachi at rvburke.com
Thu Jan 24 09:43:11 CST 2008


Jesse Glick wrote:
> Gábor Farkas wrote:
>   
>> A-|
>>     --C
>>     --D
>> B-|
>>     --C
>>     --D
>>
>> so i would like to maintain this as forests, but how am i supposed to 
>> "share" the C and D repositories between A and B?
>>     
>
> I don't think this is possible with the Forest extension. There is no 
> configuration for it; it simply autodetects trees physically beneath the 
> root tree. Therefore C and D could be beneath A, or beneath B, but not 
> both at the same time.
>
> You could consider modifying the build scripts for A and B to permit 
> references to C and D from other locations.
>   
A superficial review of the forest.py comments suggest that this is
indeed possible using the fseed command and using a snapshot file
pointing to the subrepos (not rooted inside the forest one). If no
snapshot file is provided the forest is populated using the repos nested
in the forest one, which is what people look to be using currently.

Simon Law already added some TODO items in the forest extension wiki
page that need someone to investigate them and add more information...
The code seems to be quite well documented and with a bit of trying both
Gabor and me could get to understand a bit better some of the parts. I'm
not using that extension myself, but someone who does would do other
users a great favour giving the docs a push.

Regards,

Rafael Villar Burke


More information about the Mercurial mailing list