--- 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