import: limit scope of msg in tryimportone
authortimeless <timeless@mozdev.org>
Wed, 30 Dec 2015 21:05:42 +0000
changeset 27611 fa8c491f2deb
parent 27610 b8405d739149
child 27612 a0dfe8d286fe
import: limit scope of msg in tryimportone
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Sat Jan 02 02:13:56 2016 +0100
+++ b/mercurial/cmdutil.py	Wed Dec 30 21:05:42 2015 +0000
@@ -883,7 +883,6 @@
     sim = float(opts.get('similarity') or 0)
     if not tmpname:
         return (None, None, False)
-    msg = _('applied to working directory')
 
     rejects = False
 
@@ -1009,6 +1008,7 @@
             ui.warn(_("warning: can't check exact import with --no-commit\n"))
         elif opts.get('exact') and hex(n) != nodeid:
             raise error.Abort(_('patch is damaged or loses information'))
+        msg = _('applied to working directory')
         if n:
             # i18n: refers to a short changeset id
             msg = _('created %s') % short(n)