comparison mercurial/commands.py @ 20237:0d32dd60016c

bisect: --command without --noupdate should flag the parent rev it tested 14913fcb30c6 not only introduced the 'bisect(current)' revset predicate, it also changed how the 'current' revision is used in combination with --command. The new behaviour might be ok for --noupdate where the working directory and its revision shouldn't be used, but it also did that when --command is used to run a command on the currently checked out revision then it could register the test result on the wrong revision. An example: Before, bisect with --command could use the wrong revision when recording the test result: $ hg up -qr 0 $ hg bisect --command "python \"$TESTTMP/script.py\" and some parameters" changeset 31:58c80a7c8a40: bad abort: inconsistent state, 31:58c80a7c8a40 is good and bad Now it works as before and as expected and uses the working directory revision for the --command result: $ hg up -qr 0 $ hg bisect --command "python \"$TESTTMP/script.py\" and some parameters" changeset 0:b99c7b9c8e11: bad ...
author Mads Kiilerich <madski@unity3d.com>
date Sat, 16 Nov 2013 15:46:29 -0500
parents a602d2aca8bf
children 2123d27ff75d
comparison
equal deleted inserted replaced
20236:d0097d5818f9 20237:0d32dd60016c
665 665
666 state = hbisect.load_state(repo) 666 state = hbisect.load_state(repo)
667 667
668 if command: 668 if command:
669 changesets = 1 669 changesets = 1
670 try: 670 if noupdate:
671 node = state['current'][0] 671 try:
672 except LookupError: 672 node = state['current'][0]
673 if noupdate: 673 except LookupError:
674 raise util.Abort(_('current bisect revision is unknown - ' 674 raise util.Abort(_('current bisect revision is unknown - '
675 'start a new bisect to fix')) 675 'start a new bisect to fix'))
676 else:
676 node, p2 = repo.dirstate.parents() 677 node, p2 = repo.dirstate.parents()
677 if p2 != nullid: 678 if p2 != nullid:
678 raise util.Abort(_('current bisect revision is a merge')) 679 raise util.Abort(_('current bisect revision is a merge'))
679 try: 680 try:
680 while changesets: 681 while changesets: