As part of moving dirstate storage logic to a separate class, let's move the
function that reads the parents from the file. This will allow extensions to
write dirstate's that store the parents in other ways.
Details
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
Lots of comments. But nothing that should warrant blocking.
mercurial/dirstate.py | ||
---|---|---|
1376 | Nit: this should ideally be in a context manager or try..finally block. But it existed this way before, so not worth blocking over. | |
1381 | Another pre-existing poor error message because it isn't actionable :/ | |
1382–1384 | Idea for follow-up: a vfs layer that operates on pending files. Maybe we could pass pending=True somewhere? That way we can use vfs.tryread() instead of this low-level code. Not sure if we have enough consumers to warrant that though. |
mercurial/dirstate.py | ||
---|---|---|
1376 | Left this alone for now to avoid code churn during the refactor. |
Nit: this should ideally be in a context manager or try..finally block. But it existed this way before, so not worth blocking over.