This is an archive of the discontinued Mercurial Phabricator instance.

merge: move some of the logic in batchget() to workingfilectx
ClosedPublic

Authored by phillco on Aug 18 2017, 12:45 PM.

Details

Summary

We will use this logic in two places with in-memory merge.

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.Aug 18 2017, 12:45 PM
phillco updated this revision to Diff 1226.Aug 23 2017, 3:38 PM
phillco updated this revision to Diff 1309.Aug 25 2017, 5:01 PM
phillco updated this revision to Diff 1459.Aug 30 2017, 5:12 PM
martinvonz added inline comments.
mercurial/context.py
1971–1973

self.repo.wvfs gets repeated often enough that it's probably worth extracting to a local variable

1975–1977

I'd prefer to see this addition in the patch that needs it. At this point it's not clear what this is for.

Also, with this code here, it seems a little unnecessary for the block above to delete parent directories if we're just going to create them again here. Am I reading that right?

mercurial/merge.py
1153–1154

nit: wctx[f] involves enough work that it's probably worth extracting it to a variable?

phillco updated this revision to Diff 1478.Aug 31 2017, 1:59 PM
phillco marked 2 inline comments as done.Aug 31 2017, 2:00 PM
martinvonz added inline comments.Aug 31 2017, 3:32 PM
mercurial/context.py
1967–1968

I'll drop the the parenthesis in flight

phillco added inline comments.Aug 31 2017, 4:44 PM
mercurial/context.py
1967–1968

Thanks.

This revision was automatically updated to reflect the committed changes.