diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2273,7 +2273,10 @@ def rename(ui, repo, *pats, **opts): del wlock def revert(ui, repo, *pats, **opts): - """revert files or dirs to their states as of some revision + """restore individual files or dirs to an earlier state + + (use update -r to check out earlier revisions, revert does not + change the working dir parents) With no revision specified, revert the named files or directories to the contents they had in the parent of the working directory. @@ -2282,12 +2285,9 @@ def revert(ui, repo, *pats, **opts): working directory has two parents, you must explicitly specify the revision to revert to. - Modified files are saved with a .orig suffix before reverting. - To disable these backups, use --no-backup. - Using the -r option, revert the given files or directories to their contents as of a specific revision. This can be helpful to "roll - back" some or all of a change that should not have been committed. + back" some or all of an earlier change. Revert modifies the working directory. It does not commit any changes, or change the parent of the working directory. If you @@ -2301,6 +2301,9 @@ def revert(ui, repo, *pats, **opts): If names are given, all files matching the names are reverted. If no arguments are given, no files are reverted. + + Modified files are saved with a .orig suffix before reverting. + To disable these backups, use --no-backup. """ if opts["date"]: @@ -3085,7 +3088,7 @@ table = { _('forcibly copy over an existing managed file')), ] + walkopts + dryrunopts, _('hg rename [OPTION]... SOURCE... DEST')), - "^revert": + "revert": (revert, [('a', 'all', None, _('revert all changes when no arguments given')), ('d', 'date', '', _('tipmost revision matching date')),