Search code examples
gitsvncygwingit-svn

How do I tell Git to use a specific Svn client?


I'm using Cygwin. I assumed that git would use the first svn client it finds on the path, but that doesn't seem to be the case:

$ type svn
svn is /cygdrive/c/Program Files/SlikSvn/bin/svn

$ echo $PATH | sed 's/:/\n/g'
/cygdrive/c/Program Files/SlikSvn/bin
/bin
/home/me/bin
/home/me/bin
/usr/local/bin
/usr/bin
/cygdrive/c/Program Files (x86)/Haskell/bin
/cygdrive/c/Program Files (x86)/Haskell Platform/2012.4.0.0/lib/extralibs/bin
/cygdrive/c/Program Files (x86)/Haskell Platform/2012.4.0.0/bin
/cygdrive/c/Windows/system32
/cygdrive/c/Windows
/cygdrive/c/Windows/System32/Wbem
/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0
/cygdrive/c/Program Files/TortoiseSVN/bin
/cygdrive/c/Program Files/Java/jdk1.6.0_34/bin
/cygdrive/c/apache-maven-3.0.4/bin
/cygdrive/c/apache-ant-1.8.0/bin
/cygdrive/c/Program Files (x86)/Haskell Platform/2012.4.0.0/mingw/bin
/cygdrive/c/cygwin/bin
/cygdrive/c/Program Files (x86)/QuickTime/QTSystem
/cygdrive/c/Program Files/nodejs
/cygdrive/c/Program Files (x86)/phantomjs-1.9.1-windows
/cygdrive/c/Program Files/SlikSvn/bin


$ git svn dcommit
Committing to https://svn.corp.corp.com/svn/results/trunk ...
        R       foo => bar
assertion "svn_fspath__is_canonical(child_fspath)" failed: file "/usr/src/subversion/subversion-1.8.5-1/src/subversion-1.8.5/subversion/libsvn_subr/dirent_uri.c", line 2504, function: svn_fspath__skip_ancestor
error: git-svn died of signal 6

The reason I don't think it's using the first on one the path is because the error mentions /usr/src/subversion/subversion-1.8.5-1/src/subversion-1.8.5/subversion/libsvn_subr/dirent_uri.c and the first on my path is at /cygdrive/c/Program Files/SlikSvn/bin.


Solution

  • git-svn doesn't use the command line client but rather uses the Perl SWIG bindings to use the Subversion API directly.

    The error message is an assertion from calling that library and is providing the path of the source file and line where the assertion is being generated. So that path has nothing to do with the svn client being used.

    Either there's a bug in Subversion itself or a bug in Git's usage that's causing an assertion since a path isn't caononicalized properly. I'd probably start by reporting the issue to the Git folks (since that'd be my bet as to where the canonicalization error was made).