One common task when maintaining software is looking at routines that are close copies of one another. Close… but not quite the same. You might do this in refactoring or just in looking at a section of a routine that is doing what you want, and is working right, while what you wrote isn’t.
Understand 2.0 adds two new features in to directly address this dilemma:
- Comparing entities – pick any two entities and textually compare them
- Comparing arbritray text – paste in any text, compare them
For instance, I notice that I have two functions named “error” in our ZLib example project (Help->Example Project).
I then pull up Change’s entity comparison tool:
And then just select C++ functions and choose “error” in both sides:
I can then see quite obviously they are the same function, just a bit different. What I do with that information is up to the situation, but at least now I know the score.
Similarly, I can have a quick diff tool for comparing any arbritrary text. Just choose “Change->Compare arbritrary text” and paste in the text:
Hit Okay and see the diff:
Next up…. I’ll explain what the does in the Understand 2.0 diff view.