Mercurial > hg
changeset 19025:3af92401efb3
import: factor out checkexact
The two calls are strictly identical. We can simply move it after the if/else
clause.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Wed, 17 Apr 2013 10:22:28 +0200 |
parents | ab04e87a5f3b |
children | 1dc393614e61 |
files | mercurial/commands.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)