Help: strip

hg strip [-k] [-f] [-B bookmark] [-r] REV...

strip changesets and all their descendants from the repository

The strip command removes the specified changesets and all their descendants. If the working directory has uncommitted changes, the operation is aborted unless the --force flag is supplied, in which case changes will be discarded.

If a parent of the working directory is stripped, then the working directory will automatically be updated to the most recent available ancestor of the stripped parent after the operation completes.

Any stripped changesets are stored in ".hg/strip-backup" as a bundle (see 'hg help bundle' and 'hg help unbundle'). They can be restored by running 'hg unbundle .hg/strip-backup/BUNDLE', where BUNDLE is the bundle file created by the strip. Note that the local revision numbers will in general be different after the restore.

Use the --no-backup option to discard the backup bundle once the operation completes.

Strip is not a history-rewriting operation and can be used on changesets in the public phase. But if the stripped changesets have been pushed to a remote repository you will likely pull them again.

Return 0 on success.

(use 'hg help -e strip' to show help for the strip extension)

options ([+] can be repeated):

-r --rev REV [+] strip specified revision (optional, can specify revisions without this option)
-f --force force removal of changesets, discard uncommitted changes (no backup)
--no-backup do not save backup bundle
--nobackup do not save backup bundle (DEPRECATED)
-n -- ignored (DEPRECATED)
-k --keep do not modify working directory during strip
-B --bookmark BOOKMARK [+] remove revs only reachable from given bookmark
--mq operate on patch repository

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: EUC-JP)
--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)