[PATCH] revert: Make it clearer when not to use revert
Mads Kiilerich
mads at kiilerich.com
Mon Jun 28 08:08:36 CDT 2010
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1277730481 -7200
# Branch stable
# Node ID f7a21eb59fc3a29d37eaaa90c5dec4b26a7741e0
# Parent 51021f4c80b5dcf608626ddc24b21c155df2cae8
revert: Make it clearer when not to use revert
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3015,8 +3015,11 @@
def revert(ui, repo, *pats, **opts):
"""restore individual files or directories to an earlier state
- (Use update -r to check out earlier revisions, revert does not
- change the working directory parents.)
+ NOTE: This command is most likely not what you are looking for. revert
+ will partially overwrite content in the working directory without changing
+ the working directory parents. Use :hg:`update -r rev` to check out earlier
+ revisions, or :hg:`update --clean .` to undo a merge which has added
+ another parent.
With no revision specified, revert the named files or directories
to the contents they had in the parent of the working directory.
More information about the Mercurial-devel
mailing list