[PATCH 09 of 10 v2] dirstate: refresh _branch cache entry after writing it
Idan Kamara
idankk86 at gmail.com
Thu Jan 10 16:10:56 CST 2013
# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1355682780 -7200
# Node ID 1aa000c079722a59fb6a83f22f8a7dc513aee912
# Parent c3254334bda6da3aed066b3208fe4d63427dce2c
dirstate: refresh _branch cache entry after writing it
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -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
More information about the Mercurial-devel
mailing list