branch | stable |
changeset 37815 | 32a75a8a5b0f |
parent 37778 | f10cb49951e1 |
child 37840 | 853001c84114 |
child 38182 | 79c54e7c0c52 |
--- a/mercurial/cmdutil.py Tue Apr 24 08:20:15 2018 -0700 +++ b/mercurial/cmdutil.py Tue Apr 24 21:29:00 2018 +0900 @@ -1537,7 +1537,7 @@ # --exact with --no-commit is still useful in that it does merge # and branch bits ui.warn(_("warning: can't check exact import with --no-commit\n")) - elif opts.get('exact') and hex(n) != nodeid: + elif opts.get('exact') and (not n or hex(n) != nodeid): raise error.Abort(_('patch is damaged or loses information')) msg = _('applied to working directory') if n: