Search code examples
svngitclone

git-svn clone Errors using git 1.5.1 and 1.6.5 and Subversion 1.4.2


I am trying to integrate git into my workflow. I'm starting it by using it to manage working copies of code cloned off of a Subversion repository.

I've tried using both git 1.5.1 and 1.6.5. Both of these were built from source. I am using an official Debian package for Subversion. Using both versions of git yields the same error as seen below.

$ svn --version
svn, version 1.4.2 (r22196)
   compiled Aug  6 2009, 16:45:47

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

$ git --version
git version 1.6.5

$ git-svn clone -s file://localhost/home/foo/bar/ .
perl: /tmp/buildd/subversion-1.4.2dfsg1/subversion/libsvn_subr/path.c:114: svn_path_join: Assertion `is_canonical(base, blen)' failed.
Aborted

Has anyone here experienced this or similar issues? I've googled this assertion error before and I do come up with results, but they don't seem to be related to git-svn specifically. Could this error be perhaps the result of trying to use git-svn clone on a path of the form file://... rather than http://...?


Solution

  • Yeah, I don't think you use localhost in an SVN file:// URL. My git-svn clones use file:/// as the URL (so file:///var/lib/svn/blah to get at /var/lib/svn/blah on the local machine).