Bug 68555 - editdiff (really rediff) fails
editdiff (really rediff) fails
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: patchutils (Show other bugs)
1.0
All Linux
medium Severity high
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-07-10 23:43 EDT by Ulrich Drepper
Modified: 2008-05-01 11:38 EDT (History)
0 users

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


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

  None (edit)
Description Ulrich Drepper 2002-07-10 23:43:51 EDT
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:
Always

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-10 23:46:02 EDT
Created attachment 64744 [details]
Test input
Comment 2 Tim Waugh 2002-07-11 02:30:22 EDT
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 02:49:11 EDT
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 02:58:24 EDT
The check is now in CVS.
Comment 5 Tim Waugh 2002-07-11 03:00:22 EDT
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 13:20:58 EDT
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.