Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 8715:8c667f4c482e
commit: move some setup outside the lock
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 04 Jun 2009 16:21:03 -0500 |
parents | dd3ebf81af43 |
children | f037187a6f68 |
line wrap: on
line diff
--- 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