Mercurial > repos > galaxyp > mgf_formatter
Help: revert
hg revert [OPTION]... [-r REV] [NAME]...
restore files to their checkout state
Note:
To check out earlier revisions, you should use 'hg update REV'. To cancel an uncommitted merge (and lose your changes), use 'hg merge --abort'.
With no revision specified, revert the specified files or directories to the contents they had in the parent of the working directory. This restores the contents of files to an unmodified state and unschedules adds, removes, copies, and renames. If the working directory has two parents, you must explicitly specify a revision.
Using the -r/--rev or -d/--date options, revert the given files or directories to their states as of a specific revision. Because revert does not change the working directory parents, this will cause these files to appear modified. This can be helpful to "back out" some or all of an earlier change. See 'hg backout' for a related method.
Modified files are saved with a .orig suffix before reverting. To disable these backups, use --no-backup. It is possible to store the backup files in a custom directory relative to the root of the repository by setting the "ui.origbackuppath" configuration option.
See 'hg help dates' for a list of formats valid for -d/--date.
See 'hg help backout' for a way to reverse the effect of an earlier changeset.
Returns 0 on success.
options ([+] can be repeated):
-a | --all | revert all changes when no arguments given |
-d | --date DATE | tipmost revision matching date |
-r | --rev REV | revert to the specified revision |
-C | --no-backup | do not save backup copies of files |
-i | --interactive | interactively select the changes |
-I | --include PATTERN [+] | include names matching the given patterns |
-X | --exclude PATTERN [+] | exclude names matching the given patterns |
-n | --dry-run | do not perform actions, just print output |
global options ([+] can be repeated):
-R | --repository REPO | repository root directory or name of overlay bundle file |
--cwd DIR | change working directory | |
-y | --noninteractive | do not prompt, automatically pick the first choice for all prompts |
-q | --quiet | suppress output |
-v | --verbose | enable additional output |
--color TYPE | when to colorize (boolean, always, auto, never, or debug) | |
--config CONFIG [+] | set/override config option (use 'section.name=value') | |
--debug | enable debugging output | |
--debugger | start debugger | |
--encoding ENCODE | set the charset encoding (default: UTF-8) | |
--encodingmode MODE | set the charset encoding mode (default: strict) | |
--traceback | always print a traceback on exception | |
--time | time how long the command takes | |
--profile | print command execution profile | |
--version | output version information and exit | |
-h | --help | display help and exit |
--hidden | consider hidden changesets | |
--pager TYPE | when to paginate (boolean, always, auto, or never) (default: auto) |