Mercurial > hg
diff mercurial/pure/parsers.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 | 55d280bc59fa |
children | 25ce16bf724b |
line wrap: on
line diff
--- a/mercurial/pure/parsers.py Tue May 04 11:19:48 2021 +0200 +++ b/mercurial/pure/parsers.py Tue May 04 14:16:26 2021 +0200 @@ -47,6 +47,8 @@ class BaseIndexObject(object): + # Can I be passed to an algorithme implemented in Rust ? + rust_ext_compat = 0 # Format of an index entry according to Python's `struct` language index_format = revlog_constants.INDEX_ENTRY_V1 # Size of a C unsigned long long int, platform independent