( )⚙ D10922 dirstate-tree: Keep a counter of descendant nodes that have an entry

This is an archive of the discontinued Mercurial Phabricator instance.

dirstate-tree: Keep a counter of descendant nodes that have an entry
ClosedPublic

Authored by SimonSapin on Jul 2 2021, 8:36 AM.

Details

Summary

… and change the DirstateMap::has_dir method to be based on this counter
being non-zero instead of the mere presence of a node.

A node with zero descendent with an entry currently should be removed from
the tree, but soon we’ll make the dirstate track additional nodes.
(Specifically, for non-ignored directories in order to keep track of their
mtime and optimize status by doing fewer read_dir calls.)

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

SimonSapin created this revision.Jul 2 2021, 8:36 AM
Alphare accepted this revision.Jul 2 2021, 12:18 PM
This revision is now accepted and ready to land.Jul 2 2021, 12:18 PM