mercurial/dirstate.py
changeset 18317 365fecd984c7
parent 18078 3d1dc7aeca39
child 18567 194e63c1ccb9
equal deleted inserted replaced
18316:f36375576ed5 18317:365fecd984c7
   263         self._branch = encoding.fromlocal(branch)
   263         self._branch = encoding.fromlocal(branch)
   264         f = self._opener('branch', 'w', atomictemp=True)
   264         f = self._opener('branch', 'w', atomictemp=True)
   265         try:
   265         try:
   266             f.write(self._branch + '\n')
   266             f.write(self._branch + '\n')
   267             f.close()
   267             f.close()
       
   268 
       
   269             # make sure filecache has the correct stat info for _branch after
       
   270             # replacing the underlying file
       
   271             ce = self._filecache['_branch']
       
   272             if ce:
       
   273                 ce.refresh()
   268         except: # re-raises
   274         except: # re-raises
   269             f.discard()
   275             f.discard()
   270             raise
   276             raise
   271 
   277 
   272     def _read(self):
   278     def _read(self):