This is an archive of the discontinued Mercurial Phabricator instance.

simplemerge: delete unused find_unconflicted()
ClosedPublic

Authored by martinvonz on Jan 19 2021, 1:36 AM.

Details

Summary

The function has been unused ever since it was introduced in
465b9ea02868 (Import 3-way merge code from bzr, 2007-04-16).

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

martinvonz created this revision.Jan 19 2021, 1:36 AM

Was its purpose to be used in the tests? (It probably should have been put there in that case, but maybe importing mdiff there is more complicated?)

Was its purpose to be used in the tests? (It probably should have been put there in that case, but maybe importing mdiff there is more complicated?)

I'm not sure I follow. Do you mean that the test conditions that I removed in this patch might be worth keeping the function for? I had assumed that the function existed because it was used somewhere in Bazaar, but I didn't check if it actually was.

Was its purpose to be used in the tests? (It probably should have been put there in that case, but maybe importing mdiff there is more complicated?)

I'm not sure I follow. Do you mean that the test conditions that I removed in this patch might be worth keeping the function for? I had assumed that the function existed because it was used somewhere in Bazaar, but I didn't check if it actually was.

I'm not sure what the test conditions were trying to assert, TBH. I just meant that presumably they were doing something, like asserting the state of the already-performed merge?

Was its purpose to be used in the tests? (It probably should have been put there in that case, but maybe importing mdiff there is more complicated?)

I'm not sure I follow. Do you mean that the test conditions that I removed in this patch might be worth keeping the function for? I had assumed that the function existed because it was used somewhere in Bazaar, but I didn't check if it actually was.

I'm not sure what the test conditions were trying to assert, TBH. I just meant that presumably they were doing something, like asserting the state of the already-performed merge?

I think they just test that find_unconflicted() returns the right values. If you look at the test case names, they seem to refer to the state that they're testing, not to the function name. I think they set up a particular conflict and then test that find_unconflicted() and
find_sync_regions() return the expected output.

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.