--- a/mercurial/commands.py Wed Apr 17 10:22:28 2013 +0200
+++ b/mercurial/commands.py Wed Apr 17 10:25:14 2013 +0200
@@ -3603,10 +3603,6 @@
wlock = lock = tr = None
msgs = []
- def checkexact(repo, n, nodeid):
- if opts.get('exact') and hex(n) != nodeid:
- raise util.Abort(_('patch is damaged or loses information'))
-
def tryone(ui, hunk, parents):
tmpname, message, user, date, branch, nodeid, p1, p2 = \
patch.extract(ui, hunk)
@@ -3701,7 +3697,8 @@
n = memctx.commit()
finally:
store.close()
- checkexact(repo, n, nodeid)
+ if opts.get('exact') and hex(n) != nodeid:
+ raise util.Abort(_('patch is damaged or loses information'))
if n:
# i18n: refers to a short changeset id
msg = _('created %s') % short(n)