[Bug 204253] New: kompare has troubles parsing certain unified diff output

View: New views
7 Messages — Rating Filter:   Alert me  

[Bug 204253] New: kompare has troubles parsing certain unified diff output

by Bugzilla from markus.schoepflin@comsoft.de :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://bugs.kde.org/show_bug.cgi?id=204253

           Summary: kompare has troubles parsing certain unified diff
                    output
           Product: kompare
           Version: unspecified
          Platform: Ubuntu Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kompare-devel@...
        ReportedBy: markus.schoepflin@...


Version:           3.5.4 (using KDE 4.2.4)
OS:                Linux
Installed from:    Ubuntu Packages

When diffing the following two files, kompare comes up with an empty window.
Looks like kompare is confused by the triple minus in the diff output.

$ kompare -v
Qt: 4.5.0
KDE: 4.2.2 (KDE 4.2.2)
Kompare: 3.5.4
$ cat a_1
-- foo
$ cat a_2
-- bar
$ diff -u a_1 a_2
--- a_1 2009-08-18 10:42:02.000000000 +0200
+++ a_2 2009-08-18 10:42:07.000000000 +0200
@@ -1 +1 @@
--- foo
+-- bar
$ diff -u a_1 a_2 | kompare -

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Kompare-devel mailing list
Kompare-devel@...
https://mail.kde.org/mailman/listinfo/kompare-devel

[Bug 204253] kompare has troubles parsing certain unified diff output

by Bugzilla from markus.schoepflin@comsoft.de :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://bugs.kde.org/show_bug.cgi?id=204253


Markus Schöpflin <markus.schoepflin@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus.schoepflin@...
                   |                            |e




--- Comment #1 from Markus Schöpflin <markus schoepflin comsoft de>  2009-08-18 10:58:46 ---
Please note that this report is actually for KDE 4.2.2 for which I couldn't
file a bug. As I have no means to try it with a more recent version of KDE,
someone would need to verify if it is indeed broken on 4.2.4.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Kompare-devel mailing list
Kompare-devel@...
https://mail.kde.org/mailman/listinfo/kompare-devel

[Bug 204253] kompare has troubles parsing certain unified diff output

by Bugzilla from kevin.kofler@chello.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://bugs.kde.org/show_bug.cgi?id=204253





--- Comment #2 from Kevin Kofler <kevin kofler chello at>  2009-08-18 12:00:38 ---
It almost certainly is, we didn't do anything to fix it in the 4.2 branch
before 4.2.4 or in the 4.3 branch before 4.3.0 (nor is this fixed in the
current 4.3 branch or trunk as far as I know).

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Kompare-devel mailing list
Kompare-devel@...
https://mail.kde.org/mailman/listinfo/kompare-devel

[Bug 204253] kompare has troubles parsing certain unified diff output

by Bugzilla from markus.schoepflin@comsoft.de :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://bugs.kde.org/show_bug.cgi?id=204253





--- Comment #3 from Markus Schöpflin <markus schoepflin comsoft de>  2009-08-18 13:13:42 ---
I had a look at the sources for kompare. The problem seems to be that
ParserBase::parseUnifiedHunkBody() stops reading the hunk body as soon as it
finds a line matching m_unifiedDiffHeader1 (e.g. '--- blahblah'). This happens
because ParserBase::matchesUnifiedHunkLine() returns False for such lines.

I think the parsing of the hunk body must take into account the full
information from the hunk header, because otherwise you cannot reliably tell
where the hunk body ends.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Kompare-devel mailing list
Kompare-devel@...
https://mail.kde.org/mailman/listinfo/kompare-devel

[Bug 204253] kompare has troubles parsing certain unified diff output

by Bugzilla from markus.schoepflin@comsoft.de :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://bugs.kde.org/show_bug.cgi?id=204253





--- Comment #4 from Markus Schöpflin <markus schoepflin comsoft de>  2009-08-19 12:05:45 ---
Created an attachment (id=36277)
 --> (http://bugs.kde.org/attachment.cgi?id=36277)
Fix parsing of unified diffs

This patch for libdiff2 modifies the parsing of unified diffs to take into
account the full information given in the diff header. Now kompare correctly
displays the unified diff example I gave earlier.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Kompare-devel mailing list
Kompare-devel@...
https://mail.kde.org/mailman/listinfo/kompare-devel

[Bug 204253] kompare has troubles parsing certain unified diff output

by Bugzilla from bruggie@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://bugs.kde.org/show_bug.cgi?id=204253


Otto Bruggeman <bruggie@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bruggie@...




--- Comment #5 from Otto Bruggeman <bruggie gmail com>  2009-08-19 13:09:06 ---
Patch looks sane. Can someone confirm that this fixes the bug with this
testcase? I dont have a working KDE atm. Please also add this testcase for this
bug to the testcases in kompare so we can make sure this bug does not return.

Thank you very much for reporting the bug and for the patch!

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Kompare-devel mailing list
Kompare-devel@...
https://mail.kde.org/mailman/listinfo/kompare-devel

[Bug 204253] kompare has troubles parsing certain unified diff output

by Bugzilla from kevin.kofler@chello.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://bugs.kde.org/show_bug.cgi?id=204253


Kevin Kofler <kevin.kofler@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE




--- Comment #6 from Kevin Kofler <kevin kofler chello at>  2009-09-27 15:44:00 ---


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

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Kompare-devel mailing list
Kompare-devel@...
https://mail.kde.org/mailman/listinfo/kompare-devel