Undoing a commit in my personal repository

Matt Mackall mpm at selenic.com
Thu Apr 22 16:12:47 CDT 2010


On Thu, 2010-04-22 at 16:55 -0400, Greg Ward wrote:
> On Thu, Apr 22, 2010 at 3:27 PM, Dave Brosius <dbrosius at mebigfatguy.com> wrote:
> > Similar to this line of questions, i don't understand why rollback is only
> > one level. why can't I rollback all the way to an empty repo if i like?
> > what is special about the tip that can rollback, but not others?

What is special is that it's the last transaction and can be done
basically for free with what we already have to do to manage aborting
that transaction. Also note that one level of rollback doesn't lose any
data beyond your commit message, as the committed data is generally
either still in your working directory or the server you pulled from,
while multiple rollback can lose intermediate changes.

> Probably because no one has bothered to implement multi-level
> rollback.  From my understanding, it would be a non-trivial project,
> but certainly not impossible.

Probably because I categorically stated about 5 years ago that I didn't
want it. See clone -r for a safe, easy alternative.

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial mailing list