This is an archive of the discontinued Mercurial Phabricator instance.

dirstate-v2: Write .hg/dirstate back to disk on directory cache changes
ClosedPublic

Authored by SimonSapin on Jun 1 2021, 12:51 PM.

Diff Detail

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

Event Timeline

SimonSapin created this revision.Jun 1 2021, 12:51 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.
baymax updated this revision to Diff 28385.Jun 1 2021, 5:05 PM

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

Alphare added a subscriber: Alphare.Jun 2 2021, 4:11 AM
Alphare added inline comments.
rust/hg-core/src/dirstate_tree/status.rs
83

This does not seem semantically correct. The docstring for dirty says that it's any change to the dirstate that should be written, but this only concerns the directories cache.

SimonSapin added inline comments.Jun 2 2021, 4:17 AM
rust/hg-core/src/dirstate_tree/status.rs
83

Yes, and we want new cache entries to be written to disk?

Alphare added inline comments.Jun 2 2021, 4:19 AM
rust/hg-core/src/dirstate_tree/status.rs
83

Right, but the docstring for dirty implies that it covers any part of the dirstate that needs serializing to disk, while it is only for the cache.

Alphare added inline comments.Jun 2 2021, 5:24 AM
rust/hg-core/src/dirstate_tree/status.rs
83

I was completely confused, we don't update the dirstate for anything other than caches outside of a commit. Sorry for the noise. :)