Page MenuHomePhabricator

context: add workingfilectx.markcopied
ClosedPublic

Authored by phillco on Oct 15 2017, 11:40 PM.

Details

Summary

With in-memory merge, copy information needs to be stored in-memory, not in the
dirstate.

To make this transition easy, move the existing dirstate-based approach to
workingfilectx; that way, other implementations can choose to store it
somewhere else.

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

phillco created this revision.Oct 15 2017, 11:40 PM

I could split out the wctx passing, if necessary.

durin42 accepted this revision.Oct 16 2017, 9:18 PM
This revision is now accepted and ready to land.Oct 16 2017, 9:18 PM
This revision was automatically updated to reflect the committed changes.
martinvonz added inline comments.
mercurial/context.py
1938

I would probably have put this on workingctx instead (not per file). It feels like it better matches how copies are recorded in the dirstate (which is not per file). It looks like this would be a little simpler that way. Will future patches be simpler by doing it on the workingfilectx instead?