changeset 27611:fa8c491f2deb

import: limit scope of msg in tryimportone
author timeless <timeless@mozdev.org>
date Wed, 30 Dec 2015 21:05:42 +0000
parents b8405d739149
children a0dfe8d286fe
files mercurial/cmdutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)