This is an archive of the discontinued Mercurial Phabricator instance.

context: reuse changectx._copies() in all but workingctx
ClosedPublic

Authored by martinvonz on Apr 8 2019, 12:08 PM.

Details

Summary

This moves the dirstate-specific _copies() implementation from
committablectx into workingctx where it should be (I think all
dirstate-specific stuff should be moved into workingctx). The part of
changectx._copies() that is for producing changeset-wide copy dicts
from the filectxs is moved into basectx so it's reused by the other
subclasses. The part of changectx._copies() that's about reading copy
information from the changeset remains there. This fixes in-memory
rebase (and makes hg convert able to write copies to changesets).

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

martinvonz created this revision.Apr 8 2019, 12:08 PM
martinvonz planned changes to this revision.

Not for review, sharing for @pulkit

martinvonz retitled this revision from memctx: make p[12]copies() correct to context: reuse changectx._copies() in all but workingctx.May 10 2019, 5:44 PM
martinvonz edited the summary of this revision. (Show Details)
martinvonz updated this revision to Diff 15055.

This is quite rewritten and now ready for review.

This revision was automatically updated to reflect the committed changes.