Parsing a command
Tony Mechelynck
antoine.mechelynck at gmail.com
Fri Apr 26 20:34:30 UTC 2013
On 26/04/13 19:09, Ghyslain Leclerc wrote:
> [...] I worry (maybe without cause !) about commands that can't be undone after the fact.
[...]
There are three ways to "undo after the fact" in Mercurial:
1) A *single* transaction can be undone after the fact, but you should
only use this if you're sure that *no one* has pulled from your
repository in the meantime. This action *cannot* be repeated to get at
successively earlier points in the history. There is also no "redo" if
you undo what you shouldn't.
2) One or more files, or even all changed files, can be brought back to
what they were at some previous revision, making these files appear
modified. Follow it by a commit if you want to make this reversion
permanent.
3) The effect of a single previous changeset can be undone by applying
its patches in reverse. This creates a new changeset, child of the
changeset to be undone, and which has the same working directory
contents as the latter's parent but a different history. Optionally, the
new changeset can then be merged with the current changeset, leaving the
merge uncomitted. This "uncommittedness" allows you to intervene
manually if there are merge conflicts to be resolved.
See:
1) hg help rollback
2) hg help revert
3) hg help backout
Best regards,
Tony.
--
Nuke the gay, unborn, baby whales for Jesus.
More information about the Mercurial
mailing list