views:

377

answers:

2

I'm trying to use git to clone an svn repository with std layout (using the -s option). The repository uses https anonymously (the repository is at https://secure.simplistix.com/svn/xlwt/). I can check the repository out fine using svn, but with git-svn I get password prompts and then cannot check out (I don't have an account for this repository):

Authentication realm:  Simplistix Subversion Server
Password for 'davidf': 
Authentication realm:  Simplistix Subversion Server
Username: 
Password for '': 
Authentication realm:  Simplistix Subversion Server
Username: 
Password for '': 
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: '/svn/!svn/bc/100/xlwt' path not found
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories

The resulting repository is entirely empty

git-svn seems to assume that if the repository starts with https, authentication is required. Is there a way to work around this?

+1  A: 

Hey :-) That's my repo! I have an idea what this might be related to:

http://subversion.tigris.org/issues/show%5Fbug.cgi?id=3242

If it's not that, then you're likely out of luck... The root of my repository is not publicly accessible...

Chris Withers
It does indeed look like that - git-svn clone can check the whole thing out, but add the -s to get branch support and it fails... however downgrading to subversion 1.4 doesn't fix it, so it seems that this is actually a similar bug in git-svn itself
David Fraser
hgsubversion rescues this as it doesn't access this in the same way, so that's a workaround...
David Fraser
Yeah, the problem is on the server, not on the client.
Chris Withers
+1  A: 

The reason is probably that the root of the SVN repository is not accessible to anonymous users.

From git help svn:

When tracking multiple directories (using --stdlayout, --branches, or --tags options), git svn will attempt to connect to the root (or highest allowed level) of the Subversion repository. This default allows better tracking of history if entire projects are moved within a repository, but may cause issues on repositories where read access restrictions are in place.

Since you’re using the -s option (shorthand for --stdlayout), this will affect you.

To prevent git svn from attempting to connect to the root of the repository, add the option --no-minimize-url to the command line.

See also: git help svn

Daniel Cassidy