On Thu, Jan 28, 2010 at 10:58:17AM +0100, Stefan Sperling wrote:
> On Wed, Jan 27, 2010 at 10:30:51PM +0100, Daniel Näslund wrote:
> Oops :)
>
> Don't some tests need their expected output adjusted for this?
Strange, I thought I tested it. Fixed now.
[[[
Fix wrong modified_length for hunk notifications.
* subversion/libsvn_client/patch.c
(maybe_send_patch_notification): See above.
* subversion/tests/cmdline/patch_tests.py
(patch_offset): Adjust expected_output.
Patch by: Daniel Näslund <daniel{_AT_}longitudo.com>
Review by: stsp
]]]
Daniel
Index: subversion/tests/cmdline/patch_tests.py
===================================================================
--- subversion/tests/cmdline/patch_tests.py (revision 904046)
+++ subversion/tests/cmdline/patch_tests.py (arbetskopia)
@@ -471,10 +471,10 @@
expected_output = [
'U %s\n' % os.path.join('A', 'mu'),
- '> applied hunk @@ -6,6 +6,6 @@ with offset -1\n',
- '> applied hunk @@ -14,11 +17,11 @@ with offset 4\n',
+ '> applied hunk @@ -6,6 +6,9 @@ with offset -1\n',
+ '> applied hunk @@ -14,11 +17,8 @@ with offset 4\n',
'U iota\n',
- '> applied hunk @@ -5,6 +5,6 @@ with offset -3\n',
+ '> applied hunk @@ -5,6 +5,7 @@ with offset -3\n',
]
expected_disk = svntest.main.greek_state.copy()
Index: subversion/libsvn_client/patch.c
===================================================================
--- subversion/libsvn_client/patch.c (revision 904046)
+++ subversion/libsvn_client/patch.c (arbetskopia)
@@ -1000,7 +1000,7 @@
notify->hunk_original_start = hi->hunk->original_start;
notify->hunk_original_length = hi->hunk->original_length;
notify->hunk_modified_start = hi->hunk->modified_start;
- notify->hunk_modified_length = hi->hunk->original_length;
+ notify->hunk_modified_length = hi->hunk->modified_length;
notify->hunk_matched_line = hi->matched_line;
(*ctx->notify_func2)(ctx->notify_baton2, notify, pool);