##// END OF EJS Templates
rust: configure MSRV in Clippy...
rust: configure MSRV in Clippy This setting makes Clippy never apply lints that are meant for later versions. In case the target precise toolchain is the one running, it does not make a difference, but this gives us a machine-parseable specification that is pretty standard. The README and `hg help rust` are updated to state that `clippy.toml` is the single source of truth about that, also lifting a minor ambiguity: it is fine if the MSRV is lagging behind the version in Debian testing.

File last commit:

r49730:6000f5b2 default
r51283:b88e9c70 default
Show More
revlog.py
37 lines | 1.6 KiB | text/x-python | PythonLexer
test: extract some generic data and utility from test-rust-ancestor.py...
r44397 import unittest
# picked from test-parse-index2, copied rather than imported
# so that it stays stable even if test-parse-index2 changes or disappears.
data_non_inlined = (
b'\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01D\x19'
b'\x00\x07e\x12\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff'
b'\xff\xff\xff\xff\xd1\xf4\xbb\xb0\xbe\xfc\x13\xbd\x8c\xd3\x9d'
b'\x0f\xcd\xd9;\x8c\x07\x8cJ/\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x00\x01D\x19\x00\x00\x00\x00\x00\xdf\x00'
b'\x00\x01q\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\xff'
b'\xff\xff\xff\xc1\x12\xb9\x04\x96\xa4Z1t\x91\xdfsJ\x90\xf0\x9bh'
b'\x07l&\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'\x00\x01D\xf8\x00\x00\x00\x00\x01\x1b\x00\x00\x01\xb8\x00\x00'
b'\x00\x01\x00\x00\x00\x02\x00\x00\x00\x01\xff\xff\xff\xff\x02\n'
b'\x0e\xc6&\xa1\x92\xae6\x0b\x02i\xfe-\xe5\xbao\x05\xd1\xe7\x00'
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01F'
b'\x13\x00\x00\x00\x00\x01\xec\x00\x00\x03\x06\x00\x00\x00\x01'
b'\x00\x00\x00\x03\x00\x00\x00\x02\xff\xff\xff\xff\x12\xcb\xeby1'
b'\xb6\r\x98B\xcb\x07\xbd`\x8f\x92\xd9\xc4\x84\xbdK\x00\x00\x00'
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00'
)
try:
Matt Harbison
typing: disable import error warnings that are already handled...
r47543 from ..cext import parsers as cparsers # pytype: disable=import-error
test: extract some generic data and utility from test-rust-ancestor.py...
r44397 except ImportError:
cparsers = None
@unittest.skipIf(
cparsers is None,
'The C version of the "parsers" module is not available. It is needed for this test.',
)
class RevlogBasedTestBase(unittest.TestCase):
def parseindex(self):
return cparsers.parse_index2(data_non_inlined, False)[0]