Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
20867:539d9f839197 | 20868:5db105f216c3 |
---|---|
68 self._other = bin(record) | 68 self._other = bin(record) |
69 elif rtype == "F": | 69 elif rtype == "F": |
70 bits = record.split("\0") | 70 bits = record.split("\0") |
71 self._state[bits[0]] = bits[1:] | 71 self._state[bits[0]] = bits[1:] |
72 elif not rtype.islower(): | 72 elif not rtype.islower(): |
73 raise util.Abort(_('unsupported merge state record: %s' | 73 raise util.Abort(_('unsupported merge state record: %s') |
74 % rtype)) | 74 % rtype) |
75 self._dirty = False | 75 self._dirty = False |
76 def _readrecords(self): | 76 def _readrecords(self): |
77 v1records = self._readrecordsv1() | 77 v1records = self._readrecordsv1() |
78 v2records = self._readrecordsv2() | 78 v2records = self._readrecordsv2() |
79 oldv2 = set() # old format version of v2 record | 79 oldv2 = set() # old format version of v2 record |