[Bug 249976] kompare complains about malformed diffs
Krzysztof Kapuscik
k.kapuscik at gmail.com
Wed Oct 20 19:06:50 CEST 2010
https://bugs.kde.org/show_bug.cgi?id=249976
--- Comment #6 from Krzysztof Kapuscik <k kapuscik gmail com> 2010-10-20 19:06:47 ---
I have done some analysis and debugging. The problem is that the svn diff
output format is:
Index: somedir/filename.xyz
===================================================================
--- somedir/filename.xyz (revision 5)
+++ somedir/filename.xyz (working copy)
@@ -1,3 +1,48 @@
A = B
-C = D
Index: somedir/filename.abc
===================================================================
--- somedir/filename.abc (revision 5)
+++ somedir/filename.abc (working copy)
@@ -1,3 +1,48 @@
A = B
+C = D
When parsing such file Kompare uses the CVS diff parser with universal format
enabled. Unified parses skips first 2 lines (Index and ===) and moves to --- as
it is recognized by the regexp. After parsing first hunk the iterator points at
next "Index:" but unified parses expects (using function checkHeader()) that
the iterator will point at "---" - and the malformed flag is set by
checkHeader(). Because the parses actually skips the 'invalid' lines the files
gets successfully parsed but the warning popup is still shown.
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Kompare-devel
mailing list