hi list,
is there a smart way to find the difference between 2 versions of a patch?
sometimes i have 2 versions of a (complicated) patch and i don't remember what's the (maybe small) difference between them.
the methods i'm using at the moment are:
comparing the behaviour. however, when the patch has lots of possibilities this can be seriously time-consuming. also, when the behaviour is different it's not always clear where to look for the cause of it.
comparing the involved .pd files as text. for that, i'm using the app Kdiff3 which can do complete dir's in one run. it's a good tool, effective in some cases.
visual inspection. going through all subpatches looking for possible changes. especially cumbersome when i have no clue where to look specifically.
consulting my change-log. hoping to find a hint.
i guess in the Pd-community there exist more methods/tools to tackle this search for differences. hearing about it would be appreciated.
rolf
On Sun, 2022-02-20 at 13:03 +0100, rolfm@dds.nl wrote:
hi list,
is there a smart way to find the difference between 2 versions of a patch?
Actually, the Pd file format is not really well "diff"able. Even if you edit only one object within canvas with many objects, the implicit order of the objects changes, which leads to all subsequent 'connect' statements to change. A really tiny edit can (and most often does) lead to a quite large diff. Also, this makes it hard to concurrently work on patches and merge changes. It will almost inevitably lead to merge conflicts.
Still, I think a tool for tracking differences in text files like 'git diff' or Kdiff3 is your best bet. If I am looking at a diff for the purpose of figuring what has changed, I consider mainly the 'obj' statements and try to identify new or deleted objects while ignoring the 'connect' statements. Also, the 'canvas' statements seem to create a lot of noise when stuff has been moved around. Often, a change happened within a certain subpatch and looking at the diff gives you a clue about which subpatch is affected. To see and experience the actual difference, I open both version with Pd and compare visually and experimentally.
Roman
from my work as a music engraver I can suggest another idea, but which only works on limited contexts: export each canvas as a graphic file, and overlay the different versions convert (pdfstudio does this). But as anyone can notice, there are too many conditions necessary for this to work (find and export all canvases, patches can't be moved, ...).
Or: comment your patches.
On Sun, 2022-02-20 at 13:03 +0100, rolfm@dds.nl wrote:
hi list,
is there a smart way to find the difference between 2 versions of a patch?
Actually, the Pd file format is not really well "diff"able. Even if you edit only one object within canvas with many objects, the implicit order of the objects changes, which leads to all subsequent 'connect' statements to change. A really tiny edit can (and most often does) lead to a quite large diff. Also, this makes it hard to concurrently work on patches and merge changes. It will almost inevitably lead to merge conflicts.
Still, I think a tool for tracking differences in text files like 'git diff' or Kdiff3 is your best bet. If I am looking at a diff for the purpose of figuring what has changed, I consider mainly the 'obj' statements and try to identify new or deleted objects while ignoring the 'connect' statements. Also, the 'canvas' statements seem to create a lot of noise when stuff has been moved around. Often, a change happened within a certain subpatch and looking at the diff gives you a clue about which subpatch is affected. To see and experience the actual difference, I open both version with Pd and compare visually and experimentally.
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Hi Rolf,
not the best suggestion, but you might also wanna consider copying your patch and pasting it over the "other" one for easier visual comparison.
hi list,
is there a smart way to find the difference between 2 versions of a patch?
sometimes i have 2 versions of a (complicated) patch and i don't remember what's the (maybe small) difference between them.
the methods i'm using at the moment are:
comparing the behaviour. however, when the patch has lots of possibilities this can be seriously time-consuming. also, when the behaviour is different it's not always clear where to look for the cause of it.
comparing the involved .pd files as text. for that, i'm using the app Kdiff3 which can do complete dir's in one run. it's a good tool, effective in some cases.
visual inspection. going through all subpatches looking for possible changes. especially cumbersome when i have no clue where to look specifically.
consulting my change-log. hoping to find a hint.
i guess in the Pd-community there exist more methods/tools to tackle this search for differences. hearing about it would be appreciated.
rolf
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list