I had a customer recently ask if SQL Compare could show them the differences in two scripts they’ve written. They weren’t using version control (tsk, tsk, shame), but saw SQL Compare and the “Scripts folder” option. This isn’t used for random scripts, but I do have a better solution: KDiff3.
KDiff is an old project that is used to analyze multiple files and merge the differences. There is an archived SoundForge location, but the more modern version is here. That’s the current code location, and you can see the readme for details. To get started, download and install it.
I’ve used this in a few VCS tools in the past, and it can be very handy. However, I’ve rarely run it on it’s own. When I start it, I see the A, B, and (optional) C files to pick.
If I click the “File” selector next to A or B, I can pick files. In my case, I’ll pick two files I’ve used to demonstrate where a VCS is helpful. You can see below I’ve selected files. I didn’t select the merge button, but I could. In this case, I just want to see the differences.
Wen I click OK, both files are opened, and I see a VCS-like difference listing of the files. You can see there are a few differences highlighted with the lines marked and then the changes highlighted.
I can now see what’s changed. In a proper VCS environment, I would then choose which changes I need to pull from each file to reconcile the differences.
If I pick two disparate files, KDiff3 tries to match them up as easily as possible. In my case, I had a few different demo files that happen to share some code. A pretty good analysis of the files shows me what’s different
There are navigation items in the toolbar that let you jump among the various differences in files if you want to. This is primarily a tool for reconciling files, not just finding differences, but it can be useful to see what’s changed.
If you’ve never tried it, give it a go and see if it’s helpful.