Patchwork [4,of,7,v2] histedit: explain basics of histedit commands

login
register
mail settings
Submitter timeless@mozdev.org
Date Dec. 28, 2015, 7:15 p.m.
Message ID <7cc457bca6694793584a.1451330100@waste.org>
Download mbox | patch
Permalink /patch/12374/
State Superseded
Commit fb2c77ba577a8818f801a06329e6d8cc134520da
Headers show

Comments

timeless@mozdev.org - Dec. 28, 2015, 7:15 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1450826513 0
#      Tue Dec 22 23:21:53 2015 +0000
# Node ID 7cc457bca6694793584a06c612e9b076129dce95
# Parent  0eb27264c430c5151c98262d181d160c60e80177
histedit: explain basics of histedit commands
Augie Fackler - Jan. 5, 2016, 4:52 p.m.
On Mon, Dec 28, 2015 at 01:15:00PM -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1450826513 0
> #      Tue Dec 22 23:21:53 2015 +0000
> # Node ID 7cc457bca6694793584a06c612e9b076129dce95
> # Parent  0eb27264c430c5151c98262d181d160c60e80177
> histedit: explain basics of histedit commands

It's a bit of a bummer to list the commands inline here hard-coded,
because now it duplicates a bunch of text and if someone adds a rule
in a third-party extension we're going to have a bad time. Can we do
this at least somewhat dynamically somehow?

>
> diff --git a/hgext/histedit.py b/hgext/histedit.py
> --- a/hgext/histedit.py
> +++ b/hgext/histedit.py
> @@ -807,8 +807,21 @@
>  def histedit(ui, repo, *freeargs, **opts):
>      """interactively edit changeset history
>
> -    This command edits changesets between an ANCESTOR and the parent of
> -    the working directory.
> +    This command lets you edit a linear series of changesets (up to
> +    and including the working directory, which should be clean).
> +    You can::
> +
> +    - `pick` to [re]order a changeset
> +
> +    - `drop` to omit changeset
> +
> +    - `mess` to reword the changeset commit message
> +
> +    - `fold` to combine it with the preceding changeset
> +
> +    - `roll` like fold, but discarding this commit's description
> +
> +    - `edit` to edit this changeset
>
>      The value from the "histedit.defaultrev" config option is used as a
>      revset to select the base revision when ANCESTOR is not specified.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
timeless - Jan. 5, 2016, 7:27 p.m.
Augie Fackler wrote:
> It's a bit of a bummer to list the commands inline here hard-coded,
> because now it duplicates a bunch of text and if someone adds a rule
> in a third-party extension we're going to have a bad time. Can we do
> this at least somewhat dynamically somehow?

With the histedit @action stuff, if we could define hooks the way we
do for help revsets, perhaps...

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -807,8 +807,21 @@ 
 def histedit(ui, repo, *freeargs, **opts):
     """interactively edit changeset history
 
-    This command edits changesets between an ANCESTOR and the parent of
-    the working directory.
+    This command lets you edit a linear series of changesets (up to
+    and including the working directory, which should be clean).
+    You can::
+
+    - `pick` to [re]order a changeset
+
+    - `drop` to omit changeset
+
+    - `mess` to reword the changeset commit message
+
+    - `fold` to combine it with the preceding changeset
+
+    - `roll` like fold, but discarding this commit's description
+
+    - `edit` to edit this changeset
 
     The value from the "histedit.defaultrev" config option is used as a
     revset to select the base revision when ANCESTOR is not specified.