FS#31813 - [kdiff3] Saving a merged file fails in git

Attached to Project: Arch Linux
Opened by Peter Wu (Lekensteyn) - Friday, 05 October 2012, 16:42 GMT
Last edited by Eric Belanger (Snowman) - Monday, 08 October 2012, 05:04 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Eric Belanger (Snowman)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

When trying to merge a file in kdiff3, I cannot save the file and get an error message instead.

This is already fixed upstream, http://sourceforge.net/p/kdiff3/code/ci/23ad423e4255c80ee22b269f73e20333f7c06678
For convenience (because sourceforge online interface sucks), I have attached a patch generated from that commit (SHA1 c2bdc96da903c2db5e8777dff0ebffff779f12a7).

Tested and confirmed to solve the save issue.

Note: PKGBUILD needs -p2, not -p1:
patch -Np2 -i "${srcdir}/fix-save-relative-path.patch"

I am using kdiff3 version 0.9.97-1.
This task depends upon

Closed by  Eric Belanger (Snowman)
Monday, 08 October 2012, 05:04 GMT
Reason for closing:  Fixed
Additional comments about closing:  kdiff3-0.9.97-2
Comment by Eric Belanger (Snowman) - Sunday, 07 October 2012, 19:35 GMT
Can you tell us how to reproduce the bug and what's the error message?
Comment by Peter Wu (Lekensteyn) - Sunday, 07 October 2012, 19:57 GMT
How to reproduce:
printf '1\n' > file.BASE
printf '0\n1\n' > file.r0
printf '1\n2\n' > file.r1
kdiff3 --auto -o ./file file.BASE file.r0 file.r1

./file can be any relative path like $PWD/file, --auto was added to show gits behaviour. If you omit --auto, try saving the resolved file.

Expected result:
kdiff3 correctly merges the file into "file", producing "0\n1\n2\n".

Actual result:
An error message appears:
"While trying to make a backup, renaming failed.
Filenames: file -> file.orig

Creating backup failed. File not saved."

then the next dialog overlays the previous message:
"Could not start process Unable to create io-slave:
klauncher said: Unknown protocol ''.
."

After closing both error dialogs, kdiff3 appears without saving the merged file.

The patch that I attached fixes the bug (in other words, the above test-case succeeds)

Loading...