import: factor out checkexact
The two calls are strictly identical. We can simply move it after the if/else
clause.
--- a/mercurial/commands.py Wed Apr 17 03:41:08 2013 +0200
+++ b/mercurial/commands.py Wed Apr 17 10:22:28 2013 +0200
@@ -3678,7 +3678,6 @@
n = repo.commit(message, opts.get('user') or user,
opts.get('date') or date, match=m,
editor=editor)
- checkexact(repo, n, nodeid)
else:
if opts.get('exact') or opts.get('import_branch'):
branch = branch or 'default'
@@ -3700,9 +3699,9 @@
editor=cmdutil.commiteditor)
repo.savecommitmessage(memctx.description())
n = memctx.commit()
- checkexact(repo, n, nodeid)
finally:
store.close()
+ checkexact(repo, n, nodeid)
if n:
# i18n: refers to a short changeset id
msg = _('created %s') % short(n)