Mercurial > hg-stable
changeset 42545:2db96bf84a8f
rust-dirstate: call new "dirs" rust implementation from Python
This is a simple module attribute replacement, will take precedence over the
Python and C implementations.
Differential Revision: https://phab.mercurial-scm.org/D6395
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 05 Jun 2019 17:58:34 +0200 |
parents | ce94f9622acd |
children | 5c64d0b4c037 |
files | mercurial/util.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Thu May 16 18:03:42 2019 +0200 +++ b/mercurial/util.py Wed Jun 05 17:58:34 2019 +0200 @@ -53,6 +53,8 @@ stringutil, ) +rustdirs = policy.importrust('dirstate', 'Dirs') + base85 = policy.importmod(r'base85') osutil = policy.importmod(r'osutil') parsers = policy.importmod(r'parsers') @@ -3204,6 +3206,9 @@ if safehasattr(parsers, 'dirs'): dirs = parsers.dirs +if rustdirs is not None: + dirs = rustdirs + def finddirs(path): pos = path.rfind('/') while pos != -1: