August Karlstrom
August Karlstrom

Reputation: 11377

How do I continue development from an earlier revision?

In my project I would like to continue development from an earlier revision. So far I have done

$ hg up -r REV

and committed a changeset. How do I "get rid of" the old branch that I'm no longer interested in so I can push the repository without the force option?

Upvotes: 0

Views: 71

Answers (1)

August Karlstrom
August Karlstrom

Reputation: 11377

To undo the last N commits (but without changing the history), do the following:

  1. Revert the working directory to the desired revision:

    $ hg revert -aC -r -<N + 1>

  2. Commit the changes:

    $ hg ci -m "Undo N changesets"

Now this branch can be merged with the other one.

Upvotes: 1

Related Questions