convert: test clean p2 file missing
216fa1ba9993 introduced "clever" reuse of p2 but did that convert could fail
with
abort: f1@
f73e02ae52c5: not found in manifest!
when it tried to reuse a file from p2 but the file didn't exist there, for
example because filemap changes.
5ca587348875 fixed that (using changes from
a75d24539aba), but with a quite
different reasoning and test case.
Add another test that makes sure this case is covered too.
uescape: also encode non-printable char under 128
We were assuming everything under 128 was printable ascii, but there are a lot
of control characters in that range that can't simply be included in json and
other targets. We forcibly encode everything under 32, because they are either
control char or oddly printable (like tab or line ending).
We also add the hypothesis-powered test that caught this.
testing: add hypothesis fuzz testing
Hypothesis a library for adding fuzzing over a range of structure
data to your test suite: http://hypothesis.readthedocs.org/en/latest/
This adds the ability to build tests using Hypothesis within the Mercurial test
suite. New tests and fixes using this helpers comes in later changesets.
Added signature for changeset
47dd34f2e727
Added tag 3.6 for changeset
47dd34f2e727
i18n: look translation of both "DEPRECATED" and "(DEPRECATED)" up
Since
44cc9f63a2f1, deprecated commands, options and so on are
detected by "(DEPRECATED)" instead of "DEPRECATED".
"hg.pot" generated from recent source files doesn't contain msgid
"DEPRECATED", and looking the translation of "DEPRECATED" up in
up-to-date *.po files works incorrectly.
But on the other hand, there are still old *.po files, which contain
msgid "DEPRECATED" but not "(DEPRECATED)". Looking the translation of
"(DEPRECATED)" up in such old *.po files also works incorrectly.
This patch resolves this problem by looking translation of both
"DEPRECATED" and "(DEPRECATED)" up.
This should work correctly, because previous patch makes "deprecated"
checker be applied only on translations, of which msgid contains exact
"(DEPRECATED)" string.
'p.msgstr' examination in 'deprecatedsetup()' is needed to ignore
untranslated entries. This also makes 'deprecatedpe.msgstr'
examination in 'deprecated()' meaningless.
i18n: fix regexp pattern to detect translation for DEPRECATED
Since
44cc9f63a2f1, deprecated commands, options and so on are
detected by "(DEPRECATED)" instead of "DEPRECATED".
Therefore, 'deprecated' checker in i18n/check-translation.py should
check translation, of which msgid contains "(DEPRECATED)" instead of
"DEPRECATED".
At glance, it seems to do so, but it actually doesn't, because Python
regexp treats "()" as grouping of patterns and "(DEPRECATED)" matches
only against "DEPRECATED".
scmutil: abort if an empty revision is given to revpair()
When using 'extdiff --patch' to check the changes in a rebase, 'precursors(x)'
evaluated to an empty set because I forgot the --hidden flag, so the other
revision was used as the replacement for the empty set. The result was the
patch for the other revision was diffed against itself, and the tool saying
there were no differences. That's misleading since the expected diff args were
silently changed, so it's better to bail out.
The other uses of scmutil.revpair() are commands.diff and commands.status, and
it doesn't make sense to allow an empty revision there either. The code here
was suggested by Yuya Nishihara.
i18n-pt_BR: synchronized with
a9ed5a8fc5e0