Bug 306909 - Unable to save files when -o parameter is used. Message says: klauncher said: Unknown protocol ''.
Summary: Unable to save files when -o parameter is used. Message says: klauncher said:...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kdiff3
Classification: Applications
Component: application (show other bugs)
Version: 0.9.97
Platform: Fedora RPMs Linux
: NOR critical
Target Milestone: ---
Assignee: michael
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-17 04:04 UTC by Greg Martyn
Modified: 2018-07-05 04:03 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 Greg Martyn 2012-09-17 04:04:34 UTC
I use kdiff3 as my git mergetool. With kdiff3 version 0.9.97 installed, I am unable to save files when in kdiff3 is invoked by Git. When I downgrade to 0.9.96, everything works fine.

The problem seems to be that when the output file is passed to kdiff3 with the -o parameter, kdiff3 doesn't turn that into a file:// path. That seems to be fine with version 0.9.96, but version 0.9.97 refuses to save until I edit the output location and ensure that it uses a file:// path.

Reproducible: Always

Steps to Reproduce:
If I do a merge:
    kdiff3 ./file1.txt ./file2.txt ./file3.txt -o file.txt

.. then save the result, two alert popups appear. The first says:
    Could not start process Unable to create io-slave:
    klauncher said: Unknown protocol ''.

The second says:
    While trying to make a backup, renaming failed.
    Filenames: file.txt -> file.txt.orig

    Creating backup failed. File not saved.

If I then do File => Open, and continue without saving, I see the correct filenames listed in A, B, and C, all prefixed with file://, but the output box just says "file.txt" (not prefixed with file://). If I say OK and continue without making changes, the same problem occurs. However if I fixup the output box by clicking the "File..." button and selecting the output file, it is now prefixed with file://, and I am able to click OK then save my merge result.

Version 0.9.96 shows the same behavior in the File => Open window, but despite the output file not being prefixed with file://, everything seems to work fine.
Actual Results:  
Two alert popups appear. The first says:
    Could not start process Unable to create io-slave:
    klauncher said: Unknown protocol ''.

The second says:
    While trying to make a backup, renaming failed.
    Filenames: file.txt -> file.txt.orig

Expected Results:  
File was saved
Comment 1 Joachim Eibl 2012-09-22 21:10:15 UTC
Thanks for reporting. Fixed in the git repo on sourceforge.
Joachim
Comment 2 Pavel Baranchikov 2013-02-05 08:03:47 UTC
GIt's mergetool kdiff3 still uses "-o" parameter. The file https://github.com/git/git/blob/master/mergetools/kdiff3 is identical to the one on my local machine, but I still has the problem.
A error occurs only if a file with the name, specified by "-o" parameter exists.

As for me, the following diff works fine:

--- kdiff3_orig 2013-02-05 12:02:40.795566548 +0400
+++ kdiff3      2013-02-05 12:00:29.279060587 +0400
@@ -11,7 +11,7 @@
                        --L1 "$MERGED (Base)" \
                        --L2 "$MERGED (Local)" \
                        --L3 "$MERGED (Remote)" \
-                       -o "$MERGED" "$BASE" "$LOCAL" "$REMOTE" \
+                       -o `pwd`/"$MERGED" "$BASE" "$LOCAL" "$REMOTE" \
                >/dev/null 2>&1
        else
                "$merge_tool_path" --auto \
Comment 3 Christoph Feck 2013-02-11 23:24:10 UTC
Reopening based on comment #2
Comment 4 michael 2018-07-05 04:03:56 UTC
Please verify with lastest kdiff3 I am unable to repo.