[PATCH] localrepo: do not lock working directory when not used
Simon Heimberg
simohe at besonet.ch
Wed May 13 14:17:39 CDT 2009
# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1241769473 -7200
# Node ID 0dcba24e21c9a7417a7755d754db1b558b84f039
# Parent 18aed64bca56d02c77ba6eb0c9829a2a17d8899d
localrepo: do not lock working directory when not used
diff -r 18aed64bca56 -r 0dcba24e21c9 mercurial/localrepo.py
--- a/mercurial/localrepo.py Fre Mai 08 09:56:35 2009 +0200
+++ b/mercurial/localrepo.py Fre Mai 08 09:57:53 2009 +0200
@@ -844,15 +844,13 @@
Revision information is passed in the context.memctx argument.
commitctx() does not touch the working directory.
"""
- wlock = lock = None
+ lock = self.lock()
try:
- wlock = self.wlock()
- lock = self.lock()
return self._commitctx(ctx, force=True, force_editor=False,
empty_ok=True, use_dirstate=False,
update_dirstate=False)
finally:
- release(lock, wlock)
+ lock.release()
def _commitctx(self, wctx, force=False, force_editor=False, empty_ok=False,
use_dirstate=True, update_dirstate=True):
More information about the Mercurial-devel
mailing list