##// END OF EJS Templates
rust-dirstate: call new "dirs" rust implementation from Python...
Raphaël Gomès -
r42738:f5ef8c85 default draft
parent child Browse files
Show More
@@ -53,6 +53,8 b' from .utils import ('
53 stringutil,
53 stringutil,
54 )
54 )
55
55
56 rustdirs = policy.importrust('dirstate', 'Dirs')
57
56 base85 = policy.importmod(r'base85')
58 base85 = policy.importmod(r'base85')
57 osutil = policy.importmod(r'osutil')
59 osutil = policy.importmod(r'osutil')
58 parsers = policy.importmod(r'parsers')
60 parsers = policy.importmod(r'parsers')
@@ -3204,6 +3206,9 b' class dirs(object):'
3204 if safehasattr(parsers, 'dirs'):
3206 if safehasattr(parsers, 'dirs'):
3205 dirs = parsers.dirs
3207 dirs = parsers.dirs
3206
3208
3209 if rustdirs is not None:
3210 dirs = rustdirs
3211
3207 def finddirs(path):
3212 def finddirs(path):
3208 pos = path.rfind('/')
3213 pos = path.rfind('/')
3209 while pos != -1:
3214 while pos != -1:
@@ -118,7 +118,9 b' impl DirsMultiset {'
118 entry.remove();
118 entry.remove();
119 }
119 }
120 Entry::Vacant(_) => {
120 Entry::Vacant(_) => {
121 return Err(DirstateMapError::PathNotFound(path.to_owned()))
121 return Err(DirstateMapError::PathNotFound(
122 path.to_owned(),
123 ))
122 }
124 }
123 };
125 };
124
126
General Comments 0
You need to be logged in to leave comments. Login now