[PATCH] blackbox: fix exception when logging commands with format characters
Durham Goode
durham at fb.com
Fri Mar 1 05:02:11 UTC 2013
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.
________________________________________
From: mercurial-devel-bounces at selenic.com [mercurial-devel-bounces at selenic.com] on behalf of Durham Goode [durham at fb.com]
Sent: Thursday, February 28, 2013 10:15 AM
To: mercurial-devel at selenic.com
Subject: [PATCH] blackbox: fix exception when logging commands with format characters
# HG changeset patch
# User Durham Goode <durham at fb.com>
# Date 1362075146 28800
# Thu Feb 28 10:12:26 2013 -0800
# Node ID adbb2ebc035ecae18b8eaa1777363314d522728d
# Parent 4bfd54a664a497c3a51623c2dc8edba7bbd836a5
blackbox: fix exception when logging commands with format characters
When running commands like 'hg export -o mypatch-%N.patch', the blackbox
would throw an exception because it tried to format %N. This change
prevents it from trying to format the command string.
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
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel at selenic.com
http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list