[PATCH evolve-ext] docs: add example for the `prune` command

Raphaël Gomès raphael.gomes at octobus.net
Fri Jul 19 10:29:42 EDT 2019


# HG changeset patch
# User Raphaël Gomès <rgomes at octobus.net>
# Date 1563546408 -7200
#      Fri Jul 19 16:26:48 2019 +0200
# Branch stable
# Node ID 7fc102507d369c4c8243eb4fc5c7fe21af96aca3
# Parent  124cf32dd207413d1fb2cb0dcaf39d70ba7551fd
# EXP-Topic documentation
docs: add example for the `prune` command

Giving at least one example helps clear up the syntax, especially since most
options will follow a very similar pattern.

diff -r 124cf32dd207 -r 7fc102507d36 hgext3rd/evolve/cmdrewrite.py
--- a/hgext3rd/evolve/cmdrewrite.py	Fri Jul 19 17:40:45 2019 +0800
+++ b/hgext3rd/evolve/cmdrewrite.py	Fri Jul 19 16:26:48 2019 +0200
@@ -998,6 +998,10 @@
     ``--pair`` option to pair the pruned precursor and successor changesets.
     This is commonly useful for resolving history divergence, or when someone
     else does 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.
     """
     _checknotesize(ui, opts)
     revs = scmutil.revrange(repo, list(revs) + opts.get('rev'))


More information about the Mercurial-devel mailing list