darcs

Issue 803 Darcs 2.0 regression on manual renames

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

Created on 2008-04-20.15:32:36 by lele, last changed 2009-08-27.14:09:46 by admin.

Messages
msg4264 (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.
msg4270 (view) Author: kowey Date: 2008-04-21.09:20:40
I'm marking this as a bug, because of this:

         ./a.txt -> ./subdir/a.txt
        R ./a.txt

Whether or not darcs is supposed to recognise (a rm; darcs mv), it does not seem
very sensible for both of these patches to appear...
msg4563 (view) Author: kowey Date: 2008-05-07.16:25:06
Lele: could I ask you to submit a formal test case as a shell script in the
bugs/ directory (i.e. a darcs patch).  You can inspire yourself from the other
tests in that directory
msg4566 (view) Author: lele Date: 2008-05-07.19:32:10
On Wed, 07 May 2008 16:25:07 -0000
Eric Kow <bugs@darcs.net> wrote:

> Lele: could I ask you to submit a formal test case as a shell script
> in the bugs/ directory (i.e. a darcs patch).  You can inspire
> yourself from the other tests in that directory

My time-machine worked right this time, you should probably already
have a bugs/issue803.sh... if not, it's a "darcs pull" away ;-)

ciao, 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.
msg4568 (view) Author: kowey Date: 2008-05-07.19:35:53
Perfect!  Now we just need somebody to fix it.

Assigning to David, who already is aware of this from the mailing list.
History
Date User Action Args
2008-04-20 15:32:37lelecreate
2008-04-20 19:04:22zookolinkissue804 superseder
2008-04-21 09:20:42koweysetpriority: bug
nosy: tommy, beschmi, kowey, lele
status: unread -> unknown
messages: + msg4270
2008-05-07 16:25:07koweysetnosy: + dagit
messages: + msg4563
2008-05-07 16:28:00koweysetstatus: unknown -> waiting-for
nosy: tommy, beschmi, kowey, dagit, lele
assignedto: lele
2008-05-07 19:32:12lelesetnosy: tommy, beschmi, kowey, dagit, lele
messages: + msg4566
2008-05-07 19:35:56koweysetstatus: waiting-for -> unknown
nosy: + droundy
topic: + IncludesExampleOrTest
messages: + msg4568
assignedto: lele -> droundy
2008-05-09 12:03:54droundysetnosy: droundy, tommy, beschmi, kowey, dagit, lele
assignedto: droundy ->
2008-05-09 20:52:37droundysetstatus: unknown -> resolved-in-unstable
nosy: droundy, tommy, beschmi, kowey, dagit, lele
2008-09-04 21:33:16adminsetstatus: resolved-in-unstable -> resolved
nosy: droundy, tommy, beschmi, kowey, dagit, lele
2009-08-06 17:58:30adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, simon, thorkilnaur, - droundy, lele
2009-08-06 21:02:46adminsetnosy: - beschmi
2009-08-10 22:19:45adminsetnosy: + lele, - markstos, darcs-devel, zooko, jast, Serware, mornfall
2009-08-11 00:10:31adminsetnosy: - dagit
2009-08-25 18:08:36adminsetnosy: + darcs-devel, - simon
2009-08-27 14:09:46adminsetnosy: tommy, kowey, darcs-devel, lele, thorkilnaur, dmitry.kurochkin