# HG changeset patch # User Saurabh Singh # Date 1507240585 0 # Node ID 270e344a6c7488080687b3f9c9ae718da06c71dc # Parent 6bda8a9d8431bff87442c7934d361b4747692d11 histedit: removing the experimental config 'histeditng' This config has been around for about 2 years now. So, it can be assumed to be stable. Therefore, I am removing the config. This also makes the test 'test-histedit-base.t' compatible with chg. Test Plan: - Ran the test 'test-histedit-base.t' with and without '--chg' option. - Ran all the other tests without '--chg' option. - Checked the output of 'hg help histedit'. Differential Revision: https://phab.mercurial-scm.org/D942 diff -r 6bda8a9d8431 -r 270e344a6c74 hgext/histedit.py --- a/hgext/histedit.py Thu Oct 05 00:48:44 2017 +0000 +++ b/hgext/histedit.py Thu Oct 05 21:56:25 2017 +0000 @@ -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 @@ -815,6 +817,8 @@ replacements.append((ich, (n,))) return repo[n], replacements +@action(['base', 'b'], + _('checkout changeset and apply further changesets from there')) class base(histeditaction): def run(self): @@ -905,7 +909,6 @@ raise error.Abort(msg, hint=hint) return repo.lookup(roots[0]) - @command('histedit', [('', 'commands', '', _('read history edits from the specified file'), _('FILE')), @@ -938,6 +941,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 @@ -1631,7 +1636,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) diff -r 6bda8a9d8431 -r 270e344a6c74 tests/test-histedit-arguments.t --- a/tests/test-histedit-arguments.t Thu Oct 05 00:48:44 2017 +0000 +++ b/tests/test-histedit-arguments.t Thu Oct 05 21:56:25 2017 +0000 @@ -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 -r 6bda8a9d8431 -r 270e344a6c74 tests/test-histedit-base.t --- a/tests/test-histedit-base.t Thu Oct 05 00:48:44 2017 +0000 +++ b/tests/test-histedit-base.t Thu Oct 05 21:56:25 2017 +0000 @@ -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 -r 6bda8a9d8431 -r 270e344a6c74 tests/test-histedit-bookmark-motion.t --- a/tests/test-histedit-bookmark-motion.t Thu Oct 05 00:48:44 2017 +0000 +++ b/tests/test-histedit-bookmark-motion.t Thu Oct 05 21:56:25 2017 +0000 @@ -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 -r 6bda8a9d8431 -r 270e344a6c74 tests/test-histedit-commute.t --- a/tests/test-histedit-commute.t Thu Oct 05 00:48:44 2017 +0000 +++ b/tests/test-histedit-commute.t Thu Oct 05 21:56:25 2017 +0000 @@ -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 -r 6bda8a9d8431 -r 270e344a6c74 tests/test-histedit-edit.t --- a/tests/test-histedit-edit.t Thu Oct 05 00:48:44 2017 +0000 +++ b/tests/test-histedit-edit.t Thu Oct 05 21:56:25 2017 +0000 @@ -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 -r 6bda8a9d8431 -r 270e344a6c74 tests/test-histedit-obsolete.t --- a/tests/test-histedit-obsolete.t Thu Oct 05 00:48:44 2017 +0000 +++ b/tests/test-histedit-obsolete.t Thu Oct 05 21:56:25 2017 +0000 @@ -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 -r 6bda8a9d8431 -r 270e344a6c74 tests/test-histedit-outgoing.t --- a/tests/test-histedit-outgoing.t Thu Oct 05 00:48:44 2017 +0000 +++ b/tests/test-histedit-outgoing.t Thu Oct 05 21:56:25 2017 +0000 @@ -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