darcs

Message2046

Author twb
Recipients beschmi, droundy, kowey, tommy, twb
Date 2007-08-11.14:30:23
Issue Issue517 unrecording checkpoint patch quietly breaks things
Content
[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
History
Date User Action Args
2007-08-11 14:30:25trentbuckcreate
2007-08-11 14:30:25trentbucklinkissue517 messages
2007-08-11 14:30:25trentbucksetrecipients: + trentbuck, kowey, beschmi, droundy, tommy
2008-09-25 06:25:20adminsetauthor: trentbuck -> twb
2008-09-25 06:25:22adminsetrecipients: + twb, - trentbuck