Fwd: Re: I must have missed something VERY important...

Tony Mechelynck antoine.mechelynck at gmail.com
Sun Aug 12 03:09:59 UTC 2012


The following reply seems to have been sent to me only, forgetting the 
mailing list (and the intended addressee i.e. the OP).

-------- Original Message --------
Subject: 	Re: I must have missed something VERY important...
Date: 	Sat, 11 Aug 2012 22:35:39 +0200
From: 	Angel Ezquerra <ezquerra at gmail.com>
To: 	Tony Mechelynck <antoine.mechelynck at gmail.com>




On Aug 11, 2012 10:21 PM, "Tony Mechelynck"
<antoine.mechelynck at gmail.com <mailto:antoine.mechelynck at gmail.com>> wrote:
  >
  > On 09/08/12 01:46, schwack wrote:
  >>
  >> I thought the whole idea behind the concept of a repository was to be
  >> able to undo changes that don't work out?
  >> I have a project, no one works on but me. I have made several changes
  >> that ultimately did not work out. Now, I simply want to go back to the
  >> way things were about 5 revisions ago. I mean COMPLETELY. It was a 
great
  >> experiment but it did not work out. In the course of things MANY files
  >> got changed, and there are about 5 commits between me and happiness.
  >> Was I wrong in thinking that I could simply return to revision 156 if I
  >> wanted? Revert does not seem to help. I just want everything back to
  >> where it was.
  >> It seems to me that is the whole idea? I should be able to right click
  >> any revision and say take me to here please......
  >> How to I 'revert' EVERYTHING to be just like it was 2 weeks ago?
  >>
  > Yes, as Wurzel said in another thread, to go back to how all the
files were at revision 156, it's
  >
  >         hg update -r 156
  >
  > As simple as that. If then you make changes and commit them, there
will be two children to revision 156: rev. 157 which you already have,
and a new revision, maybe rev. 162, i.e., one more than the highest rev#
already existing. So if you decide that those changes you undid weren't
all as bad as that, you can go back to any of them too.
  >
  >
  > Best regards,
  > Tony.
  > --
  > There are no games on this system.
  >

If you want to completely remove the revisions that you think are wrong
from your history you could also use the "strip" command provided by the
"strip" extension. Note, however, that this is a destructive operation
that could result in loss of information (that is what strip does, by
definition). As such, Mercurial requires you to manually enable the
strip extension by adding it to the extensions section of the Mercurial
configuration file. This is easier to do if you use a graphical
mercurial client such as TortoiseHg.

I must say however that your question is very basic. Thus I think that
before enabling or using advanced extensions such as strip you may
benefit from reading some of the many excellent mercurial tutorials that
you will find online. For example you could read the excellent
"mercurial kickstart" guide by Martin Geisler
(http://mercurial.aragost.com/kick-start/en/ ) or the hginit tutorial by
Joel Spolsky (http://hginit.com)

Cheers,

Angel




More information about the Mercurial mailing list