diff --git a/hgext/histedit.py b/hgext/histedit.py index 51a350a22d0c8f8c85801d1782fd08f953676e1a_aGdleHQvaGlzdGVkaXQucHk=..fad30cb9857984e4cf3bacb1dc91a89b050d75cc_aGdleHQvaGlzdGVkaXQucHk= 100644 --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -2348,6 +2348,21 @@ return state +def hgcontinuehistedit(ui, repo): + fm = ui.formatter(b'continue', {}) + fm.startitem() + + state = histeditstate(repo) + with repo.wlock() as wlock, repo.lock() as lock: + state.wlock = wlock + state.lock = lock + state.read() + state = bootstrapcontinue(ui, state, None) + _continuehistedit(ui, repo, state) + _finishhistedit(ui, repo, state, fm) + fm.end() + + def between(repo, old, new, keep): """select and validate the set of revision to edit @@ -2683,4 +2698,5 @@ allowcommit=True, continueflag=True, abortfunc=hgaborthistedit, + continuefunc=hgcontinuehistedit, ) diff --git a/tests/test-histedit-arguments.t b/tests/test-histedit-arguments.t index 51a350a22d0c8f8c85801d1782fd08f953676e1a_dGVzdHMvdGVzdC1oaXN0ZWRpdC1hcmd1bWVudHMudA==..fad30cb9857984e4cf3bacb1dc91a89b050d75cc_dGVzdHMvdGVzdC1oaXN0ZWRpdC1hcmd1bWVudHMudA== 100644 --- a/tests/test-histedit-arguments.t +++ b/tests/test-histedit-arguments.t @@ -163,7 +163,7 @@ $ echo alpha >> alpha $ mv .hg/histedit-state.back .hg/histedit-state - $ hg histedit --continue + $ hg continue saved backup bundle to $TESTTMP/foo/.hg/strip-backup/08d98a8350f3-02594089-histedit.hg $ hg log -G -T '{rev} {shortest(node)} {desc}\n' -r 2:: @ 4 f5ed five diff --git a/tests/test-histedit-base.t b/tests/test-histedit-base.t index 51a350a22d0c8f8c85801d1782fd08f953676e1a_dGVzdHMvdGVzdC1oaXN0ZWRpdC1iYXNlLnQ=..fad30cb9857984e4cf3bacb1dc91a89b050d75cc_dGVzdHMvdGVzdC1oaXN0ZWRpdC1iYXNlLnQ= 100644 --- a/tests/test-histedit-base.t +++ b/tests/test-histedit-base.t @@ -183,7 +183,7 @@ $ hg resolve --mark B (no more unresolved files) continue: hg histedit --continue - $ hg histedit --continue | fixbundle + $ hg continue | fixbundle $ hg tglog @ 6:03772da75548bb42a8f1eacd8c91d0717a147fcd:draft 'X' | diff --git a/tests/test-histedit-edit.t b/tests/test-histedit-edit.t index 51a350a22d0c8f8c85801d1782fd08f953676e1a_dGVzdHMvdGVzdC1oaXN0ZWRpdC1lZGl0LnQ=..fad30cb9857984e4cf3bacb1dc91a89b050d75cc_dGVzdHMvdGVzdC1oaXN0ZWRpdC1lZGl0LnQ= 100644 --- a/tests/test-histedit-edit.t +++ b/tests/test-histedit-edit.t @@ -264,7 +264,7 @@ (test also that editor is invoked if histedit is continued for "edit" action) - $ HGEDITOR='cat' hg histedit --continue + $ HGEDITOR='cat' hg continue f @@ -441,7 +441,7 @@ Editing (cb9a9f314b8b), commit as needed now to split the change (to edit cb9a9f314b8b, `hg histedit --continue` after making changes) [240] - $ HGEDITOR=true hg histedit --continue + $ HGEDITOR=true hg continue saved backup bundle to $TESTTMP/r0/.hg/strip-backup/cb9a9f314b8b-cc5ccb0b-histedit.hg $ hg log -G diff --git a/tests/test-histedit-fold-non-commute.t b/tests/test-histedit-fold-non-commute.t index 51a350a22d0c8f8c85801d1782fd08f953676e1a_dGVzdHMvdGVzdC1oaXN0ZWRpdC1mb2xkLW5vbi1jb21tdXRlLnQ=..fad30cb9857984e4cf3bacb1dc91a89b050d75cc_dGVzdHMvdGVzdC1oaXN0ZWRpdC1mb2xkLW5vbi1jb21tdXRlLnQ= 100644 --- a/tests/test-histedit-fold-non-commute.t +++ b/tests/test-histedit-fold-non-commute.t @@ -130,7 +130,7 @@ (no more unresolved files) continue: hg histedit --continue $ hg diff - $ hg histedit --continue 2>&1 | fixbundle + $ hg continue 2>&1 | fixbundle 7f3755409b00: skipping changeset (no changes) log after edit @@ -269,7 +269,7 @@ $ hg resolve --mark e (no more unresolved files) continue: hg histedit --continue - $ hg histedit --continue 2>&1 | fixbundle + $ hg continue 2>&1 | fixbundle 7f3755409b00: skipping changeset (no changes) log after edit diff --git a/tests/test-histedit-fold.t b/tests/test-histedit-fold.t index 51a350a22d0c8f8c85801d1782fd08f953676e1a_dGVzdHMvdGVzdC1oaXN0ZWRpdC1mb2xkLnQ=..fad30cb9857984e4cf3bacb1dc91a89b050d75cc_dGVzdHMvdGVzdC1oaXN0ZWRpdC1mb2xkLnQ= 100644 --- a/tests/test-histedit-fold.t +++ b/tests/test-histedit-fold.t @@ -378,7 +378,7 @@ $ hg commit -m '+5.2' created new head $ echo 6 >> file - $ HGEDITOR=cat hg histedit --continue + $ HGEDITOR=cat hg continue +4 *** +5.2 diff --git a/tests/test-histedit-non-commute.t b/tests/test-histedit-non-commute.t index 51a350a22d0c8f8c85801d1782fd08f953676e1a_dGVzdHMvdGVzdC1oaXN0ZWRpdC1ub24tY29tbXV0ZS50..fad30cb9857984e4cf3bacb1dc91a89b050d75cc_dGVzdHMvdGVzdC1oaXN0ZWRpdC1ub24tY29tbXV0ZS50 100644 --- a/tests/test-histedit-non-commute.t +++ b/tests/test-histedit-non-commute.t @@ -161,7 +161,7 @@ (hg histedit --continue to resume) We forcibly enable curses here so we can verify that continuing works with curses enabled. - $ hg histedit --continue --config ui.interactive=true \ + $ hg continue --config ui.interactive=true \ > --config ui.interface=curses 2>&1 | fixbundle abort: unresolved merge conflicts (see 'hg help resolve') @@ -176,7 +176,7 @@ $ hg resolve --mark e (no more unresolved files) continue: hg histedit --continue - $ hg histedit --continue 2>&1 | fixbundle + $ hg continue 2>&1 | fixbundle 7b4e2f4b7bcd: skipping changeset (no changes) log after edit @@ -258,7 +258,7 @@ $ hg resolve --mark e (no more unresolved files) continue: hg histedit --continue - $ hg histedit --continue 2>&1 | fixbundle + $ hg continue 2>&1 | fixbundle 7b4e2f4b7bcd: skipping changeset (no changes) post message fix diff --git a/tests/test-histedit-obsolete.t b/tests/test-histedit-obsolete.t index 51a350a22d0c8f8c85801d1782fd08f953676e1a_dGVzdHMvdGVzdC1oaXN0ZWRpdC1vYnNvbGV0ZS50..fad30cb9857984e4cf3bacb1dc91a89b050d75cc_dGVzdHMvdGVzdC1oaXN0ZWRpdC1vYnNvbGV0ZS50 100644 --- a/tests/test-histedit-obsolete.t +++ b/tests/test-histedit-obsolete.t @@ -80,7 +80,7 @@ $ hg commit --amend -X . -m XXXXXX $ hg commit --amend -X . -m b2 $ hg --hidden --config extensions.strip= strip 'desc(XXXXXX)' --no-backup - $ hg histedit --continue + $ hg continue $ hg log -G @ 8:273c1f3b8626 c | @@ -363,7 +363,7 @@ (to edit b449568bf7fc, `hg histedit --continue` after making changes) [240] $ echo f >> f - $ hg histedit --continue + $ hg continue $ hg log -G @ 24:12e89af74238 (secret) k | @@ -569,7 +569,7 @@ Editing (ee118ab9fa44), commit as needed now to split the change (to edit ee118ab9fa44, `hg histedit --continue` after making changes) [240] - $ hg histedit --continue --config experimental.evolution.track-operation=1 + $ hg continue --config experimental.evolution.track-operation=1 $ hg log -G @ 23:175d6b286a22 (secret) k |