Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 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 | bdfb524d728a |
comparison
equal
deleted
inserted
replaced
1806:a2c69737e65e | 1807:f1f43ea22cbf |
---|---|
369 tr.close() | 369 tr.close() |
370 if update_dirstate: | 370 if update_dirstate: |
371 self.dirstate.setparents(n, nullid) | 371 self.dirstate.setparents(n, nullid) |
372 | 372 |
373 def commit(self, files=None, text="", user=None, date=None, | 373 def commit(self, files=None, text="", user=None, date=None, |
374 match=util.always, force=False, wlock=None): | 374 match=util.always, force=False, lock=None, wlock=None): |
375 commit = [] | 375 commit = [] |
376 remove = [] | 376 remove = [] |
377 changed = [] | 377 changed = [] |
378 | 378 |
379 if files: | 379 if files: |
407 | 407 |
408 self.hook("precommit", throw=True, parent1=xp1, parent2=xp2) | 408 self.hook("precommit", throw=True, parent1=xp1, parent2=xp2) |
409 | 409 |
410 if not wlock: | 410 if not wlock: |
411 wlock = self.wlock() | 411 wlock = self.wlock() |
412 l = self.lock() | 412 if not lock: |
413 lock = self.lock() | |
413 tr = self.transaction() | 414 tr = self.transaction() |
414 | 415 |
415 # check in files | 416 # check in files |
416 new = {} | 417 new = {} |
417 linkrev = self.changelog.count() | 418 linkrev = self.changelog.count() |