Bug 68555 - editdiff (really rediff) fails
Summary: editdiff (really rediff) fails
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: patchutils   
(Show other bugs)
Version: 1.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-07-11 03:43 UTC by Ulrich Drepper
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-10-11 15:52:22 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Test input (1.49 KB, text/plain)
2002-07-11 03:46 UTC, Ulrich Drepper
no flags Details

Description Ulrich Drepper 2002-07-11 03:43:51 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a+) Gecko/20020628

Description of problem:
I'll append a test file which contains a patch.  If editdiff is used and the
first chunk is removed rediff will abort and leave no usable find behind.  Total
loss of data.

This applies as far as I can see to al versions up to and including the current
raw hide which is why I've filed the bug for rawhide.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.editdiff AAAA
2.remove first chunk
3.leave editor

Actual Results:  rediff: src/rediff.c:468: show_modified_hunk: Assertion
`!read_atatline (line, &orig_offset, &orig_count, &new_offset, &new_count)' failed.
/usr/bin/editdiff: line 68: 11476 Aborted                 rediff
"${TMPD}/${NAME}.orig" "${TMPD}/${NAME}" >"${FILE}"

Expected Results:  new patch with first chunk removed

Additional info:

Comment 1 Ulrich Drepper 2002-07-11 03:46:02 UTC
Created attachment 64744 [details]
Test input

Comment 2 Tim Waugh 2002-07-11 06:30:22 UTC
editdiff backs the original file up with extension '.orig', so it shouldn't cause data loss. 
Thanks for the test case. 

Comment 3 Tim Waugh 2002-07-11 06:49:11 UTC
Rediff only handles unified diff format currently, I'm afraid.  I'll stick in a check there to make it 
do something sensible when confronted with context diff.

Comment 4 Tim Waugh 2002-07-11 06:58:24 UTC
The check is now in CVS.

Comment 5 Tim Waugh 2002-07-11 07:00:22 UTC
As a work-around, you can use filterdiff to select hunks from a diff.  At least filterdiff 
understands context format.

Comment 6 Tim Waugh 2002-10-16 17:20:58 UTC
This check is now in patchutils-0.2.17-1.

Note You need to log in before you can comment on or make changes to this bug.