Try
Beyond Compare. It is a file matching and comparing tool that can work wonders when upgrading or adding modifications. You simply compare the X version with the one you already have and click the little arrow. Save and there you go.
As I mentioned in another post as a reply to ChAos
here asking about how we keep track of all our mods, I do it with the comments. I ensure that the old part of the code stays within a /* and a */ so that beyond compare can match it with the original version of the file.
I once upgraded my boards in less than 4 minutes (prior to 6.2 version).
Nikos