Bug 344035

Summary: path is doubled when resolving conflicts
Product: [Applications] kdesvn Reporter: Oliver Konz <kde>
Component: GeneralAssignee: KDESvn default assignee <kdesvn-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: Ch.Ehrlicher, stephan.mucha
Priority: NOR    
Version: 1.6.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Oliver Konz 2015-02-11 13:52:07 UTC
When I try to resolve a conflict all paths are printed twice on the kdiff3 command line. I use the default settings: kdiff3 %o %m %n -o %t

e.g. I want to resolve a conflict in /path/to/file.java the command line generated for kdiff3 looks like this:

kdiff3 /path/to/path/to/file.java.r123 /path/to/path/to/file.java.mine /path/to/path/to/file.java.r134 -o /path/to/path/to/file.java


Reproducible: Always

Steps to Reproduce:
Try to resolve a conflict.

Actual Results:  
kdiff3 /path/to/path/to/file.java.r123 /path/to/path/to/file.java.mine /path/to/path/to/file.java.r134 -o /path/to/path/to/file.java

Expected Results:  
kdiff3 /path/to/file.java.r123 /path/to/file.java.mine /path/to/file.java.r134 -o /path/to/file.java
Comment 1 stephan.mucha 2015-06-09 11:45:30 UTC
I wrote the following perl script as quick and dirty workaround. sure, one could correct the bug in the application itself, buuut: I'm not familiar with C++/Qt/KDE  and it would take ages.

just copy in an editor, save as kdiff3_pathstrip or something somewhere in your PATH. don't forget to make it executable. then in kdesvn change preferences to launch kdiff3_pathstrip (same arguments), so my settings for external merging/conflict editing are: 
kdiff3_pathstrip %s1 %s2 %t
kdiff3_pathstrip %o %m %n -o %t

BEWARE: 
no warranties. :-) it is really dirty (to keep pattern matching simple, it works only for files under /home/....   if your file are elsewhere you have to tweak it accordingly.

#++++++++++++++++++++++++ snap ++++++++++++++++++++++
#!/usr/bin/perl

my (@args)=(@ARGV);

for my $arg (@args) {
  if (defined $arg) {
     $arg =~ s|/home.*/home|/home|;
  }
}
my ($o,$m,$n,$p,$t) = @args;

my $cmd = "kdiff3 $o $m $n";
if (defined $t) {
$cmd .= " -o $t ";
}

system($cmd);
#++++++++++++++++++++++++ snap ++++++++++++++++++++++
Comment 2 Christian Ehrlicher 2015-12-13 16:46:10 UTC

*** This bug has been marked as a duplicate of bug 322182 ***