Patchwork [3,of,5,STABLE,V2] obsolete: add '%' specifier to the format string to avoid TypeError at runtime

login
register
mail settings
Submitter Katsunori FUJIWARA
Date April 15, 2014, 6:12 p.m.
Message ID <90d3ab077aa7a5192eeb.1397585551@juju>
Download mbox | patch
Permalink /patch/4378/
State Accepted
Commit 399d7770eef2598d71dc31ac95cd22dde4488747
Headers show

Comments

Katsunori FUJIWARA - April 15, 2014, 6:12 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1397585100 -32400
#      Wed Apr 16 03:05:00 2014 +0900
# Branch stable
# Node ID 90d3ab077aa7a5192eeb0cdaf9d9e4228fbb7cb8
# Parent  4bd7437852c4736c0181d272ee410669034cc906
obsolete: add '%' specifier to the format string to avoid TypeError at runtime

Mapping operation on the format string not including any '%'
specifiers causes TypeError at runtime.
Matt Mackall - April 17, 2014, 3:58 p.m.
On Wed, 2014-04-16 at 03:12 +0900, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
> # Date 1397585100 -32400
> #      Wed Apr 16 03:05:00 2014 +0900
> # Branch stable
> # Node ID 90d3ab077aa7a5192eeb0cdaf9d9e4228fbb7cb8
> # Parent  4bd7437852c4736c0181d272ee410669034cc906
> obsolete: add '%' specifier to the format string to avoid TypeError at runtime

I've queued the first three for default, thanks.

Patch

diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -369,7 +369,7 @@ 
         repo.ui.warn(_('unknown key: %r') % key)
         return 0
     if old:
-        repo.ui.warn(_('unexpected old value') % key)
+        repo.ui.warn(_('unexpected old value for %r') % key)
         return 0
     data = base85.b85decode(new)
     lock = repo.lock()