Jump to content

Kompare doesn't work


neddie
 Share

Recommended Posts

When Kate tells me that a file has been changed on disk, it offers me a button to "View Difference". However when I press it, I just get the error message "Could not find our KompareViewPart". I also get the same error message when I try to run Kompare from the menu. I have the rpm kdesdk-kompare-3.5.6-3mdv2007.1.i586.

 

I know I can compare files with kdiff3, but I can't figure out how to get Kate to use kdiff3 as its file comparer. Is this known to be broken or am I just missing a package somewhere?

Link to comment
Share on other sites

There have been various bug reports filed at KDE about this kompare problem over the last couple of years, but it seems to keep reappearing.

 

Try running (as user)

kbuildsycoca

then try using kompare again.

 

If that doesn't work: open kate > Settings > Configure Kate> External Tools, then highlight your Compare/Kompare tool line or lines (you probably have more than one) > Edit. Now you must change the Executable from kompare to kdiff3, then edit the script accordingly. You can also change the icon if you like. You must do this for every tool line using kompare you have.

 

I'm curios, what program are you using that tells kate a file has been changed?

Link to comment
Share on other sites

Thanks, Greg2!

Try running (as user) kbuildsycoca then try using kompare again.
No difference. During running that command (whatever it was) it gave many many warnings about undefined mime types, but didn't say "failed" or "error". But Kompare still doesn't work.

 

If that doesn't work: open kate > Settings > Configure Kate> External Tools, then highlight your Compare/Kompare tool line or lines (you probably have more than one) > Edit.
Um, don't think so. There are two entries for comparing with CVS (one for file and one for directory), and both of those point to cvsdiff piping to kompare. Except I don't have CVS, never use it.

 

I'm curios, what program are you using that tells kate a file has been changed?
Kate itself notices when the file is changed by another app. I guess it checks some checksum or timestamp or something to see if it's been changed. I can see this by opening a file in Kate, then using vi on the same file and saving it, then going back to Kate. The file gets a red cross and Kate asks me what to do - reload the file (and lose the changes made in Kate) or ignore and overwrite.

 

Obviously I don't go around editing the same file in Kate and vi at the same time, but I edit web pages in Kate and then run a management tool on the whole site. This makes sure that the menu entries are all built automatically for each page, and the breadcrumb trails and so on. So when I add a new page or move one I just have to run the tool and it figures out what the tree is and what the menu should be for each page. I just thought it was odd that Kate is offering to tell me what's changed but then pukes when I take up the offer.

Link to comment
Share on other sites

I can see this by opening a file in Kate, then using vi on the same file and saving it, then going back to Kate. The file gets a red cross and Kate asks me what to do - reload the file (and lose the changes made in Kate) or ignore and overwrite.

I just now tried that with my Mandriva 2008 system using kate 2.5.7, and my kate doesn't do that. :huh:

 

Would you please post a pic of this?

Link to comment
Share on other sites

Sorry, I misread your last post. So, please disregard my last post. :P

 

I see now that you are editing a file that's already opened in kate, and I understand what you're saying. I have reproduced the red X and the 'View Difference' button with my kate. However, when I click on my 'View Difference' button, it opens a diff in kdiff3.

 

So open konqueror > Settings > Configure konqueror > File Associations > text > x-diff > add > kdiff3, move kdiff3 up to the top of 'Application Prference Order' > click 'Apply' > OK. :)

Link to comment
Share on other sites

Weird - now it launches kdiff3, but doesn't seem to pass the right parameters in - kdiff3 opens with the first file a temporary version of the file in ~/tmp/.../kate.....tmp (which doesn't have the whole file, and doesn't show the bit of the file which was edited) but doesn't have anything for the second file - so the results look meaningless :unsure:

If I go to "Edit" on this new file association, I see the command is

kdiff3 %i %m -caption "%c"

Couldyou compare (ho ho) this with yours to see if I'm missing something?

Link to comment
Share on other sites

My command line is identical.

 

It's only going to give you a .diff or .patch the way it is set up now. You could 'View Difference' > B: File > inter the path to the file you have edited > OK. Will that help you any?

 

Another idea to try would be to add a remote backup file in your kate settings, then try to use that with kdiff3... I'm guessing at this one. :P

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...