Issue517

Title unrecording checkpoint patch quietly breaks things
Priority bug Status resolved-in-unstable
Superseder Nosy List beschmi, droundy, kowey, markstos, tommy, trentbuck
Assigned To Topics Darcs2, Partial

Created on 2007-08-11.14:30:24 by trentbuck, last changed 2008-01-13.03:01:26 by markstos.

Files
File name Uploaded Type Edit Remove
checkpoint.sh markstos, 2008-01-11.04:28:36 application/x-sh
Messages
msg2460 (view) Author: markstos Date: 2008-01-13.03:01:26
I've just a sent a "checkpoint.sh" test which confirm's David statement that
this issue is fixed when using darcs2 with the darcs-2 format.

I then consider this bug "resolved in unstable"
msg2430 (view) Author: droundy Date: 2008-01-11.15:43:51
This is a real bug (unfixed), but I'll note that I don't believe it affects the
darcs-2 format (which doesn't have checkpointing).  Which (at the moment,
anyhow) makes this lower priority.

David
msg2422 (view) Author: markstos Date: 2008-01-11.04:28:36
trentbuck,

Thanks for the report. With your helpful test sequence, I was able to reproduce
the bug and have confirmed it still exists with the Darcs 2 pre-release. 

It seems like a simple solution would be disallow unrecording checkpoint tags. 

  Patient: Doctor, it hurts when I do this.
  Doctor: Then don't do that!

I'm attaching a test script that a developer can add as a regression test when
they are ready to work on this bug.
msg2046 (view) Author: trentbuck Date: 2007-08-11.14:30:23
[Apologies if this arrives twice; I'm having MUA problems.]

Darcs does not warn users when they attempt to remove a checkpoint
patch, and gives confusing/obtuse errors afterwards.

Below is a minimal transcript demonstrating the problem.  First, the
setup:

    $ mkdir x
    $ darcs init --repodir x
    $ touch x/x
    $ darcs rec -lam x --repodir x
    Finished recording patch 'x'
    $ darcs tag -m y --repodir x
    Finished tagging patch 'TAG y'
    $ touch x/z
    $ darcs rec -lam z --repodir x
    Finished recording patch 'z'
    $ darcs optimize --checkpoint --repodir x
    Checkpointing tag:
    Sat Aug 11 23:52:15 EST 2007  Trent W. Buck <twb@cyber.com.au>
      tagged y
    Done optimizing!
    $ darcs get --partial x p
    Copying patch 2 of 2... done!
    Applying patch 1 of 1... done.
    Finished getting.

Now, note that no warning is given that the patch to be unrecorded is
a checkpoint:

    $ darcs unrec -p TAG --repodir p

    Sat Aug 11 23:52:15 EST 2007  Trent W. Buck <twb@cyber.com.au>
      tagged y
    Shall I unrecord this patch? (1/?)  [ynWvpxqadjkc], or ? for help: y

    Finished unrecording.

Note that having removed the checkpoint patch, darcs gives extremely
unintuitive error messages:

    $ darcs get --partial p
    Directory '/tmp/tmp.MjkngQ6090/p' already exists, creating repository as '/tmp/tmp.MjkngQ6090/p_0'
    Copying patch 2 of 2...darcs: /tmp/tmp.MjkngQ6090/p/_darcs/patches/20070811135200-52177-21c54f2b9e8b5a2c937ce02c46e50f48f58f2906.gz: openBinaryFile: does not exist (No such file or directory)

    $ darcs unrec --repodir p

    Sat Aug 11 23:52:32 EST 2007  Trent W. Buck <twb@cyber.com.au>
      * z
    Shall I unrecord this patch? (1/2)  [ynWvpxqadjk], or ? for help: n

    darcs: Maybe.fromJust: Nothing

Browse related patches: unstable | stable

History
Date User Action Args
2008-01-14 03:55:58markstoslinkissue241 superseder
2008-01-14 03:52:24markstoslinkissue392 superseder
2008-01-13 16:00:33markstoslinkissue299 superseder
2008-01-13 15:52:04markstoslinkissue61 superseder
2008-01-13 15:51:25markstoslinkissue321 superseder
2008-01-13 03:01:27markstossetstatus: chatting -> resolved-in-unstable
messages: + msg2460
2008-01-11 15:43:53droundysetmessages: + msg2430
2008-01-11 04:28:37markstossetstatus: unread -> chatting
nosy: + markstos
topic: + Darcs2
messages: + msg2422
files: + checkpoint.sh
2007-08-14 20:54:29koweysettopic: + Partial
2007-08-11 14:30:25trentbuckcreate