[PATCH 10 of 12] dirstate: refresh _branch cache entry after writing it
Idan Kamara
idankk86 at gmail.com
Mon Dec 17 15:35:35 UTC 2012
# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1355682780 -7200
# Branch stable
# Node ID 9157ffe3d66d41bb7ea3cfa062d775a87731206a
# Parent 5046f500886a30970f1b7e40db9a372b51055748
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
@@ -266,6 +266,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