Bug 81088 - kompare silently fails when applying diffs with the fish IOslave
Summary: kompare silently fails when applying diffs with the fish IOslave
Status: RESOLVED FIXED
Alias: None
Product: kompare
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Kompare developers
URL:
Keywords:
: 79529 124819 141723 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-05-07 12:57 UTC by jmb65
Modified: 2009-03-11 22:42 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jmb65 2004-05-07 12:57:42 UTC
Version:            (using KDE 3.2.1, Gentoo)
Compiler:          gcc version 3.2.2
OS:          Linux (i686) release 2.4.20-ck6

kompare will happily compare two remote files using the fish:// IOslave.  However when you try to save any differences that you have applied to the destination file, the save fails silently.

I realise it may not be trivial to alter kompare so that it deals with remote files correctly, but a warning message should definitely be implemented informing the user that applied changes cannot be saved (and the save option disabled).  Otherwise this could be considered a critical bug, since a user might inadvertently delete the source file if (s)he thinks incorrectly that all the changes have now been applied to the destination file.

Is this maybe similar to kmail bug 69105?  I.e. is kompare using the full KIOslave mechanism to load files but just relying on QFile to save the changes?
Comment 1 Otto Bruggeman 2004-05-14 18:34:49 UTC
It is using QFile to save locally so it can afterwards upload it, i'll check this weekend where the problem comes from. Thanks for the report.
Comment 2 Winfried Dobbe 2004-07-21 15:18:19 UTC
I hope this can be fixed. The README of the Kompare src package promises "full network transparency" :-)
Comment 3 Jeff Snyder 2005-06-06 21:43:38 UTC
This is gonna be a little spammy... I'm reassigning everything that's currently 
assigned to bruggie (who's been the default assignee for bugs since time began) 
to the new list address. 
 
Bruggie: if you're working on one or more of these atm, please snatch 'em 
back.. 
 
Everyone, esp. Joshua and Bruggie: if this genrates 33 mails, my sincere 
apologies.. 
Comment 4 Winfried Dobbe 2006-01-18 12:01:53 UTC
*** Bug 79529 has been marked as a duplicate of this bug. ***
Comment 5 S. Bryant 2007-09-04 17:21:41 UTC
Hi...  this bug is still an issue with Kompare 3.4.  If I run "kompare file sftp://foo/bar/file", apply some diffs and exit, it tells me (correctly) that there are changes, and do I wish to save them.  If I say yes, it doesn't - the remote file is unchanged - but there is no error message to say that the file could not be saved.

Ideally, Kompare should complete the save, but if it can't, it must not behave as if it did.  An error message would be appropriate at that point.

The result of this bug is that I end up having to use something other than Kompare, and that sucks!  I thought I'd add a comment so that this doesn't go forgotten.  Thanks!

-- Steve
Comment 6 Kevin Kofler 2009-01-23 22:25:33 UTC
*** Bug 124819 has been marked as a duplicate of this bug. ***
Comment 7 Kevin Kofler 2009-01-23 22:27:07 UTC
#124819 also says:
> kompare, even when restarted, fails to compare recent versions of the files.
> Seems like a caching effect to me, which goes away, when re-navigating through
> the fs to the file.
in addition to the saving issue.
Comment 8 Otto Bruggeman 2009-02-24 02:22:55 UTC
SVN commit 930684 by bruggie:

Many changes related to passing filename information from the part to
the modellist. The Kompare::Infostruct was already in place to update
everyone about changes but it was not used to communicate between the
part and model this commit fixes that. 

The real reason for this commit is that it fixes saving remote files. 
Do not give a local URL and pretend it is a remote URL, does not work. 
KIO::NetAccess::upload then simply does nothing because the file 
already exists.  

Refresh is fixed now. Refetch the files and dont reuse the local files
to determine the differences. Now that saving remote works it showed the
old result again. Some had already seen this, now it was easy to figure
out where it came from.

Fixed a silly copy and paste error where for the destination directory
source was used. Always fun these bugs.

Updated the caption in the titlebar to now have a " -- " to separate the
files so it is more clear which files/directories are compared. I read
somewhere in a bugreport people did not like this so fixed as well.

BUG:76904
BUG:81088
CCBUG:126870 Patch applied, second hunk not since this is not related



 M  +58 -29    komparepart/kompare_part.cpp  
 M  +74 -71    libdiff2/komparemodellist.cpp  
 M  +12 -15    libdiff2/komparemodellist.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=930684
Comment 9 Kevin Kofler 2009-02-24 03:03:18 UTC
SVN commit 930700 by kkofler:

Many changes related to passing filename information from the part to
the modellist. The Kompare::Infostruct was already in place to update
everyone about changes but it was not used to communicate between the
part and model this commit fixes that. 

The real reason for this commit is that it fixes saving remote files. 
Do not give a local URL and pretend it is a remote URL, does not work. 
KIO::NetAccess::upload then simply does nothing because the file 
already exists.  

Refresh is fixed now. Refetch the files and dont reuse the local files
to determine the differences. Now that saving remote works it showed the
old result again. Some had already seen this, now it was easy to figure
out where it came from.

Fixed a silly copy and paste error where for the destination directory
source was used. Always fun these bugs.

Updated the caption in the titlebar to now have a " -- " to separate the
files so it is more clear which files/directories are compared. I read
somewhere in a bugreport people did not like this so fixed as well.

CCBUG:76904
CCBUG:81088
CCBUG:126870 Patch applied, second hunk not since this is not related

backport revision 930684 by bruggie from trunk

 M  +57 -28    komparepart/kompare_part.cpp  
 M  +74 -71    libdiff2/komparemodellist.cpp  
 M  +12 -15    libdiff2/komparemodellist.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=930700
Comment 10 Otto Bruggeman 2009-03-11 22:42:13 UTC
*** Bug 141723 has been marked as a duplicate of this bug. ***