Mercurial > public > mercurial-scm > hg
comparison mercurial/revlogutils/revlogv0.py @ 47268:9d1a8829f959
revlog: signal which revlog index are compatible with Rust
Otherwise, Rust may treat python object like `cindex` object, leading to
trouble. The new attribute is an integer because I expect we might need a flag
field in the future.
As a start we get the rust code to raise a clear TypeError. We will use the
information in a smarter way in the next changesets.
Differential Revision: https://phab.mercurial-scm.org/D10665
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 04 May 2021 14:16:26 +0200 |
parents | 2b69555e4875 |
children | ac60a1366a49 |
comparison
equal
deleted
inserted
replaced
47267:55d280bc59fa | 47268:9d1a8829f959 |
---|---|
40 raise ValueError(b'unknown revlog index flags') | 40 raise ValueError(b'unknown revlog index flags') |
41 return int(int(offset) << 16 | type) | 41 return int(int(offset) << 16 | type) |
42 | 42 |
43 | 43 |
44 class revlogoldindex(list): | 44 class revlogoldindex(list): |
45 rust_ext_compat = 0 | |
45 entry_size = INDEX_ENTRY_V0.size | 46 entry_size = INDEX_ENTRY_V0.size |
46 null_item = ( | 47 null_item = ( |
47 0, | 48 0, |
48 0, | 49 0, |
49 0, | 50 0, |