I hope anybody can help me.
When I try to push my local git branch to the svn server this will always result into this error:
$ git svn dcommit
Comm
diff -u /usr/local/lib/perl5/site_perl/5.16/Git/SVN/Editor.pm.bak /usr/local/lib/perl5/site_perl/5.16/Git/SVN/Editor.pm
--- /usr/local/lib/perl5/site_perl/5.16/Git/SVN/Editor.pm.bak 2014-01-20 15:52:54.000000000 +0100
+++ /usr/local/lib/perl5/site_perl/5.16/Git/SVN/Editor.pm 2014-01-20 15:55:16.000000000 +0100
@@ -304,8 +304,9 @@
my ($self, $m, $deletions) = @_;
my ($dir, $file) = split_path($m->{file_b});
my $pbat = $self->ensure_path($dir, $deletions);
+ my $upa= $self->url_path($m->{file_a});
my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat,
- $self->url_path($m->{file_a}), $self->{r});
+ $upa, $self->{r});
print "\tC\t$m->{file_a} => $m->{file_b}\n" unless $::_q;
$self->chg_file($fbat, $m);
$self->close_file($fbat,undef,$self->{pool});
@@ -323,8 +324,9 @@
my ($self, $m, $deletions) = @_;
my ($dir, $file) = split_path($m->{file_b});
my $pbat = $self->ensure_path($dir, $deletions);
+ my $upa= $self->url_path($m->{file_a});
my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat,
- $self->url_path($m->{file_a}), $self->{r});
+ $upa, $self->{r});
print "\tR\t$m->{file_a} => $m->{file_b}\n" unless $::_q;
$self->apply_autoprops($file, $fbat);
$self->chg_file($fbat, $m);
Downgrading svn is not guaranteed to help: the bug is in serf backend so one has to also make sure to switch to neon backend.
The bug has been patched in svn upstream: http://thread.gmane.org/gmane.comp.version-control.subversion.devel/145186.
There's a workaround submitted to git upstream: http://thread.gmane.org/gmane.comp.version-control.git/237906/focus=239690. As it's in perl you can apply it locally to your installed version, before any of the above is released and propagates to your environment.
I had the same problem and solved it by reverting to git-svn 1.7.5.1 (svn 1.7.10).
Not sure but I think the problem is that the repository was cloned with the previous version of svn (1.7.xxx) and for some reason the new version (1.8.0) cannot handle it correctly.
I have experienced the same on OSX with fink, and solved it by downgrading svn and the perl swig svn bindings to 1.7.11 from 1.8 (and afterwards rebuilding, just in case, git-svn).
The problem appeared on renames, and happened both on server 1.6.12 and 1.7.9, via dav_svn, on a 1.6 format repository (I am unsure if it happens with svn+ssh as well).
git-svn is on version 1.8.3.3, which was a requirement in my case (as only git-svn >= 1.7.7 can merge svn-tracked branches, see here).
I struggled with the accepted answer. I just felt like the accepted answers tells you what to do but not how to do it. I found it much easier to upgrade to the master version of git than downgrade subversion in cygwin. Keep in mind either one will fix the issue. I've documented how to build the master version of git here: How do I build and use the latest version of git on cygwin?
If you cannot downgrade to SVN 1.7.X, another option is doing the Git-SVN commit this way:
git svn dcommit -C1 -l1
This basically turns off Git rename detection (so it is a workaround, not a fix). You will lose rename track information (a rename will be committed as a delete followed by a new file, like SVN 1.4). But the commit will work.
Edit In spite of some comments here, I believe this will work with the current Git version on the Cygwin repository (1.7.9.1). If some day that changes, I'll update my answer accordingly.
In fact, let's hope the situation improves to the point that we won't need any fix or workaround, and Git-SVN just works (as it used to). :-)