0

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.

Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356

1 Answers1

1

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

Ben Reser
  • 5,695
  • 1
  • 21
  • 29
  • I think they already know about it. You can see from here: http://stackoverflow.com/questions/17693255/git-svn-dcommit-fails-because-of-assertion-error-svn-fspath-is-canonicalchild?rq=1 – Daniel Kaplan Jan 09 '14 at 17:56
  • Even thou the answer was marked as accpeted it doesn't actually answer the question. And the question is how to force Git to use a specific version. On a Linux I work with when I `source` (in Bash) SVN 1.8.5 `git-svn` (v 1.7.10.1) fails while cloning (a known issue of incompatibility). While `source`ing SVN 1.7.9 results in a successful `git-svn` clone. So how do I force `git-svn` to use SVN 1.7.9 instead of 1.8.5 while having 1.8.5 `source`ed? – Adam Badura Feb 18 '14 at 23:48
  • 1
    @Adam It answers the question asked, which is that you can't tell it to use a specific client. What you're asking is a related but different question. How do I make git-svn use a different version of the Subversion bindings. The answer to that is to set PERL5LIB and PATH/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH such that it finds the version of the Perl libraries/Subversion bindings that you want. If you want to make a separate question asking about this and provide details of your environment I can probably answer more fully. – Ben Reser Feb 18 '14 at 23:54
  • @BenReser There you go: http://stackoverflow.com/questions/21922770/how-to-make-git-svn-use-specific-version-of-svn – Adam Badura Feb 21 '14 at 00:35