Search code examples
eclipsecvs

Eclipse CVS compare: difference not disappearing after copying


In Eclipse, CVS text comparing works poorly against large numbers of difference between the local and the remote version. It's very desirable to update the the status of comparison every once in a while by a simple command. Basically it's reloading the local file, do the comparison again, to see where we have reached, and try not to make mistakes.

Unfortunately, "Team" - "Synchronize" again after editing every several lines is not convenient, neither does it solve our problem. As I have observed, when there are many differences, Eclipse can mark the already identical lines as different to the remote ones, if we use this approach to compare again.

How can we solve it in Eclipse?


Solution

  • At last I found a simple enough solution, but can be ignored easily: use the "Java structure compare" panel.

    1. When doing the CVS comparison, above the two horizontal text area, we can see the "Java structure compare" panel.
    2. The icon "+", "-" and arrows can show structurally how the two files are different.
    3. Double-click on a method to edit. After several lines of work, double-click the method again to update the status of comparison. If the local version is identical to the remote one, all the color squares will dissappear from the vertical scroll bar on the right, clearly marking where we have reached. Also, after doing this, you jump to the next difference in this method, to start working again.

    Re-"Synchronize" will mess the whole file up, so don't do it in the middle, unless you are at the final stage and have fewer enough differences.

    Just a little piece of humble opinion about how to use Eclipse more efficiently. After all it's our daily tool. Better to learn these tricks as soon as possible.

    enter image description here