[PATCH 3 of 5] change the dirstate wlock pattern in localrepo
Ronny Pfannschmidt
Ronny.Pfannschmidt at gmx.de
Mon Apr 20 19:50:12 UTC 2009
# HG changeset patch
# User Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
# Date 1240241188 -7200
# Node ID 768019c4b2e7c17b131101f18b6c6ce8b77db9d6
# Parent aee011f2a76109d880378879fa9d915e35eca6ad
change the dirstate wlock pattern in localrepo
the lock pattern in this loop was pretty weird and would mess up recursive
locking
i don't understand the orginal reason for doing it this way
diff -r aee011f2a761 -r 768019c4b2e7 mercurial/localrepo.py
--- a/mercurial/localrepo.py Mon Apr 20 17:26:28 2009 +0200
+++ b/mercurial/localrepo.py Mon Apr 20 17:26:28 2009 +0200
@@ -1065,17 +1065,12 @@ class localrepository(repo.repository):
# update dirstate for files that are actually clean
if fixup:
- wlock = None
+ wlock = self.wlock()
try:
- try:
- wlock = self.wlock(False)
- for f in fixup:
- self.dirstate.normal(f)
- except error.LockError:
- pass
+ for f in fixup:
+ self.dirstate.normal(f)
finally:
- if wlock is not None:
- wlock.release()
+ wlock.release()
if not parentworking:
mf1 = mfmatches(ctx1)
More information about the Mercurial-devel
mailing list