[PATCH 0 of 6] light-weight copy queue
Sune Foldager
cryo at cyanite.org
Mon Feb 7 04:25:48 CST 2011
On 03-02-2011 09:25, Martin Geisler wrote:
> Gilles Moris<gilles.moris at free.fr> writes:
>> I tried to the queue and the few tests I made worked well.
>>
>> First initialize with a non-lwcopy repo:
>> $ hg init lwtest1
>> $ cd lwtest1
>> $ hg add big1
>> $ hg ci -m init
>> $ ls -s .hg/store/data
>> 11448 big1.d 4 big1.i
>> $ hg mv big1 big2
>> $ hg ci -m renamed
>> $ ls -s .hg/store/data
>> 11448 big1.d 4 big1.i 11448 big2.d 4 big2.i
>>
>> Then take my new lwcopy-aware hg weapon:
>> $ cd ..
>> $ hglw clone --pull lwtest1 lwtest2
>> $ cd lwtest2
>> $ ls -s .hg/store/data
>> 11448 big1.d 4 big1.i 4 big2.i
>> Hurray, big2 collasped ! Let's take it a little further...
>> $ hglw mv big2 big3
>> $ hg ci -m "rename of rename"
>> $ ls -s .hg/store/data
>> 11448 big1.d 4 big1.i 4 big2.i 4 big3.i
>> Wow! Still impressive!
>> $ cd ..
>> $ hglw clone --pull lwtest2 lwtest3
>> $ cd lwtest3
>> $ ls -s .hg/store/data
>> 11448 big1.d 4 big1.i 4 big2.i 4 big3.i
>> Worked again.
>
> Excellent! This is super cool and I am especially happy about how
> seemless this works: you just pull with a new version of Mercurial and
> voila! you get a smaller repository. Very smooth!
There are still some dents in the code, but it's looking promising. I'll
see if I can't smooth things a bit out. I am not completely satisfied
with the API hacks, though... but it might be the best we can do :-p.
/Sune
More information about the Mercurial-devel
mailing list