mercurial/context.py
branchstable
changeset 21990 48e32c2c499b
parent 21973 3178e4989202
child 21992 6be1e1dbe6a0
child 22180 17011b36aac7
--- a/mercurial/context.py	Fri Aug 01 18:23:18 2014 -0500
+++ b/mercurial/context.py	Fri Aug 01 18:30:18 2014 -0700
@@ -1341,8 +1341,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)