diff mercurial/commandserver.py @ 20627:a42ea6d209e6

localrepo: add hook point to invalidate everything on each command-server run MQ extension will wrap this function to invalidate its state. repo.invalidate cannot be wrapped for this purpose because qpush obtains repo.lock in the middle of the operation, triggering repo.invalidate. Also, it seems wrong to obtain lock earlier because mq data is non-store parts.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 03 Mar 2014 19:41:23 +0900
parents b04cc8651a63
children 5d4606bec54c
line wrap: on
line diff
--- a/mercurial/commandserver.py	Sat Mar 01 20:08:41 2014 -0600
+++ b/mercurial/commandserver.py	Mon Mar 03 19:41:23 2014 +0900
@@ -188,8 +188,7 @@
         repoui = self.repoui.__class__(self.repoui)
         repoui.copy = copiedui.copy # redo copy protection
         self.repo.ui = self.repo.dirstate._ui = repoui
-        self.repo.invalidate()
-        self.repo.invalidatedirstate()
+        self.repo.invalidateall()
 
         req = dispatch.request(args[:], copiedui, self.repo, self.cin,
                                self.cout, self.cerr)