Patchwork [1,of,5] import: limit scope of msg in tryimportone

login
register
mail settings
Submitter timeless@mozdev.org
Date Dec. 30, 2015, 10:47 p.m.
Message ID <f17ac521d430b98e46ea.1451515667@waste.org>
Download mbox | patch
Permalink /patch/12427/
State Superseded
Headers show

Comments

timeless@mozdev.org - Dec. 30, 2015, 10:47 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1451509542 0
#      Wed Dec 30 21:05:42 2015 +0000
# Node ID f17ac521d430b98e46ea624320687e411ed8a2ce
# Parent  23541bdd1610c08af247f9c8719045cf247ce541
import: limit scope of msg in tryimportone

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -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)