mercurial/dirstate.py
changeset 43923 40fd1ef4e4c1
parent 43897 7eb6a2680ae6
child 44078 f2c350e7371e
equal deleted inserted replaced
43922:6a88ced33c40 43923:40fd1ef4e4c1
  1105 
  1105 
  1106         dmap = self._map
  1106         dmap = self._map
  1107         dmap.preload()
  1107         dmap.preload()
  1108 
  1108 
  1109         use_rust = True
  1109         use_rust = True
       
  1110 
       
  1111         allowed_matchers = (matchmod.alwaysmatcher, matchmod.exactmatcher)
       
  1112 
  1110         if rustmod is None:
  1113         if rustmod is None:
  1111             use_rust = False
  1114             use_rust = False
  1112         elif subrepos:
  1115         elif subrepos:
  1113             use_rust = False
  1116             use_rust = False
  1114         if bool(listunknown):
  1117         elif bool(listunknown):
  1115             # Pathauditor does not exist yet in Rust, unknown files
  1118             # Pathauditor does not exist yet in Rust, unknown files
  1116             # can't be trusted.
  1119             # can't be trusted.
  1117             use_rust = False
  1120             use_rust = False
  1118         elif self._ignorefiles() and listignored:
  1121         elif self._ignorefiles() and listignored:
  1119             # Rust has no ignore mechanism yet, so don't use Rust for
  1122             # Rust has no ignore mechanism yet, so don't use Rust for
  1120             # commands that need ignore.
  1123             # commands that need ignore.
  1121             use_rust = False
  1124             use_rust = False
  1122         elif not match.always():
  1125         elif not isinstance(match, allowed_matchers):
  1123             # Matchers have yet to be implemented
  1126             # Matchers have yet to be implemented
  1124             use_rust = False
  1127             use_rust = False
  1125 
  1128 
  1126         if use_rust:
  1129         if use_rust:
  1127             # Force Rayon (Rust parallelism library) to respect the number of
  1130             # Force Rayon (Rust parallelism library) to respect the number of
  1145                 deleted,
  1148                 deleted,
  1146                 unknown,
  1149                 unknown,
  1147                 clean,
  1150                 clean,
  1148             ) = rustmod.status(
  1151             ) = rustmod.status(
  1149                 dmap._rustmap,
  1152                 dmap._rustmap,
       
  1153                 match,
  1150                 self._rootdir,
  1154                 self._rootdir,
  1151                 bool(listclean),
  1155                 bool(listclean),
  1152                 self._lastnormaltime,
  1156                 self._lastnormaltime,
  1153                 self._checkexec,
  1157                 self._checkexec,
  1154             )
  1158             )