[darcs-devel] [darcs #483] darcs revert should not remove the file
Lele Gaifax via RT
bugs at darcs.net
Tue Aug 2 12:30:16 PDT 2005
Tue Aug 02 15:30:12 2005: New ticket: 483.
Transaction: Ticket created by lele at nautilus.homeip.net
Queue: Darcs
Subject: darcs revert should not remove the file
Owner: Nobody
Requestors: lele at nautilus.homeip.net
Status: new
Ticket <URL: http://bugs.darcs.net/.//Ticket/Display.html?id=483 >
The following is an excerpt from the #darcs IRC channel about a
dangerous case for the revert command. Thankfully, IIRC at the time I
used it to undo an unwanted add, I was just starting with darcs on a
copy extracted from another VC.
<wilx> Hmm, I have added wrong file but I haven't recorded the changes
yet. Can I unadd it?
<wilx> Will doing darcs remove fix it?
<lelix> IIRC, I used revert for that
<arete> looks like darcs remove is what you want
<arete> revert seems to delete the file =)
<lelix> ugh, yes, tried and effectively that removes the file!
smells like a bug for revert to me, why should it remove the
file?
<zooko> I agree that revert of an add oughtn't delete the file.
(a) I don't think that's what it means. The "add" wasn't the
creation of the file, it was the registration of the file
into darcs.
(b) it could be catastrophic.
As a user, if I write The Great American Novel, then run darcs
add mynovel, then change my mind and decide I don't want to
add it right now and run darcs revert, I expect things to go
back to how they were before I ran "darcs add".
The only thing which should delete a file when you "darcs
revert" it is "darcs createfile foo". Which doesn't exist.
Likewise, if I pull a patch from someone which adds the great
american novel, and then I obliterate the patch, I expect
things to go back to how they were before I pulled.
<Igloo> There should definitely be a way of inverting what darcs add
does
thank you,
bye, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
email: lele at seldati.it | -- Fortunato Depero, 1929.
More information about the darcs-devel
mailing list