[darcs-users] rollback

Tommy Pettersson ptp at lysator.liu.se
Tue Feb 3 20:28:40 UTC 2004


Today I was hacking on a program and suddenly(?!) wanted
to test my change in progress together with some old code
that I discarded in a much earlier patch.  That is, I wanted
the inversion of my old "discard_icons_patch" (temporarily)
applied to my working directory.

I succeeded by using

  darcs rollback
  darcs revert      (hand picking to keep my change in progress)
  darcs unrecord

in that order.  Not very intuitive, I think.

It got me thinking of what is the purpose of the
rollback-command.  So, what is it?  :-)  Like, why is the
rollback applied to _darcs/current.  With the unrecord
command I understand completely, but rollback haunts me.
I started drawing sketches of 'workingdir', 'currentdir',
'patches' and arrows labeled with darcs commands, to get an
overview of the change flow.  If I get it right I think it
would be a nice thing to put on the wiki.

I also noticed that the inverted patch created by rollback
shows up _exactly_ the same as the original patch in the
output from darcs changes.  It has no label INVERSION,
ROLLBACK or such.  It even has the same time and date as the
original patch.  That can't be right.

By writing this e-mail I suddenly got enlightened to why it
can be perfectly natural and intuitive that I have to revert
my working directory to the state of the current directory
after it is extended with an inverting patch, allthough I'm
not totaly convinced.  I still post this e-mail to let it
be known darcs can be hard to understand.  And I still think
darcs changes should reflect the inversive nature of the patch.

By the way, I allways get Emacs for editing log messages
with darcs.  It doesn't help to set any variables.  My system
default is vi, and it works with everything else.  Am I the
only one with this problem?


(I use darcs 0.9.15)


-- Tommy Pettersson <ptp at lysator.liu.se>




More information about the darcs-users mailing list