[darcs-devel] Fwd: Re: optimize --relink WILL CORRUPT YOUR
REPOSITORY
Mark Stosberg
mark at summersault.com
Tue Feb 1 07:47:33 PST 2005
FYI.
----- Forwarded message from Juliusz Chroboczek <jch at pps.jussieu.fr> -----
To: Mark Stosberg <mark at summersault.com>
Subject: Re: optimize --relink WILL CORRUPT YOUR REPOSITORY
From: Juliusz Chroboczek <jch at pps.jussieu.fr>
Date: Tue, 01 Feb 2005 07:50:34 +0100
User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux)
> By chance, would you have a test case we can add to the test suite to
> check for this in the future?
Sure. Try something like (untested):
$ mkdir a1
$ cd a1
$ darcs initialize
$ echo '2' > a
$ darcs add a
$ darcs record -m 'Initial import.'
$ cd ..
$ darcs get a1 a2
$ cd a1
$ (echo '1'; echo '2') > a
$ darcs record -m 'A1'
$ cd ../a2
$ (echo '2'; echo '3') > a
$ darcs record -m 'A2'
$ darcs optimize --uncompress
$ cd ../a1
$ darcs pull --all ../a2
$ darcs optimize --uncompress
$ darcs optimize --relink --sibling ../a2
The trick is that the patch a2 is present in both repos, is not
identical (it's been commuted w.r.t. a1), and the two patch files have
the same size.
Juliusz
----- End forwarded message -----
--
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Mark Stosberg Principal Developer
mark at summersault.com Summersault, LLC
765-939-9301 ext 202 database driven websites
. . . . . http://www.summersault.com/ . . . . . . . .
More information about the darcs-devel
mailing list