# HG changeset patch # User Matt Mackall # Date 1244150463 18000 # Node ID 8c667f4c482eb5266394090a7e5741df50bbd49b # Parent 505a96cbc9237f28a31a657a05e5d23c5dcb71a6 commit: move some setup outside the lock diff -r 505a96cbc923 -r 8c667f4c482e mercurial/localrepo.py --- a/mercurial/localrepo.py Thu Jun 04 21:23:31 2009 +0900 +++ b/mercurial/localrepo.py Thu Jun 04 16:21:03 2009 -0500 @@ -782,6 +782,17 @@ supplied, it is called to get a commit message. """ + def fail(f, msg): + raise util.Abort('%s: %s' % (f, msg)) + + if not match: + match = match_.always(self.root, '') + + if not force: + vdirs = [] + match.dir = vdirs.append + match.bad = fail + wlock = self.wlock() try: p1, p2 = self.dirstate.parents() @@ -791,17 +802,6 @@ raise util.Abort(_('cannot partially commit a merge ' '(do not specify files or patterns)')) - def fail(f, msg): - raise util.Abort('%s: %s' % (f, msg)) - - if not match: - match = match_.always(self.root, '') - - if not force: - vdirs = [] - match.dir = vdirs.append - match.bad = fail - changes = self.status(match=match, clean=force) if force: changes[0].extend(changes[6]) # mq may commit unchanged files