##// END OF EJS Templates
errors: raise StateError in `hg bisect`...
Martin von Zweigbergk -
r46487:e641bb2a default
parent child Browse files
Show More
@@ -172,13 +172,13 b' def resetstate(repo):'
172 def checkstate(state):
172 def checkstate(state):
173 """check we have both 'good' and 'bad' to define a range
173 """check we have both 'good' and 'bad' to define a range
174
174
175 Raise Abort exception otherwise."""
175 Raise StateError exception otherwise."""
176 if state[b'good'] and state[b'bad']:
176 if state[b'good'] and state[b'bad']:
177 return True
177 return True
178 if not state[b'good']:
178 if not state[b'good']:
179 raise error.Abort(_(b'cannot bisect (no known good revisions)'))
179 raise error.StateError(_(b'cannot bisect (no known good revisions)'))
180 else:
180 else:
181 raise error.Abort(_(b'cannot bisect (no known bad revisions)'))
181 raise error.StateError(_(b'cannot bisect (no known bad revisions)'))
182
182
183
183
184 @contextlib.contextmanager
184 @contextlib.contextmanager
@@ -364,7 +364,7 b' test no action'
364 $ hg bisect -r
364 $ hg bisect -r
365 $ hg bisect
365 $ hg bisect
366 abort: cannot bisect (no known good revisions)
366 abort: cannot bisect (no known good revisions)
367 [255]
367 [20]
368
368
369
369
370 reproduce AssertionError, issue1445
370 reproduce AssertionError, issue1445
@@ -475,7 +475,7 b' test bisecting command'
475 $ hg bisect --command "\"$PYTHON\" \"$TESTTMP/script.py\" and some parameters"
475 $ hg bisect --command "\"$PYTHON\" \"$TESTTMP/script.py\" and some parameters"
476 changeset 31:58c80a7c8a40: good
476 changeset 31:58c80a7c8a40: good
477 abort: cannot bisect (no known bad revisions)
477 abort: cannot bisect (no known bad revisions)
478 [255]
478 [20]
479 $ hg up -qr 0
479 $ hg up -qr 0
480 $ hg bisect --command "\"$PYTHON\" \"$TESTTMP/script.py\" and some parameters"
480 $ hg bisect --command "\"$PYTHON\" \"$TESTTMP/script.py\" and some parameters"
481 changeset 0:b99c7b9c8e11: bad
481 changeset 0:b99c7b9c8e11: bad
@@ -545,7 +545,7 b' test the same case, this time with updat'
545 $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params"
545 $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params"
546 changeset 31:58c80a7c8a40: good
546 changeset 31:58c80a7c8a40: good
547 abort: cannot bisect (no known bad revisions)
547 abort: cannot bisect (no known bad revisions)
548 [255]
548 [20]
549 $ hg up -qr 0
549 $ hg up -qr 0
550 $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params"
550 $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params"
551 changeset 0:b99c7b9c8e11: bad
551 changeset 0:b99c7b9c8e11: bad
General Comments 0
You need to be logged in to leave comments. Login now