mercurial/cmdutil.py
changeset 22485 efedda4aed49
parent 22427 bd15932846a4
child 22488 6c52ed3f888e
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)