Patchwork blackbox: fix exception when logging commands with format characters

mail settings
Submitter Durham Goode
Date March 1, 2013, 5:02 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/1065/
State Accepted
Commit 6aca4d1c744ed8f6c1305525ded7590abaa72d06
Headers show


Durham Goode - March 1, 2013, 5:02 a.m.
This patch is the exact same as the other patch email that got sent out.  I sent it again when I thought it was lost due to the server outage.


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -737,7 +737,7 @@ 
         ui.warn(_("warning: --repository ignored\n"))

     msg = ' '.join(' ' in a and repr(a) or a for a in fullargs)
-    ui.log("command", msg + "\n")
+    ui.log("command", '%s\n', msg)
     d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
     starttime = time.time()
     ret = None