comparison mercurial/hbisect.py @ 30389:e124e83fd159

hbisect: avoid shadowing a variable in a list comprehension
author Augie Fackler <augie@google.com>
date Thu, 10 Nov 2016 16:33:23 -0500
parents 755730fc1e48
children fd8b6b183073
comparison
equal deleted inserted replaced
30388:8819b63732b9 30389:e124e83fd159
96 # have we narrowed it down to one entry? 96 # have we narrowed it down to one entry?
97 # or have all other possible candidates besides 'bad' have been skipped? 97 # or have all other possible candidates besides 'bad' have been skipped?
98 tot = len(candidates) 98 tot = len(candidates)
99 unskipped = [c for c in candidates if (c not in skip) and (c != badrev)] 99 unskipped = [c for c in candidates if (c not in skip) and (c != badrev)]
100 if tot == 1 or not unskipped: 100 if tot == 1 or not unskipped:
101 return ([changelog.node(rev) for rev in candidates], 0, good) 101 return ([changelog.node(c) for c in candidates], 0, good)
102 perfect = tot // 2 102 perfect = tot // 2
103 103
104 # find the best node to test 104 # find the best node to test
105 best_rev = None 105 best_rev = None
106 best_len = -1 106 best_len = -1