changeset 1807:f1f43ea22cbf

Allow repo lock to be passed in to localrepo.commit for performance
author mason@suse.com
date Tue, 28 Feb 2006 12:25:10 -0600
parents a2c69737e65e
children 7036cd7f770d
files mercurial/localrepo.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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