diff mercurial/localrepo.py @ 14931:a710936c3037

localrepo: refresh filecache entries after releasing a repo.lock()
author Idan Kamara <idankk86@gmail.com>
date Mon, 25 Jul 2011 15:08:37 +0300
parents 372d9d8b1da4
children d3ac759a6d66
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Jul 25 15:08:37 2011 +0300
+++ b/mercurial/localrepo.py	Mon Jul 25 15:08:37 2011 +0300
@@ -842,7 +842,14 @@
             l.lock()
             return l
 
-        l = self._lock(self.sjoin("lock"), wait, self.store.write,
+        def unlock():
+            self.store.write()
+            for k, ce in self._filecache.items():
+                if k == 'dirstate':
+                    continue
+                ce.refresh()
+
+        l = self._lock(self.sjoin("lock"), wait, unlock,
                        self.invalidate, _('repository %s') % self.origroot)
         self._lockref = weakref.ref(l)
         return l