Undo a commit?

Martin Geisler mg at lazybytes.net
Tue Jul 14 17:38:49 CDT 2009


"rupert.thurner" <rupert.thurner at gmail.com> writes:

> is strip the same as rollback? and if yes why it has a different name?

They overlap a bit, but are really quite different:

* 'hg rollback' will remove the last transaction. Transactions are a
  concept often found in databases. In Mercurial we start a transaction
  when certain operations are run, such as commit, push, pull...

  When the operation finishes succesfully, the transaction is marked as
  complete. If an error occurs, the transaction is "rolled back" and the
  repository is left in the same state as before.

  You can manually trigger a rollback with 'hg rollback'. This will undo
  the last transactional command. If a pull command brought 10 new
  changesets into the repository on different branches, then 'hg
  rollback' will remove them all.

  Please not: there is *no backup* when you rollback a transaction!

* 'hg strip' will remove a changeset and all its descendants. The
  changesets are saved as a bundle, which you can apply again if you
  need them back.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20090715/ddd0e91d/attachment.pgp 


More information about the Mercurial mailing list