Bug 650476 - osc diff produces incorrect patches
Summary: osc diff produces incorrect patches
Status: RESOLVED DUPLICATE of bug 518304
Alias: None
Product: openSUSE.org
Classification: openSUSE
Component: BuildService (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 - None : Major (vote)
Target Milestone: ---
Assignee: Adrian Schröter
QA Contact: Adrian Schröter
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-01 14:52 UTC by Michal Vyskocil
Modified: 2010-11-04 09:22 UTC (History)
0 users

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
The incorrect and incomplete patch generated by iosc diff (7.67 KB, patch)
2010-11-01 14:52 UTC, Michal Vyskocil
Details | Diff
The manually generated correct patch (7.61 KB, patch)
2010-11-01 15:01 UTC, Michal Vyskocil
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Vyskocil 2010-11-01 14:52:24 UTC
Created attachment 397983 [details]
The incorrect and incomplete patch generated by iosc diff

The command osc diff produces incorrect and incomplete patches with weird (14 more lines skipped) string.

Example

iosc diff -r6:9 home:mvyskocil:branches:SUSE:Factory:Head/java-1_6_0-ibm
---snip---
 %files jdbc -f %{name}-%{version}-jdbc.files
 %defattr(-,root,root,-)
-%ifarch %ix86 ppc
 
-%files plugin
(14 more lines skipped)
Index: java-1_6_0-ibm.changes
---snip---

patch --input=../../home:mvyskocil:branches:SUSE:Factory:Head/java-1_6_0-ibm/.osc/bnc649241.patch
patching file java-1_6_0-ibm.spec
Hunk #4 FAILED at 51.
patch: **** malformed patch at line 203: (14 more lines skipped)

The correct patch can be generated by twice iosc cat and a diff -u.
Comment 1 Michal Vyskocil 2010-11-01 15:01:42 UTC
Created attachment 397985 [details]
The manually generated correct patch

iosc cat home:mvyskocil:branches:SUSE:Factory:Head/java-1_6_0-ibm -r9 java-1_6_0-ibm.spec > java-1_6_0-ibm.spec.r9
iosc cat home:mvyskocil:branches:SUSE:Factory:Head/java-1_6_0-ibm -r6 java-1_6_0-ibm.spec > java-1_6_0-ibm.spec.r6
diff -u java-1_6_0-ibm.spec.r{6,9}
Comment 2 Michal Vyskocil 2010-11-01 15:03:05 UTC
As very important and annoying for me is the osc diff generate valid diff before commit, but afterward it adds the (xy more lines skipped), which makes this feature completely unusable.
Comment 3 Sascha Peilicke 2010-11-04 09:22:38 UTC
Probably the same as #518304

*** This bug has been marked as a duplicate of bug 518304 ***