sapling/lib/treestate
Jun Wu 225a0771b4 treestate: revise StateFlags bits
Summary:
The "added", "removed", "normal", "? (untracked)" 4 states could be simplified
to 2 bits: "EXIST_P1", "EXIST_NEXT". With "merge" considered, adding "EXIST_P2"
would be enough. This avoids some invalid states, making it easier to reason
about. It also makes Mercurial dirstate hacks like size = -1, size = -2 noting
"merge" and "otherparent" unnecessary.

With this change, the previous `state_required_all`, `state_required_any`
query parameters are not powerful enough. That would be changed to functions
in a later diff. There is a new need to select files by querying "unset" bits.
That will be addressed by D7886281.

Reviewed By: markbt

Differential Revision: D7860277

fbshipit-source-id: 15d198fbd0ffa858c8ed751d42dff73e06114c12
2018-05-23 06:12:45 -07:00
..
src treestate: revise StateFlags bits 2018-05-23 06:12:45 -07:00
Cargo.toml treestate: implement Rand for FileStateV2 2018-05-10 16:40:25 -07:00