diff mercurial/merge.py @ 20868:5db105f216c3 stable

i18n: fix "% inside _()" problems Before this patch, "contrib/check-code.py" can't detect these problems, because the regexp pattern to detect "% inside _()" doesn't suppose the case that the format string and "%" aren't placed in the same line. This patch replaces "\s" in that regexp pattern with "[ \t\n]" to detect "% inside _()" problems in such case. "[\s\n]" can't be used in this purpose, because "\s" is automatically replaced with "[ \t]" by "_preparepats()" and "\s" in "[]" causes nested "[]" unexpectedly.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Tue, 01 Apr 2014 02:46:03 +0900
parents 539d9f839197
children 6500a2eebee8
line wrap: on
line diff
--- a/mercurial/merge.py	Tue Apr 01 02:46:03 2014 +0900
+++ b/mercurial/merge.py	Tue Apr 01 02:46:03 2014 +0900
@@ -70,8 +70,8 @@
                 bits = record.split("\0")
                 self._state[bits[0]] = bits[1:]
             elif not rtype.islower():
-                raise util.Abort(_('unsupported merge state record: %s'
-                                   % rtype))
+                raise util.Abort(_('unsupported merge state record: %s')
+                                   % rtype)
         self._dirty = False
     def _readrecords(self):
         v1records = self._readrecordsv1()