bisect: correct message about aborting an in-progress bisect (issue6527) stable
authorAnton Shestakov <av6@dwimlabs.net>
Mon, 02 Jan 2023 15:27:55 +0400
branchstable
changeset 49829 8ced4ca30ea1
parent 49792 4658f5e67e4e
child 49830 bc59c1e5dd01
bisect: correct message about aborting an in-progress bisect (issue6527) By using a custom cmdhint message here we're avoiding automatic hint generation in _statecheck.hint(), which would suggest 'hg bisect --continue' and 'hg bisect --abort' (neither of which is a valid option). This patch is only fixing the message about in-progress bisect, it doesn't modify the unfinished state checking logic.
mercurial/state.py
tests/test-bisect2.t
--- a/mercurial/state.py	Mon Dec 12 17:49:48 2022 +0400
+++ b/mercurial/state.py	Mon Jan 02 15:27:55 2023 +0400
@@ -366,6 +366,7 @@
     fname=b'bisect.state',
     allowcommit=True,
     reportonly=True,
+    cmdhint=_(b"use 'hg bisect --reset'"),
     statushint=_(
         b'To mark the changeset good:    hg bisect --good\n'
         b'To mark the changeset bad:     hg bisect --bad\n'
--- a/tests/test-bisect2.t	Mon Dec 12 17:49:48 2022 +0400
+++ b/tests/test-bisect2.t	Mon Jan 02 15:27:55 2023 +0400
@@ -794,3 +794,14 @@
   17:228c06deef46
   18:d42e18c7bc9b
   $ hg log -q -r 'bisect(untested)'
+
+in-progress bisect interacts with hg merge (issue6527)
+
+  $ hg up -r 17 -q
+  $ hg merge 7
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ hg merge --abort
+  abort: cannot abort merge with bisect in progress
+  (use 'hg bisect --reset')
+  [20]