D942: histedit: removing the experimental config 'histeditng'

singhsrb (Saurabh Singh) phabricator at mercurial-scm.org
Thu Oct 5 17:55:34 EDT 2017


singhsrb updated this revision to Diff 2488.
singhsrb added a comment.


  Updating https://phab.mercurial-scm.org/D942: Addressing the review comments and adding some documentation.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D942?vs=2440&id=2488

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D942

AFFECTED FILES
  hgext/histedit.py
  tests/test-histedit-arguments.t
  tests/test-histedit-base.t
  tests/test-histedit-bookmark-motion.t
  tests/test-histedit-commute.t
  tests/test-histedit-edit.t
  tests/test-histedit-obsolete.t
  tests/test-histedit-outgoing.t

CHANGE DETAILS

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
@@ -52,6 +52,7 @@
   #  e, edit = use commit, but stop for amending
   #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
+  #  b, base = checkout changeset and apply further changesets from there
   #  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 and date
@@ -86,6 +87,7 @@
   #  e, edit = use commit, but stop for amending
   #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
+  #  b, base = checkout changeset and apply further changesets from there
   #  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 and date
@@ -112,6 +114,7 @@
   #  e, edit = use commit, but stop for amending
   #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
+  #  b, base = checkout changeset and apply further changesets from there
   #  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 and date
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
@@ -132,6 +132,7 @@
   #  e, edit = use commit, but stop for amending
   #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
+  #  b, base = checkout changeset and apply further changesets from there
   #  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 and date
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
@@ -476,6 +476,7 @@
   #  e, edit = use commit, but stop for amending
   #  m, mess = edit commit message without changing commit content
   #  p, fold = use commit
+  #  b, base = checkout changeset and apply further changesets from there
   #  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 and date
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
@@ -70,6 +70,7 @@
   #  e, edit = use commit, but stop for amending
   #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
+  #  b, base = checkout changeset and apply further changesets from there
   #  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 and date
@@ -348,6 +349,7 @@
   #  e, edit = use commit, but stop for amending
   #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
+  #  b, base = checkout changeset and apply further changesets from there
   #  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 and date
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
@@ -76,6 +76,7 @@
   #  e, edit = use commit, but stop for amending
   #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
+  #  b, base = checkout changeset and apply further changesets from there
   #  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 and date
@@ -132,6 +133,7 @@
   #  e, edit = use commit, but stop for amending
   #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
+  #  b, base = checkout changeset and apply further changesets from there
   #  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 and date
diff --git a/tests/test-histedit-base.t b/tests/test-histedit-base.t
--- a/tests/test-histedit-base.t
+++ b/tests/test-histedit-base.t
@@ -5,8 +5,6 @@
   > tglog = log -G --template "{rev}:{node}:{phase} '{desc}'\n"
   > [extensions]
   > histedit=
-  > [experimental]
-  > histeditng=True
   > EOF
 
 Create repo a:
@@ -238,15 +236,6 @@
   hg: parse error: base "d273e35dcdf2" changeset was an edited list candidate
   (base must only use unlisted changesets)
 
-  $ hg --config experimental.histeditng=False histedit 5 --commands - 2>&1 << EOF | fixbundle
-  > base cd010b8cd998 A
-  > pick d273e35dcdf2 B
-  > pick 03772da75548 X
-  > pick b2f90fd8aa85 I
-  > pick e8c55b19d366 J
-  > EOF
-  hg: parse error: unknown action "base"
-
   $ hg tglog
   @  8:e8c55b19d366b335626e805484110d1d5f6f2ea3:draft 'J'
   |
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
@@ -70,6 +70,7 @@
   #  e, edit = use commit, but stop for amending
   #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
+  #  b, base = checkout changeset and apply further changesets from there
   #  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 and date
@@ -305,6 +306,7 @@
   #  e, edit = use commit, but stop for amending
   #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
+  #  b, base = checkout changeset and apply further changesets from there
   #  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 and date
@@ -541,6 +543,7 @@
   #  e, edit = use commit, but stop for amending
   #  m, mess = edit commit message without changing commit content
   #  p, pick = use commit
+  #  b, base = checkout changeset and apply further changesets from there
   #  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 and date
diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -39,6 +39,7 @@
  #  r, roll = like fold, but discard this commit's description and date
  #  d, drop = remove commit from history
  #  m, mess = edit commit message without changing commit content
+ #  b, base = checkout changeset and apply further changesets from there
  #
 
 In this file, lines beginning with ``#`` are ignored. You must specify a rule
@@ -61,6 +62,7 @@
  #  r, roll = like fold, but discard this commit's description and date
  #  d, drop = remove commit from history
  #  m, mess = edit commit message without changing commit content
+ #  b, base = checkout changeset and apply further changesets from there
  #
 
 At which point you close the editor and ``histedit`` starts working. When you
@@ -793,6 +795,8 @@
             replacements.append((ich, (n,)))
         return repo[n], replacements
 
+ at action(['base', 'b'],
+        _('checkout changeset and apply further changesets from there'))
 class base(histeditaction):
 
     def run(self):
@@ -883,7 +887,6 @@
         raise error.Abort(msg, hint=hint)
     return repo.lookup(roots[0])
 
-
 @command('histedit',
     [('', 'commands', '',
       _('read history edits from the specified file'), _('FILE')),
@@ -916,6 +919,8 @@
 
     - `edit` to edit this changeset (preserving date)
 
+    - `base` to checkout changeset and apply further changesets from there
+
     There are a number of ways to select the root changeset:
 
     - Specify ANCESTOR directly
@@ -1609,7 +1614,3 @@
          _("use 'hg histedit --continue' or 'hg histedit --abort'")])
     cmdutil.afterresolvedstates.append(
         ['histedit-state', _('hg histedit --continue')])
-    if ui.configbool("experimental", "histeditng"):
-        globals()['base'] = action(['base', 'b'],
-            _('checkout changeset and apply further changesets from there')
-        )(base)



To: singhsrb, #hg-reviewers, quark, durin42
Cc: durin42, quark, mercurial-devel


More information about the Mercurial-devel mailing list