rust/hg-core/src/dirstate_tree/dirstate_map.rs
branchstable
changeset 49003 ce919b1a1063
parent 49002 fbc02ccc207e
child 49005 12adf8c695ed
child 49145 dd2503a63d33
equal deleted inserted replaced
49002:fbc02ccc207e 49003:ce919b1a1063
   862                 let was_tracked = entry.map_or(false, |entry| entry.tracked());
   862                 let was_tracked = entry.map_or(false, |entry| entry.tracked());
   863                 let had_entry = entry.is_some();
   863                 let had_entry = entry.is_some();
   864                 if had_entry {
   864                 if had_entry {
   865                     node.data = NodeData::None
   865                     node.data = NodeData::None
   866                 }
   866                 }
       
   867                 let mut had_copy_source = false;
   867                 if let Some(source) = &node.copy_source {
   868                 if let Some(source) = &node.copy_source {
   868                     DirstateMap::count_dropped_path(unreachable_bytes, source);
   869                     DirstateMap::count_dropped_path(unreachable_bytes, source);
       
   870                     had_copy_source = true;
   869                     node.copy_source = None
   871                     node.copy_source = None
   870                 }
   872                 }
   871                 dropped = Dropped {
   873                 dropped = Dropped {
   872                     was_tracked,
   874                     was_tracked,
   873                     had_entry,
   875                     had_entry,
   874                     had_copy_source: node.copy_source.take().is_some(),
   876                     had_copy_source,
   875                 };
   877                 };
   876             }
   878             }
   877             // After recursion, for both leaf (rest_of_path is None) nodes and
   879             // After recursion, for both leaf (rest_of_path is None) nodes and
   878             // parent nodes, remove a node if it just became empty.
   880             // parent nodes, remove a node if it just became empty.
   879             let remove = !node.data.has_entry()
   881             let remove = !node.data.has_entry()