Home » Questions » Computers [ Ask a new question ]

How do I remove outgoing changesets in Mercurial (hg)

How do I remove outgoing changesets in Mercurial (hg)

when I run hg out I have 3 outgoing changesets. I want to trash them and revert to how things are in the central repository. How?

Asked by: Guest | Views: 328
Total answers/comments: 2
bert [Entry]

Use hg strip 'roots(outgoing())'
bert [Entry]

"The other option is to use hg strip command, which is part of the mq (mercurial queues) extension.

The mercurial philosophy is of an immutable history, so commands which manipulate that history are frowned upon, but there are times when stripping or rebasing may solve more problems than they cause.

If you use TortoiseHg then you will need to enable the MQ extension. Prior to v1.0 THG it was enabled by default, but after much discussion it was decided that it was really an 'advanced' feature that should be left off until the use has the experience to know how to enable it."