Using version control for module files often points out that diffing modules even on rough scale could be useful. Without being of aware of existing solutions, I wrote a little hack to OpenMPT with which it is possible to set e.g. TortoiseSVN to use mptrack.exe with appropriate command line arguments to do module diffs [1]. Attached is the code and an example what the module diff looks like. Comparison is based on as-simple-as-possible module-to-text conversion (currently highly lossy, but covers big parts such as pattern data) and use of existing diff programs for the actual comparison. Note that this is a demonstration-of-concept type of patch and is by no means intended to be merged as such, but can be improved if this type of functionality is of interest.
[1] Diffing works from TortoiseSVN context menu by adding the following as handler of it/mptm etc. extensions:
"C:\Program Files (x86)\OpenMPT\mptrackWithDiffFunctionality.exe" /diff "C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe" %base %mine
Cool, this looks exactly like something I had on my mind for a very long time. I'm pretty sure we can bring this into a workable state for including into the main development branch.
I'll be expecting the next release then ;)
Old thread, but the matter is still topical. Attached is a new draft version of the diffing feature patch with the following changes:
- Revamped writer interface.
- Includes plain text and JSON output options with the latter implemented with RapidJSON (https://github.com/miloyip/rapidjson) for simplicity.
- In JSON-writing, integers are now written as integers instead of strings.
- Minor changes in the output content.