ModPlug Central

OpenMPT => Development Corner => Topic started by: Relabsoluness on May 16, 2015, 13:27:46

Title: Diffing modules
Post by: Relabsoluness on May 16, 2015, 13:27:46
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
Title: Re: Diffing modules
Post by: Saga Musix on May 17, 2015, 21:08:57
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.
Title: Re: Diffing modules
Post by: Relabsoluness on May 19, 2015, 16:41:09
I'll be expecting the next release then ;)
Title: Re: Diffing modules
Post by: Relabsoluness on May 26, 2017, 00:02:57
Old thread, but the matter is still topical. Attached is a new draft version of the diffing feature patch with the following changes: