comparison mercurial/cmdutil.py @ 22485:efedda4aed49

import: let --exact 'work' with --no-commit (issue4376)
author Matt Mackall <mpm@selenic.com>
date Fri, 19 Sep 2014 14:51:58 -0500
parents bd15932846a4
children 6c52ed3f888e
comparison
equal deleted inserted replaced
22484:2b5940f64750 22485:efedda4aed49
725 branch, files, store, 725 branch, files, store,
726 editor=editor) 726 editor=editor)
727 n = memctx.commit() 727 n = memctx.commit()
728 finally: 728 finally:
729 store.close() 729 store.close()
730 if opts.get('exact') and hex(n) != nodeid: 730 if opts.get('exact') and opts.get('no_commit'):
731 # --exact with --no-commit is still useful in that it does merge
732 # and branch bits
733 ui.warn(_("warning: can't check exact import with --no-commit\n"))
734 elif opts.get('exact') and hex(n) != nodeid:
731 raise util.Abort(_('patch is damaged or loses information')) 735 raise util.Abort(_('patch is damaged or loses information'))
732 if n: 736 if n:
733 # i18n: refers to a short changeset id 737 # i18n: refers to a short changeset id
734 msg = _('created %s') % short(n) 738 msg = _('created %s') % short(n)
735 return (msg, n, rejects) 739 return (msg, n, rejects)