pub struct ProcessEntryState {Show 16 fields
pub source_index: Option<usize>,
pub target_index: usize,
pub include_unchanged: bool,
pub want_unversioned: bool,
pub partial: bool,
pub supports_tree_reference: bool,
pub root_abspath: Vec<u8>,
pub searched_specific_files: HashSet<Vec<u8>>,
pub search_specific_files: HashSet<Vec<u8>>,
pub search_specific_file_parents: HashSet<Vec<u8>>,
pub searched_exact_paths: HashSet<Vec<u8>>,
pub seen_ids: HashSet<Vec<u8>>,
pub new_dirname_to_file_id: HashMap<Vec<u8>, Vec<u8>>,
pub old_dirname_to_file_id: HashMap<Vec<u8>, Vec<u8>>,
pub last_source_parent: Option<(Vec<u8>, Option<Vec<u8>>)>,
pub last_target_parent: Option<(Vec<u8>, Option<Vec<u8>>)>,
}Expand description
Mutable per-iter_changes state shared across
super::DirState::process_entry calls. Ports the instance
fields Python’s ProcessEntryPython carries: search / searched
sets, parent-id caches, dirname-to-file-id maps.
Fields§
§source_index: Option<usize>source_index in the tree-data array; None means “compare
against a synthetic empty source” (new-tree mode).
target_index: usizetarget_index in the tree-data array; always concrete.
include_unchanged: boolWhether unchanged entries should still yield a change tuple.
want_unversioned: boolWhether the iter_changes caller wants reports for paths on disk that aren’t in either source or target dirstate trees.
partial: boolPartial iter_changes: true when the caller supplied a
narrower set of paths than {b""}. Used by
_gather_result_for_consistency to decide whether to queue
parent-directory bookkeeping.
supports_tree_reference: boolWhether the current working-tree format supports tree
references. When false, is_tree_reference_dir is never
called during the walk.
root_abspath: Vec<u8>Absolute path of the working-tree root on disk. Used to
join root + relpath into an absolute path that Transport
methods can accept. Filled at iter_changes call time.
searched_specific_files: HashSet<Vec<u8>>Paths whose children have already been walked.
search_specific_files: HashSet<Vec<u8>>Paths whose children still need walking (driven by the
outer iter_changes loop).
search_specific_file_parents: HashSet<Vec<u8>>Parent directories we need to re-visit after the main walk
— populated by _gather_result_for_consistency when a
partial iter_changes produces a relocated entry.
searched_exact_paths: HashSet<Vec<u8>>Paths we’ve examined via _iter_specific_file_parents.
seen_ids: HashSet<Vec<u8>>File ids we’ve already yielded during the main walk.
new_dirname_to_file_id: HashMap<Vec<u8>, Vec<u8>>Cache: dirname → file_id for the target tree.
old_dirname_to_file_id: HashMap<Vec<u8>, Vec<u8>>Cache: dirname → file_id for the source tree.
last_source_parent: Option<(Vec<u8>, Option<Vec<u8>>)>One-slot cache: (dirname, parent_file_id) for the source tree.
last_target_parent: Option<(Vec<u8>, Option<Vec<u8>>)>One-slot cache: (dirname, parent_file_id) for the target tree.