mercurial/dirstate.py
changeset 18317 365fecd984c7
parent 18078 3d1dc7aeca39
child 18567 194e63c1ccb9
--- a/mercurial/dirstate.py	Mon Dec 17 15:25:45 2012 +0200
+++ b/mercurial/dirstate.py	Sun Dec 16 20:33:00 2012 +0200
@@ -265,6 +265,12 @@
         try:
             f.write(self._branch + '\n')
             f.close()
+
+            # make sure filecache has the correct stat info for _branch after
+            # replacing the underlying file
+            ce = self._filecache['_branch']
+            if ce:
+                ce.refresh()
         except: # re-raises
             f.discard()
             raise