Revert

hg revert [OPTION]... [-r REV] [NAME]...

Revert restores the content of the working directory (or individual files or directories) to the state and content corresponding to the given revision of the repository, thereby discarding all (respective) local modifications.

Revert will by default target the current parent revision. If a different revision is specified, revert will actually introduce local modifications which correspond to the diff between the parent revision and the specified revision (see ConcatenatingChangesets for a very advanced rare use case of this).

/!\ This operation however does not change the parent revision of the working directory (or revisions in case of an uncommitted merge). To undo an uncomitted merge, you can use "hg update -C -r." which will reset the parents to the first parent.

Help text: http://www.selenic.com/mercurial/hg.1.html#revert


CategoryCommand

Revert (last edited 2008-06-04 23:23:46 by AdrianBuehlmann)