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

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Tue Apr 15 13:12:31 CDT 2014


# HG changeset patch
# User FUJIWARA Katsunori <foozy at 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.

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()


More information about the Mercurial-devel mailing list