comparison mercurial/hbisect.py @ 14215:e5a59d31bb04

hbisect: use real Booleans instead of 0/1
author Martin Geisler <mg@aragost.com>
date Fri, 06 May 2011 10:02:46 +0200
parents a4fbbe0fbc38
children 01e0091679c0
comparison
equal deleted inserted replaced
14208:d62d597b8974 14215:e5a59d31bb04
52 52
53 if ancestors[badrev] is None: 53 if ancestors[badrev] is None:
54 return badrev, None 54 return badrev, None
55 return badrev, ancestors 55 return badrev, ancestors
56 56
57 good = 0 57 good = False
58 badrev, ancestors = buildancestors(state['bad'], state['good']) 58 badrev, ancestors = buildancestors(state['bad'], state['good'])
59 if not ancestors: # looking for bad to good transition? 59 if not ancestors: # looking for bad to good transition?
60 good = 1 60 good = True
61 badrev, ancestors = buildancestors(state['good'], state['bad']) 61 badrev, ancestors = buildancestors(state['good'], state['bad'])
62 bad = changelog.node(badrev) 62 bad = changelog.node(badrev)
63 if not ancestors: # now we're confused 63 if not ancestors: # now we're confused
64 if len(state['bad']) == 1 and len(state['good']) == 1: 64 if len(state['bad']) == 1 and len(state['good']) == 1:
65 raise util.Abort(_("starting revisions are not directly related")) 65 raise util.Abort(_("starting revisions are not directly related"))