##// END OF EJS Templates
dirstate: write branch file atomically
Idan Kamara -
r16472:14a4e17f stable
parent child Browse files
Show More
@@ -244,7 +244,11 b' class dirstate(object):'
244 if branch in ['tip', '.', 'null']:
244 if branch in ['tip', '.', 'null']:
245 raise util.Abort(_('the name \'%s\' is reserved') % branch)
245 raise util.Abort(_('the name \'%s\' is reserved') % branch)
246 self._branch = encoding.fromlocal(branch)
246 self._branch = encoding.fromlocal(branch)
247 self._opener.write("branch", self._branch + '\n')
247 f = self._opener('branch', 'w', atomictemp=True)
248 try:
249 f.write(self._branch + '\n')
250 finally:
251 f.close()
248
252
249 def _read(self):
253 def _read(self):
250 self._map = {}
254 self._map = {}
General Comments 0
You need to be logged in to leave comments. Login now