( )⚙ D12154 filemerge: move check for identical sides out of filemerge()

This is an archive of the discontinued Mercurial Phabricator instance.

filemerge: move check for identical sides out of filemerge()
ClosedPublic

Authored by martinvonz on Feb 8 2022, 4:26 PM.

Details

Summary

filemerge.filemerge() returns None if no merge was necessary
because the two sides were identical. I don't think it should be that
function's responsibility to handle that case; we should ideally not
even call filemerge.filemerge() if the two inputs identical. This
patch therefore moves the check out to the caller (mergestate.py).

The largefiles test changed because we now notice that the two sides
made the same change, so we don't consider it a merge. Also note that
the new message better matches the line above it in the test output.

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.