Mercurial > hg
comparison mercurial/commands.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 | 03774a2b6991 |
children | 6500a2eebee8 e01cff65f4c5 |
comparison
equal
deleted
inserted
replaced
20867:539d9f839197 | 20868:5db105f216c3 |
---|---|
750 nodes, changesets, good = hbisect.bisect(repo.changelog, state) | 750 nodes, changesets, good = hbisect.bisect(repo.changelog, state) |
751 if extend: | 751 if extend: |
752 if not changesets: | 752 if not changesets: |
753 extendnode = extendbisectrange(nodes, good) | 753 extendnode = extendbisectrange(nodes, good) |
754 if extendnode is not None: | 754 if extendnode is not None: |
755 ui.write(_("Extending search to changeset %d:%s\n" | 755 ui.write(_("Extending search to changeset %d:%s\n") |
756 % (extendnode.rev(), extendnode))) | 756 % (extendnode.rev(), extendnode)) |
757 state['current'] = [extendnode.node()] | 757 state['current'] = [extendnode.node()] |
758 hbisect.save_state(repo, state) | 758 hbisect.save_state(repo, state) |
759 if noupdate: | 759 if noupdate: |
760 return | 760 return |
761 cmdutil.bailifchanged(repo) | 761 cmdutil.bailifchanged(repo) |