Search matches: too high minimum similarity level
Sometimes when you modify a file and then rename it, Plastic SCM is unable to match the original file with the renamed one. In that case you can use the ‘Search matches’ tool to select the file that matches the original one. However, It is not always possible, because the minimum similarity level that you can set when searching is 50%.
Imagine you add a comment to a small file that contains only a definition of an enumerable and then rename the file. Because it is small, the comment becomes a major part of the file and the similarity to the original file is less than 50%. To find a match for the original file, you have to undo your local changes and only then is Plastic SCM able to find the matching file. It’s too cumbersome.
I noticed once that I when I enclosed a VB.NET class in a namespace (so I added a line of code before the class definition and after it) and renamed its file, Plastic SCM could not find a match for the renamed file as well. It seemed strange, because the file contained several hundred lines of code and only two of them were changed. I wondered what was wrong, but then I realized that putting the class in a namespace caused the class definition to be indented. So each line of code was modified in fact.
I think the minimum value of 50% for the similarity level track bar is not a good idea. It will be really helpful if you changed the minimum value to 0% or add a possibility to select any file from the workspace when the matching algorithm fails to find a proper file.
Hello,
we have changed the Search Matches form to remove the minimum similarity level. Moreover, we have changed the matching algorithm so that changes in indentation are not taken into account.
These new features can be found since version 5.0.44.566 of PlasticSCM.
-
Mariusz Schimke commented
What a coincidence :). I had no idea you had already done that the day before. Thanks a lot!
-
Anuar S. commented
Hello Mario,
As you requested, we have changed the Search Matches form to remove the minimum similarity level. Moreover, we have changed the matching algorithm so that changes in indentation are not taken into account.
These new features can be found since version 5.0.44.566 of PlasticSCM.
-
Mariusz Schimke commented
Hello there. Would you be so kind to give the task a higher priority, please? The issue is really a pain in the neck.
-
Borja commented
Yes, the search matches should allow any similarity value. It’s a good idea.
In fact, it was already planned because we have suffered the same annoying issue with small files. When the new functionality will be ready, we will publish it here too.