Bug 365774

Summary: Editing a patch file does not work properly
Product: [Applications] kompare Reporter: Barade <barade.barade>
Component: generalAssignee: Kompare developers <kompare-devel>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: 4.1.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Barade 2016-07-17 13:56:18 UTC
I've started kompare: kompare mypatch.patch
The file contains diff output. First of all "The diff is malformed. Some lines could not be parsed and will not be displayed in the diff view." appears although I've created the file automatically. Then the file is loaded anyways and shows the correct changes.
Now I want to undo changes by applying changes from the old file to the new file to edit my patch file. Basically I want to remove some changes from the patch file. This works until I want to save the patch file. Maybe the program tries to save the target file instead. The "Save Diff" button is disabled as well as the "Refresh Diff" button!

Btw. when starting kompare not via command line I have NO IDEA how to open a patch file only.

Reproducible: Always
Comment 1 Barade 2016-07-17 14:03:22 UTC
For the parsing error. I guess that the only lines which could cause problems are the diff annotations?

They have the following form in my patch file:
diff -Nur -x '*.o' -x '*.so' -x '*.la' -x '*.oo' -x '*.a' -x doc -x scripts -x build -x '*.dd' -x '*.d' -x define_annotation.h ../../projektarbeit2oldversion/viewerandstudio/lib/opengl/framework/data/ambassador.cpp ../lib/opengl/framework/data/ambassador.cpp
--- ../../projektarbeit2oldversion/viewerandstudio/lib/opengl/framework/data/ambassador.cpp     2016-05-30 16:45:08.912805998 +0200
+++ ../lib/opengl/framework/data/ambassador.cpp 2016-06-27 00:13:25.101018880 +0200
@@ -14,6 +14,7 @@


Then the changes follow with + or -
Comment 2 Kevin Kofler 2016-07-19 10:16:39 UTC
Kompare does not edit patch files. The save buttons are indeed for saving the target file(s) (you can actually modify both the "source" and the "target" file, thus the "(s)").
Comment 3 Barade 2016-07-19 11:52:36 UTC
Can I change this to a feature request then? It would be useful to have a tool for modifying patch files.