hg prune#
mark changesets as obsolete or succeeded by another changeset#
hg prune [OPTION]... [-r] REV...
Aliases: obsolete
This command is provided by the evolve extension.
Pruning changesets marks them obsolete, hiding them from the history log, provided they have no descendants. Otherwise, all such descendants that aren't themselves obsolete become "unstable". Use `hg evolve` to handle this situation.
When you prune the parent of your working copy, Mercurial updates the working copy to a non-obsolete parent.
You can use -s/--successor to tell Mercurial that a newer version
(successor) of the pruned changeset exists. Mercurial records successor
revisions in obsolescence markers.
If you prune a single revision and specify multiple revisions in
-s/--successor, you are recording a "split" and must acknowledge it by
passing --split. Similarly, when you prune multiple changesets with a
single successor, you must pass the --fold option.
If you want to supersede multiple revisions at the same time, use the
--pair option to pair the pruned precursor and successor changesets.
This is commonly useful for resolving history divergence, or when someone
else edits history without obsolescence enabled.
hg prune A::B -s C::D --pair will mark all revisions in the A::B
range as superseded by the revisions in C::D. Both revsets need to have
the same number of changesets.
Options
|
|
successor changeset |
|
|
revisions to prune |
|
|
does not modify working copy during prune |
|
|
store a note on prune |
|
record a pairing, such as a rebase or divergence resolution (pairing multiple precursors to multiple successors) |
|
|
record a fold (multiple precursors, one successor) |
|
|
record a split (one precursor, multiple successors) |
|
|
|
remove revs only reachable from given bookmark |
|
|
record the specified date in metadata |
|
|
record the specified user in metadata |
|
operate on patch repository |
Options marked [+] can be repeated.