# HG changeset patch # User Pierre-Yves David # Date 1366187114 -7200 # Node ID 1dc393614e61beba91bd1e42f7174b317c059f21 # Parent 3af92401efb32d713a6ab9f905ef19c6911b8a5e import: inline checkexact function We have a sngle call now, no need to make it a function. diff -r 3af92401efb3 -r 1dc393614e61 mercurial/commands.py --- 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)