Utility to find differences between databases?

Does anyone know of a utility to compare two databases (i.e., CACHE.DAT files) and find globals/subscripts that are different between them?

If not, I'll write one and share it. smiley

  • + 1
  • 0
  • 419
  • 4
  • 2

Answers

That does look useful, but I'm looking to compare all the globals in two databases (the output of different but theoretically equivalent build processes) to see if some globals are present from one / missing in another or if the contents of any are different, and (if so) what the differences are.

Did it work ?

 
 %GCMP
Compares two globals in the same or different namespace.
 

Export relevant globals to xml file(1 file per namespace) and compare hash sums. Also there's a lot of tools to display XML diffs if hash sums would differ.

 

Otherwise it's per global iteration and compare. I'd write some method to calculate global hash maybe (complete iteration and hash of keys and value). So:

  • Get lists of globals in both ns
  • Iterate over lists, and calculate hashes for each global separately
  • Compare lists (iterate over one list and delete each same value from both lists, all that's left is diff)
  • Report if global is in one list and not in the other
  • Report if global hashes differ across lists
  • (Optional) Display detailed compare for globals with different hashes

Comments

Thanks, Ray! This sounds really promising.

(To confirm: it ended up working.)