Mercurial > hg
comparison mercurial/dirstatemap.py @ 48044:d5528ac9b4f2
dirstate: Use the Rust implementation of DirstateItem when Rust is enabled
… instead of the C implementation, with C/Rust conversions at the FFI boundary
Differential Revision: https://phab.mercurial-scm.org/D11486
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Wed, 22 Sep 2021 11:33:29 +0200 |
parents | cedfe2606adf |
children | 32ef647821b2 |
comparison
equal
deleted
inserted
replaced
48043:3e69bef2031a | 48044:d5528ac9b4f2 |
---|---|
25 parsers = policy.importmod('parsers') | 25 parsers = policy.importmod('parsers') |
26 rustmod = policy.importrust('dirstate') | 26 rustmod = policy.importrust('dirstate') |
27 | 27 |
28 propertycache = util.propertycache | 28 propertycache = util.propertycache |
29 | 29 |
30 DirstateItem = parsers.DirstateItem | 30 if rustmod is None: |
31 DirstateItem = parsers.DirstateItem | |
32 else: | |
33 DirstateItem = rustmod.DirstateItem | |
31 | 34 |
32 rangemask = 0x7FFFFFFF | 35 rangemask = 0x7FFFFFFF |
33 | 36 |
34 | 37 |
35 class dirstatemap(object): | 38 class dirstatemap(object): |