Patchwork [evolve-ext] evolve: improve the help of the fold command

login
register
mail settings
Submitter Laurent Charignon
Date June 26, 2015, 12:03 a.m.
Message ID <e8411c1b9539c2d2bb02.1435277028@lcharignon-mbp.local>
Download mbox | patch
Permalink /patch/9776/
State Superseded
Headers show

Comments

Laurent Charignon - June 26, 2015, 12:03 a.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1435251233 25200
#      Thu Jun 25 09:53:53 2015 -0700
# Node ID e8411c1b9539c2d2bb02547feb938a6d78056133
# Parent  d3328e6775b1f23c6ab41ccd8712e02abb6eea72
evolve: improve the help of the fold command

The help of the fold command needed a little rework. This patch makes it a
little less verbose and adds an example. It also highlights a little more the
importance of the --exact flag.
Laurent Charignon - June 26, 2015, 12:06 a.m.
Please discard this patch, I will send a V2
> On Jun 25, 2015, at 5:03 PM, Laurent Charignon <lcharignon@fb.com> wrote:
> 
> # HG changeset patch
> # User Laurent Charignon <lcharignon@fb.com>
> # Date 1435251233 25200
> #      Thu Jun 25 09:53:53 2015 -0700
> # Node ID e8411c1b9539c2d2bb02547feb938a6d78056133
> # Parent  d3328e6775b1f23c6ab41ccd8712e02abb6eea72
> evolve: improve the help of the fold command
> 
> The help of the fold command needed a little rework. This patch makes it a
> little less verbose and adds an example. It also highlights a little more the
> importance of the --exact flag.
> 
> diff --git a/hgext/evolve.py b/hgext/evolve.py
> --- a/hgext/evolve.py
> +++ b/hgext/evolve.py
> @@ -2580,9 +2580,8 @@ def touch(ui, repo, *revs, **opts):
> def fold(ui, repo, *revs, **opts):
>     """fold multiple revisions into a single one
> 
> -    Folds a set of revisions with the parent of the working directory.
> -    All revisions linearly between the given revisions and the parent
> -    of the working directory will also be folded.
> +    By default, folds all the revisions linearly between the given revisions
> +    and the parent of the working directory.
> 
>     Use --exact for folding only the specified revisions while ignoring the
>     parent of the working directory. In this case, the given revisions must
> @@ -2607,6 +2606,10 @@ def fold(ui, repo, *revs, **opts):
> 
>          hg fold 3:6
> 
> +     - Fold revisions 3 and 4:
> +
> +        hg fold '3 + 4' --exact
> +
>      - Only fold revisions linearly between foo and @::
> 
>          hg fold foo::@ --exact
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -2580,9 +2580,8 @@  def touch(ui, repo, *revs, **opts):
 def fold(ui, repo, *revs, **opts):
     """fold multiple revisions into a single one
 
-    Folds a set of revisions with the parent of the working directory.
-    All revisions linearly between the given revisions and the parent
-    of the working directory will also be folded.
+    By default, folds all the revisions linearly between the given revisions
+    and the parent of the working directory.
 
     Use --exact for folding only the specified revisions while ignoring the
     parent of the working directory. In this case, the given revisions must
@@ -2607,6 +2606,10 @@  def fold(ui, repo, *revs, **opts):
 
          hg fold 3:6
 
+     - Fold revisions 3 and 4:
+
+        hg fold '3 + 4' --exact
+
      - Only fold revisions linearly between foo and @::
 
          hg fold foo::@ --exact