Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
octobus
mercurial-devel
Commits
e641bb2a6159
Commit
85cea0a9
authored
Nov 17, 2020
by
Martin von Zweigbergk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
errors: raise StateError in `hg bisect`
Differential Revision:
https://phab.mercurial-scm.org/D9337
parent
1a72e4839795
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
mercurial/hbisect.py
mercurial/hbisect.py
+3
-3
tests/test-bisect.t
tests/test-bisect.t
+3
-3
No files found.
mercurial/hbisect.py
View file @
e641bb2a
...
...
@@ -172,13 +172,13 @@ def resetstate(repo):
def
checkstate
(
state
):
"""check we have both 'good' and 'bad' to define a range
Raise
Ab
or
t
exception otherwise."""
Raise
StateErr
or exception otherwise."""
if
state
[
b
'good'
]
and
state
[
b
'bad'
]:
return
True
if
not
state
[
b
'good'
]:
raise
error
.
Ab
or
t
(
_
(
b
'cannot bisect (no known good revisions)'
))
raise
error
.
StateErr
or
(
_
(
b
'cannot bisect (no known good revisions)'
))
else
:
raise
error
.
Ab
or
t
(
_
(
b
'cannot bisect (no known bad revisions)'
))
raise
error
.
StateErr
or
(
_
(
b
'cannot bisect (no known bad revisions)'
))
@
contextlib
.
contextmanager
...
...
tests/test-bisect.t
View file @
e641bb2a
...
...
@@ -364,7 +364,7 @@ test no action
$ hg bisect -r
$ hg bisect
abort: cannot bisect (no known good revisions)
[2
55
]
[2
0
]
reproduce AssertionError, issue1445
...
...
@@ -475,7 +475,7 @@ test bisecting command
$ hg bisect --command
"
\
"
$PYTHON
\"
\"
$TESTTMP
/script.py
\"
and some parameters
"
changeset
31
:
58
c80a7c8a40:
good
abort:
cannot
bisect
(
no
known
bad
revisions
)
[
2
55
]
[
2
0
]
$
hg
up
-
qr 0
$
hg
bisect
--
command
"
\"
$PYTHON
\"
\"
$TESTTMP
/script.py
\"
and some parameters
"
changeset
0
:
b99c7b9c8e11:
bad
...
...
@@ -545,7 +545,7 @@ test the same case, this time with updating
$ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params"
changeset 31:58c80a7c8a40: good
abort: cannot bisect (no known bad revisions)
[2
55
]
[2
0
]
$ hg up -qr 0
$ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params"
changeset 0:b99c7b9c8e11: bad
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment