##// END OF EJS Templates
phase: extract the phaseroots serialization in a dedicated method...
Pierre-Yves David -
r22079:5dcc5864 default
parent child Browse files
Show More
@@ -196,11 +196,14 b' class phasecache(object):'
196 return
196 return
197 f = self.opener('phaseroots', 'w', atomictemp=True)
197 f = self.opener('phaseroots', 'w', atomictemp=True)
198 try:
198 try:
199 self._write(f)
200 finally:
201 f.close()
202
203 def _write(self, fp):
199 for phase, roots in enumerate(self.phaseroots):
204 for phase, roots in enumerate(self.phaseroots):
200 for h in roots:
205 for h in roots:
201 f.write('%i %s\n' % (phase, hex(h)))
206 fp.write('%i %s\n' % (phase, hex(h)))
202 finally:
203 f.close()
204 self.dirty = False
207 self.dirty = False
205
208
206 def _updateroots(self, phase, newroots):
209 def _updateroots(self, phase, newroots):
General Comments 0
You need to be logged in to leave comments. Login now