diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -198,8 +198,8 @@ pypats = [ (r'\s<>\s', '<> operator is not available in Python 3+, use !='), (r'^\s*\t', "don't use tabs"), (r'\S;\s*\n', "semicolon"), - (r'[^_]_\("[^"]+"\s*%', "don't use % inside _()"), - (r"[^_]_\('[^']+'\s*%", "don't use % inside _()"), + (r'[^_]_\("[^"]+"[ \t\n]*%', "don't use % inside _()"), + (r"[^_]_\('[^']+'[ \t\n]*%", "don't use % inside _()"), (r'(\w|\)),\w', "missing whitespace after ,"), (r'(\w|\))[+/*\-<>]\w', "missing whitespace in expression"), (r'^\s+(\w|\.)+=\w[^,()\n]*$', "missing whitespace in assignment"), diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py --- a/hgext/largefiles/lfcommands.py +++ b/hgext/largefiles/lfcommands.py @@ -303,14 +303,14 @@ def _converttags(ui, revmap, data): try: id, name = line.split(' ', 1) except ValueError: - ui.warn(_('skipping incorrectly formatted tag %s\n' - % line)) + ui.warn(_('skipping incorrectly formatted tag %s\n') + % line) continue try: newid = node.bin(id) except TypeError: - ui.warn(_('skipping incorrectly formatted id %s\n' - % id)) + ui.warn(_('skipping incorrectly formatted id %s\n') + % id) continue try: newdata.append('%s %s\n' % (node.hex(revmap[newid]), diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -752,8 +752,8 @@ def bisect(ui, repo, rev=None, extra=Non if not changesets: extendnode = extendbisectrange(nodes, good) if extendnode is not None: - ui.write(_("Extending search to changeset %d:%s\n" - % (extendnode.rev(), extendnode))) + ui.write(_("Extending search to changeset %d:%s\n") + % (extendnode.rev(), extendnode)) state['current'] = [extendnode.node()] hbisect.save_state(repo, state) if noupdate: diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -433,7 +433,7 @@ def clone(ui, peeropts, source, dest=Non if bn == 'default': status = _("updating to bookmark @\n") else: - status = _("updating to bookmark @ on branch %s\n" + status = (_("updating to bookmark @ on branch %s\n") % bn) except KeyError: try: diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -70,8 +70,8 @@ class mergestate(object): 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() diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -321,8 +321,8 @@ def _sanitize(ui, path): for f in names: if f.lower() == 'hgrc': ui.warn( - _("warning: removing potentially hostile .hg/hgrc in '%s'" - % path)) + _("warning: removing potentially hostile .hg/hgrc in '%s'") + % path) os.unlink(os.path.join(dirname, f)) os.walk(path, v, None)