[PATCH] localrepo: do not lock working directory when not used

Simon Heimberg simohe at besonet.ch
Fri May 8 03:19:18 CDT 2009


# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1241769473 -7200
# Node ID b41ce5fc6ed3cfff8906397af198281766c33f79
# Parent  6a322b8eb548f3b8805e21efd70d4530dd7af3ae
localrepo: do not lock working directory when not used

diff -r 6a322b8eb548 -r b41ce5fc6ed3 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,14 @@
         Revision information is passed in the context.memctx argument.
         commitctx() does not touch the working directory.
         """
-        wlock = lock = None
+        lock = None
         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)
+            release(lock)
 
     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