( )⚙ D10706 dirstate-tree: Remove newly-empty nodes after removing a `DirstateEntry`

This is an archive of the discontinued Mercurial Phabricator instance.

dirstate-tree: Remove newly-empty nodes after removing a `DirstateEntry`
ClosedPublic

Authored by SimonSapin on May 11 2021, 12:34 PM.

Details

Summary

This is actually necessary to make DirstateMap::has_dir correct, since it
assumes that a node without a DirstateEntry has at least one descedant node
with a DirstateEntry.

This bug would become apparent when a later changeset persists tree nodes
on disk in the "dirstate-v2" format.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

SimonSapin created this revision.May 11 2021, 12:34 PM
baymax updated this revision to Diff 27913.May 14 2021, 10:25 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

pulkit accepted this revision.May 15 2021, 6:36 PM
This revision is now accepted and ready to land.May 15 2021, 6:36 PM