0

I have 4 changesets and I want to return to Revision 2 and cancel revisions 3 and 4. is this possible? and what is the command to type?

user2969259
  • 13
  • 2
  • 6
  • also, please remember to accept/upvote the answer if you found it helpful. As I can see in your profile you never do that, it's sort of bad manners. Read this: http://meta.stackoverflow.com/help/someone-answers – Bruno Gelb Apr 01 '14 at 07:42
  • yes it's true I never do that, thanks, i'll do it from now. – user2969259 Apr 01 '14 at 11:46

1 Answers1

1

hg update [-r REV] changes your working copy parent revision and also changes the file content to match this new parent revision. This means that new commits will carry on from the revision you update to.

and what exactly do you mean by 'cancel'? exclude them from existence? You can do that by using strip command:

hg strip [-r REV]

which removes the changeset and all its descendants from the repository. It will be as if the changes never existed. this command is part of the MqExtension which you need to enable first.

Bruno Gelb
  • 5,322
  • 8
  • 35
  • 50