editors

Help: revert

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

restore individual files or directories to an earlier state

    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. This restores
    the contents of the affected 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 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 an earlier change. See "hg help dates" for a list of
    formats valid for -d/--date.

    Revert modifies the working directory. It does not commit any changes, or
    change the parent of the working directory. If you revert to a revision
    other than the parent of the working directory, the reverted files will
    thus appear modified afterwards.

    If a file has been deleted, it is restored. If the executable mode of a
    file was changed, it is reset.

    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.

    Returns 0 on success.

options:

 -a --all                  revert all changes when no arguments given
 -d --date DATE            tipmost revision matching date
 -r --rev REV              revert to the specified revision
    --no-backup            do not save backup copies of files
 -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

[+] marked option can be specified multiple times

use "hg -v help revert" to show global options


SCM Home | OpenEuphoria.org Home