This is going to be clearer and easier to track than -1. Ultimately I would
like to get ride of this special value everywhere but in the lower level,
however we need to clarify the API first. This changeset is part of such
clarification.
Details
Details
- Reviewers
SimonSapin pulkit - Group Reviewers
hg-reviewers - Commits
- rHG4ac418b4a6af: dirstate: introduce a symbolic constant for the NONNORMAL marker
Diff Detail
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
Comment Actions
+1 for having a named constant but I’m not sure about the NONNORMAL name. For example this size == -1 is also used together with state == 'r' (removed) where it means "was previously state == 'm' (merged)". The other use is in dirstate.normallookup "Mark a file normal, but possibly dirty" together with state == 'n', which does not match the constant’s doc-comment.
Comment Actions
The name is not great, but I don't have a much better idea and the ultimate goal of this series is make it disapear, so I am not too worried about bad name.