Show More
@@ -276,9 +276,11 b' def bisect(ui, repo, rev=None, extra=Non' | |||
|
276 | 276 | As a shortcut, you can also use the revision argument to mark a |
|
277 | 277 | revision as good or bad without checking it out first. |
|
278 | 278 | |
|
279 | If you supply a command it will be used for automatic bisection. Its | |
|
280 |
|
|
|
281 | in case of 0 and bad in any other case). | |
|
279 | If you supply a command it will be used for automatic bisection. Its exit | |
|
280 | status will be used as flag to mark revision as bad or good. In case exit | |
|
281 | status is 0 the revision is marked as good, 125 - skipped, 127 (command not | |
|
282 | found) - bisection will be aborted and any other status bigger than 0 will | |
|
283 | mark revision as bad. | |
|
282 | 284 | """ |
|
283 | 285 | def print_result(nodes, good): |
|
284 | 286 | displayer = cmdutil.show_changeset(ui, repo, {}) |
@@ -328,10 +330,18 b' def bisect(ui, repo, rev=None, extra=Non' | |||
|
328 | 330 | if command: |
|
329 | 331 | changesets = 1 |
|
330 | 332 | while changesets: |
|
331 |
# |
|
|
332 |
status = |
|
|
333 | # update state | |
|
334 | status = os.spawnlp(os.P_WAIT, command) | |
|
333 | 335 | node = repo.lookup(rev or '.') |
|
334 | transition = (status and 'bad' or 'good') | |
|
336 | if status == 125: | |
|
337 | transition = "skip" | |
|
338 | elif status == 0: | |
|
339 | transition = "good" | |
|
340 | # status < 0 means process was killed | |
|
341 | elif status == 127 or status < 0: | |
|
342 | break | |
|
343 | else: | |
|
344 | transition = "bad" | |
|
335 | 345 | state[transition].append(node) |
|
336 | 346 | ui.note(_('Changeset %s: %s\n') % (short(node), transition)) |
|
337 | 347 | check_state(state, interactive=False) |
General Comments 0
You need to be logged in to leave comments.
Login now