patch: unify check_binary and binary flags
Follows up
079b27b5a869. If opts.text=True, check_binary is ignored, so we
can just pass the binary flag to unidiff().
perfunidiff now takes any inputs as text files, which I think is a desired
behavior.
fileset: don't abort when running copied() on a revision with a removed file
It looks like AND with any status-y fileset would trigger this, as added() and
removed() also failed. The 4.5-rc revision is a convenient test case, but the
merge isn't necessary.
py3: make sure we open the file in bytes mode
# skip-blame because we are just adding b
Differential Revision: https://phab.mercurial-scm.org/D2077
py3: use bytes instead of str
Differential Revision: https://phab.mercurial-scm.org/D2076
py3: add b'' prefixes to string literals in test files
# skip-blame because we are just adding b''
Differential Revision: https://phab.mercurial-scm.org/D2075
py3: use range instead of xrange
xrange is not available on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2074
py3: use open() instead of file()
file() is not present in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2073
py3: use pycompat.bytestr to convert _b85chars to bytes
The tranformer does append b'' to the value and make that a bytes but bytes in
Python 3 returns the ascii value on getting characters using indexing.
Characters of this string are queried using indexing multiple times in the file
and to support that we use pycompat.bytestr which returns the bytechrs using
indexing.
Differential Revision: https://phab.mercurial-scm.org/D2072
py3: use pycompat.bytechr instead of chr
Differential Revision: https://phab.mercurial-scm.org/D2071