[Updated] D12432: rust-dirstatemap: correctly decrement the copies counter
Alphare (Raphaël Gomès)
phabricator at mercurial-scm.org
Mon Apr 4 20:07:02 UTC 2022
Closed by commit rHGc2b373191f6b: rust-dirstatemap: correctly decrement the copies counter (authored by Alphare).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D12432?vs=32766&id=32772
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D12432/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D12432
AFFECTED FILES
rust/hg-core/src/dirstate_tree/dirstate_map.rs
CHANGE DETAILS
diff --git a/rust/hg-core/src/dirstate_tree/dirstate_map.rs b/rust/hg-core/src/dirstate_tree/dirstate_map.rs
--- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs
+++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs
@@ -864,14 +864,16 @@
if had_entry {
node.data = NodeData::None
}
+ let mut had_copy_source = false;
if let Some(source) = &node.copy_source {
DirstateMap::count_dropped_path(unreachable_bytes, source);
+ had_copy_source = true;
node.copy_source = None
}
dropped = Dropped {
was_tracked,
had_entry,
- had_copy_source: node.copy_source.take().is_some(),
+ had_copy_source,
};
}
// After recursion, for both leaf (rest_of_path is None) nodes and
To: Alphare, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220404/d2bf3efd/attachment-0002.html>
More information about the Mercurial-patches
mailing list