Patchwork [2,of,3] histedit: prefer edit commit, edit message, use commit

login
register
mail settings
Submitter timeless@mozdev.org
Date Jan. 5, 2016, 6:31 p.m.
Message ID <0e22d25a49546b65a4eb.1452018712@waste.org>
Download mbox | patch
Permalink /patch/12539/
State Accepted
Headers show

Comments

timeless@mozdev.org - Jan. 5, 2016, 6:31 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1450905608 0
#      Wed Dec 23 21:20:08 2015 +0000
# Node ID 0e22d25a49546b65a4eb53ef53f555634afdbef9
# Parent  2bd72406a9bfe89e56832964fc9ffab5d1d6bf80
histedit: prefer edit commit, edit message, use commit

Selecting editing commits, rewording commit messages, and
selecting commits are key actions, we will prefer them more
generally in a future commit, this pulls them ahead before
that to make the diffs easier to read.

The remaining commands are left alphabetically sorted

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -218,7 +218,8 @@ 
     """ construct the editor comment
     The comment includes::
      - an intro
-     - short commands
+     - sorted primary commands
+     - sorted short commands
 
     Commands are only included once.
     """
@@ -229,12 +230,12 @@ 
 Commands:""")
     # i18n: command names and abbreviations must remain untranslated
     verbs = _("""
+ e, edit = use commit, but stop for amending
+ m, mess = edit commit message without changing commit content
  p, pick = use commit
- e, edit = use commit, but stop for amending
+ d, drop = remove commit from history
  f, fold = use commit, but combine it with the one above
  r, roll = like fold, but discard this commit's description
- d, drop = remove commit from history
- m, mess = edit commit message without changing commit content
 """)
 
     return ''.join(['# %s\n' % l if l else '#\n'
diff --git a/tests/test-histedit-arguments.t b/tests/test-histedit-arguments.t
--- a/tests/test-histedit-arguments.t
+++ b/tests/test-histedit-arguments.t
@@ -64,12 +64,13 @@ 
   # Commits are listed from least to most recent
   #
   # Commands:
+  #
+  #  e, edit = use commit, but stop for amending
+  #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
-  #  e, edit = use commit, but stop for amending
+  #  d, drop = remove commit from history
   #  f, fold = use commit, but combine it with the one above
   #  r, roll = like fold, but discard this commit's description
-  #  d, drop = remove commit from history
-  #  m, mess = edit commit message without changing commit content
   #
 
 Run on a revision not ancestors of the current working directory.
@@ -293,12 +294,13 @@ 
   # Commits are listed from least to most recent
   #
   # Commands:
+  #
+  #  e, edit = use commit, but stop for amending
+  #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
-  #  e, edit = use commit, but stop for amending
+  #  d, drop = remove commit from history
   #  f, fold = use commit, but combine it with the one above
   #  r, roll = like fold, but discard this commit's description
-  #  d, drop = remove commit from history
-  #  m, mess = edit commit message without changing commit content
   #
 
 Test --continue with --keep
diff --git a/tests/test-histedit-bookmark-motion.t b/tests/test-histedit-bookmark-motion.t
--- a/tests/test-histedit-bookmark-motion.t
+++ b/tests/test-histedit-bookmark-motion.t
@@ -70,12 +70,13 @@ 
   # Commits are listed from least to most recent
   #
   # Commands:
+  #
+  #  e, edit = use commit, but stop for amending
+  #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
-  #  e, edit = use commit, but stop for amending
+  #  d, drop = remove commit from history
   #  f, fold = use commit, but combine it with the one above
   #  r, roll = like fold, but discard this commit's description
-  #  d, drop = remove commit from history
-  #  m, mess = edit commit message without changing commit content
   #
   $ hg histedit 1 --commands - --verbose << EOF | grep histedit
   > pick 177f92b77385 2 c
@@ -130,12 +131,13 @@ 
   # Commits are listed from least to most recent
   #
   # Commands:
+  #
+  #  e, edit = use commit, but stop for amending
+  #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
-  #  e, edit = use commit, but stop for amending
+  #  d, drop = remove commit from history
   #  f, fold = use commit, but combine it with the one above
   #  r, roll = like fold, but discard this commit's description
-  #  d, drop = remove commit from history
-  #  m, mess = edit commit message without changing commit content
   #
   $ hg histedit 1 --commands - --verbose << EOF | grep histedit
   > pick b346ab9a313d 1 c
diff --git a/tests/test-histedit-commute.t b/tests/test-histedit-commute.t
--- a/tests/test-histedit-commute.t
+++ b/tests/test-histedit-commute.t
@@ -64,12 +64,13 @@ 
   # Commits are listed from least to most recent
   #
   # Commands:
+  #
+  #  e, edit = use commit, but stop for amending
+  #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
-  #  e, edit = use commit, but stop for amending
+  #  d, drop = remove commit from history
   #  f, fold = use commit, but combine it with the one above
   #  r, roll = like fold, but discard this commit's description
-  #  d, drop = remove commit from history
-  #  m, mess = edit commit message without changing commit content
   #
 
 edit the history
@@ -342,12 +343,13 @@ 
   # Commits are listed from least to most recent
   #
   # Commands:
+  #
+  #  e, edit = use commit, but stop for amending
+  #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
-  #  e, edit = use commit, but stop for amending
+  #  d, drop = remove commit from history
   #  f, fold = use commit, but combine it with the one above
   #  r, roll = like fold, but discard this commit's description
-  #  d, drop = remove commit from history
-  #  m, mess = edit commit message without changing commit content
   #
 
 should also work if a commit message is missing
diff --git a/tests/test-histedit-edit.t b/tests/test-histedit-edit.t
--- a/tests/test-histedit-edit.t
+++ b/tests/test-histedit-edit.t
@@ -469,10 +469,11 @@ 
   # Commits are listed from least to most recent
   #
   # Commands:
+  #
+  #  e, edit = use commit, but stop for amending
+  #  m, mess = edit commit message without changing commit content
   #  p, fold = use commit
-  #  e, edit = use commit, but stop for amending
+  #  d, drop = remove commit from history
   #  f, fold = use commit, but combine it with the one above
   #  r, roll = like fold, but discard this commit's description
-  #  d, drop = remove commit from history
-  #  m, mess = edit commit message without changing commit content
   #
diff --git a/tests/test-histedit-obsolete.t b/tests/test-histedit-obsolete.t
--- a/tests/test-histedit-obsolete.t
+++ b/tests/test-histedit-obsolete.t
@@ -49,12 +49,13 @@ 
   # Commits are listed from least to most recent
   #
   # Commands:
+  #
+  #  e, edit = use commit, but stop for amending
+  #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
-  #  e, edit = use commit, but stop for amending
+  #  d, drop = remove commit from history
   #  f, fold = use commit, but combine it with the one above
   #  r, roll = like fold, but discard this commit's description
-  #  d, drop = remove commit from history
-  #  m, mess = edit commit message without changing commit content
   #
   $ hg histedit 1 --commands - --verbose <<EOF | grep histedit
   > pick 177f92b77385 2 c
diff --git a/tests/test-histedit-outgoing.t b/tests/test-histedit-outgoing.t
--- a/tests/test-histedit-outgoing.t
+++ b/tests/test-histedit-outgoing.t
@@ -46,12 +46,13 @@ 
   # Commits are listed from least to most recent
   #
   # Commands:
+  #
+  #  e, edit = use commit, but stop for amending
+  #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
-  #  e, edit = use commit, but stop for amending
+  #  d, drop = remove commit from history
   #  f, fold = use commit, but combine it with the one above
   #  r, roll = like fold, but discard this commit's description
-  #  d, drop = remove commit from history
-  #  m, mess = edit commit message without changing commit content
   #
   $ cd ..
 
@@ -77,12 +78,13 @@ 
   # Commits are listed from least to most recent
   #
   # Commands:
+  #
+  #  e, edit = use commit, but stop for amending
+  #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
-  #  e, edit = use commit, but stop for amending
+  #  d, drop = remove commit from history
   #  f, fold = use commit, but combine it with the one above
   #  r, roll = like fold, but discard this commit's description
-  #  d, drop = remove commit from history
-  #  m, mess = edit commit message without changing commit content
   #
   $ cd ..
 
@@ -100,12 +102,13 @@ 
   # Commits are listed from least to most recent
   #
   # Commands:
+  #
+  #  e, edit = use commit, but stop for amending
+  #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
-  #  e, edit = use commit, but stop for amending
+  #  d, drop = remove commit from history
   #  f, fold = use commit, but combine it with the one above
   #  r, roll = like fold, but discard this commit's description
-  #  d, drop = remove commit from history
-  #  m, mess = edit commit message without changing commit content
   #
 
 test to check number of roots in outgoing revisions