Bug 365774 - Editing a patch file does not work properly
Summary: Editing a patch file does not work properly
Status: RESOLVED NOT A BUG
Alias: None
Product: kompare
Classification: Applications
Component: general (show other bugs)
Version: 4.1.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Kompare developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-17 13:56 UTC by Barade
Modified: 2016-07-19 11:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.