Patchwork blackbox: fix exception when logging commands with format characters

login
register
mail settings
Submitter Durham Goode
Date March 1, 2013, 5:02 a.m.
Message ID <2B10A89294DA6740AC6155F56842F9CE081C9C46@PRN-MBX02-2.TheFacebook.com>
Download mbox | patch
Permalink /patch/1065/
State Accepted
Commit 6aca4d1c744ed8f6c1305525ded7590abaa72d06
Headers show

Comments

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.

Patch

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