Allow repo lock to be passed in to localrepo.commit for performance
authormason@suse.com
Tue, 28 Feb 2006 12:25:10 -0600
changeset 1807 f1f43ea22cbf
parent 1806 a2c69737e65e
child 1808 7036cd7f770d
Allow repo lock to be passed in to localrepo.commit for performance
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Tue Feb 28 12:24:54 2006 -0600
+++ b/mercurial/localrepo.py	Tue Feb 28 12:25:10 2006 -0600
@@ -371,7 +371,7 @@
             self.dirstate.setparents(n, nullid)
 
     def commit(self, files=None, text="", user=None, date=None,
-               match=util.always, force=False, wlock=None):
+               match=util.always, force=False, lock=None, wlock=None):
         commit = []
         remove = []
         changed = []
@@ -409,7 +409,8 @@
 
         if not wlock:
             wlock = self.wlock()
-        l = self.lock()
+        if not lock:
+            lock = self.lock()
         tr = self.transaction()
 
         # check in files