Bug 333199 - Do "diff" comparison before writing a file
Summary: Do "diff" comparison before writing a file
Status: RESOLVED INTENTIONAL
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 3.11.5
Platform: unspecified All
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-08 11:52 UTC by Victor Porton
Modified: 2016-09-05 12:06 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 Victor Porton 2014-04-08 11:52:46 UTC
We have a file repository which is edited by several people.

I want to show "diff" for a file before saving the file. This minimizes chances that I would overwrite changes by other people. (Yes, I know it is better done by version control tools, but in the real world version control is not always available.)

It can be done by adding "Diff" button to the file save dialog.

"Diff" should be shown graphically (like GtkDiff or other graphical diff tools do).

Reproducible: Always
Comment 1 Dominik Haumann 2014-04-08 12:49:17 UTC
With the functions
- bool KTE::Document::isLineModified (int line),
- bool KTE::Document::isLineSaved (int line) (well, not really required)
it should be easy to generate a diff and show this through Kompare.

Question is whether we'd want something more sophisticated here.
Comment 2 Dominik Haumann 2014-04-08 12:50:00 UTC
My previous comment wasn't entirely correct, since removed lines are not taken into account. So yes, a bit more tricky :-)
Comment 3 Christoph Feck 2014-04-08 19:13:41 UTC
Doesn't Kate already warn when the file is externally modified?
Comment 4 Victor Porton 2014-04-08 19:17:23 UTC
> Doesn't Kate already warn when the file is externally modified?

It does NOT work for files accessed through FTP.
Comment 5 Victor Porton 2014-04-08 19:18:30 UTC
>> Doesn't Kate already warn when the file is externally modified?

> It does NOT work for files accessed through FTP.

See also https://bugs.kde.org/show_bug.cgi?id=333203
Comment 6 Christoph Cullmann 2016-09-05 12:06:43 UTC
Dear user, this wish list item is now closed, as it wasn't touched in the last two years and no contributor stepped up to implement it.

The Kate/KTextEditor team is very small and we can just try to keep up with fixing bugs. Therefore wishs that show no activity for two years or more will be closed from now on to keep at least a bit overview about 'current' wishs of the users. If you want your feature to be implemented, please step up to provide some patch for it.

If you think it is really needed, you can reopen your request, but keep in mind, if no new good arguments are made and no people get attracted to help out to implement it, it will expire in two years again.

We have a nice website kate-editor.org that provides all the information needed to contribute, please make use of it. For highlighting improvements our user manual shows how to write syntax definition files. Greetings Christoph