darcs

Issue 804 Darcs 2.0 regression on manual renames

Title Darcs 2.0 regression on manual renames
Priority bug Status duplicate
Milestone Resolved in
Superseder Darcs 2.0 regression on manual renames
View: 803
Nosy List darcs-devel, dmitry.kurochkin, kowey, lele, thorkilnaur, tommy, zooko
Assigned To
Topics

Created on 2008-04-20.15:32:38 by lele, last changed 2009-08-27.13:57:43 by admin.

Messages
msg4265 (view) Author: lele Date: 2008-04-20.15:32:34
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@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@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@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@nautilus.homeip.net |                 -- Fortunato Depero, 1929.
msg4267 (view) Author: zooko Date: 2008-04-20.19:04:20
duplicate of issue804
History
Date User Action Args
2008-04-20 15:32:38lelecreate
2008-04-20 19:04:22zookosetpriority: bug
status: unread -> duplicate
superseder: + Darcs 2.0 regression on manual renames
messages: + msg4267
nosy: + zooko
2009-08-06 21:02:48adminsetnosy: + dmitry.kurochkin, simon, thorkilnaur, - beschmi
2009-08-25 18:10:09adminsetnosy: + darcs-devel, - simon
2009-08-27 13:57:43adminsetnosy: tommy, kowey, darcs-devel, zooko, lele, thorkilnaur, dmitry.kurochkin