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

login
register
mail settings
Submitter Raphaël Gomès
Date July 19, 2019, 2:29 p.m.
Message ID <7fc102507d369c4c8243.1563546582@alphare-carbon.lan>
Download mbox | patch
Permalink /patch/40980/
State New
Headers show

Comments

Raphaël Gomès - July 19, 2019, 2:29 p.m.
# HG changeset patch
# User Raphaël Gomès <rgomes@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.
Anton Shestakov - Sept. 13, 2019, 1:56 p.m.
This patch seems to have fallen entirely through the cracks. Try CCing
marmoute in V2.

On Fri, 19 Jul 2019 16:29:42 +0200
Raphaël Gomès <raphael.gomes@octobus.net> wrote:

> # HG changeset patch
> # User Raphaël Gomès <rgomes@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.

I think this should be put under `.. container:: verbose` (see core
mercurial/commands.py). Usually, command examples are only visible in hg
help output when --verbose is used, that helps keeping help text short.

Otherwise LGTM.
Raphaël Gomès - Sept. 13, 2019, 2:13 p.m.
Done as a merge request on https://dev.heptapod.net/mercurial/evolve, 
thanks for reminding me

On 9/13/19 3:56 PM, Anton Shestakov wrote:
> This patch seems to have fallen entirely through the cracks. Try CCing
> marmoute in V2.
>
> On Fri, 19 Jul 2019 16:29:42 +0200
> Raphaël Gomès <raphael.gomes@octobus.net> wrote:
>
>> # HG changeset patch
>> # User Raphaël Gomès <rgomes@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.
> I think this should be put under `.. container:: verbose` (see core
> mercurial/commands.py). Usually, command examples are only visible in hg
> help output when --verbose is used, that helps keeping help text short.
>
> Otherwise LGTM.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

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'))