[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 4805 - in trunk: . subversion/tests/libsvn_delta

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-02-09 16:45:11 CET

Garrett Rooney <rooneg@electricjellyfish.net> writes:

> at least the first 'failure' in there seems to
> produce a valid unified diff, it's just showing slightly more context
> than you're expecting.

Which probably indicates a bug :) What happens when we extend the
library to support a varying number of context lines? I believe the
current output is wrong.

Lets see

$ patch --dry-run foo15a < diff-foo15a-bar15a
patching file foo15a
Hunk #1 succeeded at 1 with fuzz 1.

See that fuzz message? Even patch thinks it's suspect.

> perhaps these tests shouldn't be comparing against a cannonical 'good
> result', but instead should be using patch to try to reconstruct the
> original file from the diff, and verifying that it matches.

I disagree. A "diff" that simply deleted one file and added the
second would do that, but it's not very useful. These tests are
designed to prohibit that. Obviously in some cases the diff algorithm
has to make arbitrary choices, but in the the cases I have tested
explicitly I believe the diff output should be predictable. Any
variation it is most likely a bug.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Feb 9 16:45:53 2003

This is an archived mail posted to the Subversion Dev mailing list.