git svn dcommit fails because of assertion error “svn_fspath__is_canonical(child_fspath)” (cygwin)

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
Committing to http://.../Dev_Stream/01_workspace ...
    C      path/to/file/ => other/path/to/file/Thread/
assertion "svn_fspath__is_canonical(child_fspath)" failed: file "/usr/src/subversion/subversion-1.8.0-1/src/subversion-1.8.0/subversion/libsvn_subr/dirent_uri.c", line 2502, function: svn_fspath__skip_ancestor


  • clean local git repository (no staged or unstaged changes)
  • called git svn rebase before

Cygwin installation contains these packages:

  • git, git-svn 1.7.9-1
  • subversion, subversion-perl 1.8.0-1

When searching for this problem in the internet, I found several errors like this where a path could not be canonicalized. But I did not find a solution for exactly this problem.

Has anybody an idea how to solve it? Is any information missing?

  • SVN merge reintegrate missing ranges but nothing to merge
  • export changed files using tortoise svn to another directory
  • Fork remote SVN repo to git
  • How to setup VisualSVN Setup on Windows Azure Instance
  • Using svnversion with svn:keywords
  • Setting up a project directory structure for git repo of a website
  • How to install Tortoise SVN in to Android Studio 2.1 Latest Version
  • Git working copy within a Subversion Repository
  • 9 Solutions collect form web for “git svn dcommit fails because of assertion error “svn_fspath__is_canonical(child_fspath)” (cygwin)”

    I also had this problem (git version 1.8.3) and solved it by downgrading subversion to 1.7.9 (from 1.8.0).

    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 ( 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). 🙂

    An easy way to install patched version of git-svn from github:

    1. Find the buggy script:

      find /usr -name
    2. Replace it with patched version:

      cd /usr/lib/perl5/vendor_perl/5.18.1/Git/SVN

    I’ve managed how to solve this problem w/o downgrading svn.
    Error msg was like this:

    git svn dcommit
    Committing to http://...
            C       File1.hpp => File2.hpp
    ERROR from SVN:
    RA layer request failed: PUT request on '...File2.hpp' failed: 409 Conflict...

    then I’ve rebased just before this commit, removed File1.hpp, made new commit and in next one just added File2.hpp like a new one. After this
    git svn dcommit
    wasn’t complaining anymore.

    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:

    There’s a workaround submitted to git upstream: 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 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, 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?

    I had the same problem and solved it by reverting to git-svn (svn 1.7.10).

    Not sure but I think the problem is that the repository was cloned with the previous version of svn ( and for some reason the new version (1.8.0) cannot handle it correctly.

    diff -u  /usr/local/lib/perl5/site_perl/5.16/Git/SVN/  /usr/local/lib/perl5/site_perl/5.16/Git/SVN/    
    --- /usr/local/lib/perl5/site_perl/5.16/Git/SVN/   2014-01-20 15:52:54.000000000 +0100
    +++ /usr/local/lib/perl5/site_perl/5.16/Git/SVN/       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);
    @@ -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);
    Git Baby is a git and github fan, let's start git clone.