diff mercurial/context.py @ 21992:6be1e1dbe6a0

merge with stable
author Matt Mackall <mpm@selenic.com>
date Mon, 04 Aug 2014 14:32:34 -0500
parents 7e871e771300 48e32c2c499b
children ef0ee0c001bf
line wrap: on
line diff
--- a/mercurial/context.py	Sat May 31 16:48:29 2014 -0700
+++ b/mercurial/context.py	Mon Aug 04 14:32:34 2014 -0500
@@ -1347,8 +1347,10 @@
             try:
                 # updating the dirstate is optional
                 # so we don't wait on the lock
+                # wlock can invalidate the dirstate, so cache normal _after_
+                # taking the lock
+                wlock = self._repo.wlock(False)
                 normal = self._repo.dirstate.normal
-                wlock = self._repo.wlock(False)
                 try:
                     for f in fixup:
                         normal(f)