( )⚙ D10954 dirstate-entry: add a `state` property (and use it)

This is an archive of the discontinued Mercurial Phabricator instance.

dirstate-entry: add a `state` property (and use it)
ClosedPublic

Authored by marmoute on Jul 4 2021, 5:50 PM.

Details

Summary

This replace the [0] access. Ultimately is we should probably get ride of this
in its current form. However this is a good transitional solution to move away
for tuple indexing for now.

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

marmoute created this revision.Jul 4 2021, 5:50 PM

Why have both a v1_state method and a state property? What’s the difference between them?

Why have both a v1_state method and a state property? What’s the difference between `them?

v1_state return the exact content that we need to serialize the dirstate v1 format. The state one give use access to the current internal "state" encoding. It might diverge from v1_state in the future or disapper entirely.

SimonSapin accepted this revision.Jul 5 2021, 12:41 AM
pulkit accepted this revision.Jul 6 2021, 12:25 PM
This revision is now accepted and ready to land.Jul 6 2021, 12:25 PM
baymax updated this revision to Diff 28856.Jul 6 2021, 2:08 PM

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

This revision was automatically updated to reflect the committed changes.