( )⚙ D627 filemerge: flush if using deferred writes when running a merge tool

This is an archive of the discontinued Mercurial Phabricator instance.

filemerge: flush if using deferred writes when running a merge tool
ClosedPublic

Authored by phillco on Sep 4 2017, 9:42 PM.

Details

Summary

Since merge tools might read from the filesystem, we need to write out our
deferred writes here.

No-ops if not using deferred writes.

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.Sep 4 2017, 9:42 PM
martinvonz added inline comments.
mercurial/filemerge.py
492–495

As Phil and I talked about out-of-band, it seems like this can be done in _filemerge() instead (~line 677) and we won't need to pass the wctx to all the merge tools (i.e. drop D450).

phillco updated this revision to Diff 1668.Sep 7 2017, 12:32 PM
phillco updated this revision to Diff 1671.Sep 7 2017, 12:58 PM
quark added a subscriber: quark.Sep 8 2017, 3:18 PM

As mentioned in the previous patch. I think it's cleaner to just call wctx.flushall() if the other wctx class has that method.

phillco updated this revision to Diff 1700.Sep 10 2017, 11:55 PM
This revision was automatically updated to reflect the committed changes.