##// END OF EJS Templates
dirstate: don't rename branch file if writing it failed
Idan Kamara -
r18076:3bc21f6d stable
parent child Browse files
Show More
@@ -265,8 +265,10 b' class dirstate(object):'
265 f = self._opener('branch', 'w', atomictemp=True)
265 f = self._opener('branch', 'w', atomictemp=True)
266 try:
266 try:
267 f.write(self._branch + '\n')
267 f.write(self._branch + '\n')
268 finally:
269 f.close()
268 f.close()
269 except: # re-raises
270 f.discard()
271 raise
270
272
271 def _read(self):
273 def _read(self):
272 self._map = {}
274 self._map = {}
General Comments 0
You need to be logged in to leave comments. Login now