equal
deleted
inserted
replaced
170 |
170 |
171 |
171 |
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 |
185 def restore_state(repo, state, node): |
185 def restore_state(repo, state, node): |
186 try: |
186 try: |