( )⚙ D372 simplemerge: add optional context parameters to simplemerge

This is an archive of the discontinued Mercurial Phabricator instance.

simplemerge: add optional context parameters to simplemerge
ClosedPublic

Authored by phillco on Aug 14 2017, 2:15 AM.

Details

Summary

Rename the existing parameters for clarity.

These will, in subsequent patches, allow callers to redirect reads (of the
three sides of the merge) and writes (of the result) to the given contexts,
instead of using the filesystem.

While in most cases, the writes will go to a workingfilectx, this opens the
door for it to be a memfilectx in the case of an in-memory merge.

Repo will be necessary in a subsequent comit.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

phillco created this revision.Aug 14 2017, 2:15 AM
This revision was automatically updated to reflect the committed changes.
martinvonz added inline comments.
mercurial/simplemerge.py
412

Seems unfortunate to have both files and contexts. This is what you mentioned today you will replace by use of "arbitraryfilectx"?

phillco added inline comments.Aug 19 2017, 1:50 PM
mercurial/simplemerge.py
412

They get taken out in D381; they have to co-exist briefly in order to ensure each step of this series can be applied cleanly.