##// END OF EJS Templates
bisect: use proper locking when updating bisect.state
Matt Mackall -
r5738:2a54e2b1 default
parent child Browse files
Show More
@@ -132,10 +132,15 b' the problem-free state "bad" and the pro'
132 state['skip'].append(node)
132 state['skip'].append(node)
133
133
134 # save state
134 # save state
135 f = repo.opener("bisect.state", "w")
135 f = repo.opener("bisect.state", "w", atomictemp=True)
136 for kind in state:
136 wlock = repo.wlock()
137 for node in state[kind]:
137 try:
138 f.write("%s %s\n" % (kind, hg.hex(node)))
138 for kind in state:
139 for node in state[kind]:
140 f.write("%s %s\n" % (kind, hg.hex(node)))
141 f.rename()
142 finally:
143 del wlock
139
144
140 if not state['good'] or not state['bad']:
145 if not state['good'] or not state['bad']:
141 return
146 return
General Comments 0
You need to be logged in to leave comments. Login now