# HG changeset patch # User Matt Mackall # Date 1196630737 21600 # Node ID d4ec6d61b3eeb7733273e660727e115d73d042ac # Parent e2da5b3406514706a12c3336efdf89882c3bd7ab imported patch rev-help diff -r e2da5b340651 -r d4ec6d61b3ee mercurial/commands.py --- a/mercurial/commands.py Fri Nov 09 10:45:58 2007 -0600 +++ b/mercurial/commands.py Sun Dec 02 15:25:37 2007 -0600 @@ -2273,7 +2273,10 @@ 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 @@ 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 @@ 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 @@ _('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')),