[darcs-devel] [issue803] Darcs 2.0 regression on manual renames
Lele Gaifax
bugs at darcs.net
Sun Apr 20 15:32:37 UTC 2008
New submission from Lele Gaifax <lele at nautilus.homeip.net>:
Hi all,
I was able to isolate what seems a darcs 2.0 regression in handling
manually moved files.
Darcs 1.0 handled the following "in the right way":
$ mv a.txt subdir/
$ darcs mv a.txt subdir/a.txt
$ darcs record
resulting in a changeset like the following:
Sun Apr 20 17:08:15 CEST 2008 lele at metapensiero.it
* Third patch
./a.txt -> ./subdir/a.txt
Doing the same with darcs 2.0 I obtain the following instead:
Sun Apr 20 17:00:53 CEST 2008 lele at nautilus.homeip.net
* Third patch
./a.txt -> ./subdir/a.txt
R ./a.txt
Darcs 2.0 behaves correctly if I rename the file using darcs itself,
that is if I simply do
$ darcs mv a.txt subdir/a.txt
$ darcs record
*without* manually moving it first, resulting in the following
changeset:
Sun Apr 20 17:12:09 CEST 2008 lele at nautilus.homeip.net
* three
./a.txt -> ./subdir/a.txt
To sum up:
$ mkdir test
$ cd test
$ darcs init
$ touch a.txt
$ darcs add a.txt
$ darcs record -a -m "First"
$ mkdir subdir
$ darcs add subdir
$ darcs record -a -m "Second"
$ mv a.txt subdir/
$ darcs mv a.txt subdir/a.txt
$ darcs record -a -m "Third"
works ok with darcs 1.0, but under darcs 2.0 produces a changeset
where "a.txt" is both moved to "subdir/a.txt" AND removed.
Instead the following
$ mkdir test
$ cd test
$ darcs init
$ touch a.txt
$ darcs add a.txt
$ darcs record -a -m "First"
$ mkdir subdir
$ darcs add subdir
$ darcs record -a -m "Second"
$ darcs mv a.txt subdir/a.txt
$ darcs record -a -m "Third"
works ok producing the "same" changeset under both 1.0 and 2.0.
The "redundant" patch does *not* seem to cause any problem, that is,
both darcs 1.0 and 2.0 handle it without a noise. It was noticed
indirectly, because tools like the darcs plugin for Trac was unable to
understand it. I bet that also tools like tailor could be confused
when migrating this kind of patch to another VCs...
Thank you in advance,
bye, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele at nautilus.homeip.net | -- Fortunato Depero, 1929.
----------
messages: 4264
nosy: beschmi, kowey, lele, tommy
status: unread
title: Darcs 2.0 regression on manual renames
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue803>
__________________________________
More information about the darcs-devel
mailing list