On Tue, 2010-10-19 at 21:53 +0200, Johan Corveleyn wrote: > Hi devs, > > In the context of the diff optimization patch I'm working on ([1]), > I'm wondering if diff4 is actually used in svn. If I look for usages > of subversion/libsvn_diff/diff4.c#svn_diff_diff4, I only come up with > tools/diff/diff4.c#main. > > So: this code isn't used in the svn core itself? What's the use of the > diff4 executable in tools/diff? Is it for experimentation with that > implementation, but it never really got finalized to be taken up in > svn proper? Or am I overlooking something?
You are quite right: it is there for experimentation. I believe it is an implementation of <http://svn.apache.org/repos/asf/subversion/trunk/notes/variance-adjusted-patching.html>, which is mentioned in our (rather old) merging functional spec, here: <http://svn.apache.org/repos/asf/subversion/trunk/notes/merge-tracking/func-spec.html#aslb-merge>. > Also, tools/diff/diff4.c mentions the following description above the > copyright notice: "diff4-test.c -- test driver for 3-way text merges". > Wrong filename. And "test driver", what does that mean? I corrected the filename in r1024560. "Test driver" indicates a program that exercises some functionality, for the purpose of testing that functionality. > Background: I'm working on extending my patch to work for all diff's > in svn: normal diff, diff3 and diff4 (to avoid having to special case > things only for regular diff, and the patch is just as useful for > diffX as for regular diff). I don't want to break anything, so I was > looking around for ways how to exercise that code. > > Should I take diff4 into account, and if so, how can I test it? Please do take diff4 into account, just for completeness. You don't need to write an automatic regression test for it. - Julian

