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

Re: [PATCH] v2 Test context within fuzzy hunk for 'svn patch'

From: Daniel Näslund <daniel_at_longitudo.com>
Date: Fri, 5 Feb 2010 20:03:46 +0100

On Thu, Feb 04, 2010 at 10:53:26PM +0100, Stefan Sperling wrote:
> On Thu, Feb 04, 2010 at 08:11:00PM +0100, Daniel Näslund wrote:

> Can you explain why?

We have changed a part of the hunk parsing logic to only check for fuzz
at start and end of a hunk. It should not take intermediate context into
account.

> + "@@ -7,7 +8,9 @@\n",
> " and 50,000,000 individual email addresses from all over the world.\n",
> " \n",
> " Your email address drew and have won the sum of 750,000 Euros\n",
> "+Another new line\n",
> " ( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
> + "+A third new line\n",
> " file with\n",
> " REFERENCE NUMBER: ESP/WIN/008/05/10/MA;\n",
> + " WINNING NUMBER : 14-17-24-34-37-45-16\n",

> Is the indentation of the above line off on purpose?

The extra space was a typo when I created the test. Fixed it at the same
time.

New log message which is ridiciously long for such a small change.
Feedback on it is welcome:

[[[
For determining fuzz we have an algorithm that should only check for
trailing and leading context. Add a small regression test to existing
testcase. At the same time fix small typo.

* subversion/tests/cmdline/patch_tests.py
  (patch_with_fuzz): Add context in the middle of one of the fuzzy
    hunks.

Patch by: Daniel Näslund <daniel{_AT_}longitudo.com>
]]]

Received on 2010-02-05 20:04:31 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.