tags:

views:

172

answers:

2

I have tried the following command on my SVN Repository to clone only a single branch via git.

git svn clone  http://svn.supose.org/supose/branches/B_0.7.1

but got the the following error message:

Initialized empty Git repository in /Users/km/workspace-supose/git/B_0.7.1/.git/
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no    item: '/supose/!svn/bc/100/branches/B_0.7.1' 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
error: git-svn died of signal 10
mac:git km$ 


mac:git km$ git --version
git version 1.7.1

Does someone has an idea what is going wrong ?

Update: I turned on trace via environment variable. Tried it and it failed as well. Updated to git 1.7.2 with the same result.

mac:git km$ git svn clone  http://svn.supose.org/supose/branches/B_0.7.1
trace: exec: 'git-svn' 'clone' 'http://svn.supose.org/supose/branches/B_0.7.1'
trace: run_command: 'git-svn' 'clone' 'http://svn.supose.org/supose/branches/B_0.7.1'
trace: built-in: git 'config' '--bool' '--get' 'svn.noauthcache'
trace: built-in: git 'config' '--bool' '--get' 'svn.nometadata'
trace: built-in: git 'config' '--get' 'svn.revision'
trace: built-in: git 'config' '--get' 'svn.rewriteuuid'
trace: built-in: git 'config' '--bool' '--get' 'svn.usesvmprops'
trace: built-in: git 'config' '--bool' '--get' 'svn.nocheckout'
trace: built-in: git 'config' '--get' 'svn.authorsprog'
trace: built-in: git 'config' '--bool' '--get-all' 'svn.branches'
trace: built-in: git 'config' '--bool' '--get' 'svn.usesvnsyncprops'
trace: built-in: git 'config' '--bool' '--get' 'svn.followparent'
trace: built-in: git 'config' '--get' 'svn.prefix'
trace: built-in: git 'config' '--bool' '--get' 'svn.useSvmProps'
trace: built-in: git 'config' '--get' 'svn.authorsfile'
trace: built-in: git 'config' '--get' 'svn.username'
trace: built-in: git 'config' '--bool' '--get' 'svn.stdlayout'
trace: built-in: git 'config' '--get' 'svn.repackflags'
trace: built-in: git 'config' '--bool' '--get' 'svn.localtime'
trace: built-in: git 'config' '--int' '--get' 'svn.repack'
trace: built-in: git 'config' '--get' 'svn.template'
trace: built-in: git 'config' '--get' 'svn.ignorepaths'
trace: built-in: git 'config' '--bool' '--get' 'svn.minimizeurl'
trace: built-in: git 'config' '--get' 'svn.rewriteroot'
trace: built-in: git 'config' '--bool' '--get' 'svn.quiet'
trace: built-in: git 'config' '--int' '--get' 'svn.logwindowsize'
trace: built-in: git 'config' '--get' 'svn.shared'
trace: built-in: git 'config' '--get' 'svn.configdir'
trace: built-in: git 'config' '--bool' '--get' 'svn.addauthorfrom'
trace: built-in: git 'config' '--bool' '--get' 'svn.noMetadata'
trace: built-in: git 'config' '--bool' '--get' 'svn.useSvnsyncProps'
trace: built-in: git 'config' '--bool' '--get-all' 'svn.tags'
trace: built-in: git 'config' '--get' 'svn.trunk'
trace: built-in: git 'config' '--bool' '--get' 'svn.uselogauthor'
trace: built-in: git 'init'
Initialized empty Git repository in /Users/km/workspace-supose/git/B_0.7.1/.git/
trace: built-in: git 'config' '--bool' 'svn.useSvmProps'
trace: built-in: git 'config' '-l'
trace: built-in: git 'config' '--get' 'svn-remote.svn.url'
trace: built-in: git 'config' '-l'
trace: built-in: git 'config' 'svn-remote.svn.url' 'http://svn.supose.org/supose/branches/B_0.7.1'
trace: built-in: git 'config' '--add' 'svn-remote.svn.fetch' ':refs/remotes/git-svn'
trace: built-in: git 'config' '--bool' 'svn.useSvmProps'
trace: built-in: git 'config' '-l'
trace: built-in: git 'config' '--get' 'svn-remote.svn.fetch' ':refs/remotes/git-svn$'
trace: built-in: git 'config' '--get' 'svn-remote.svn.url'
trace: built-in: git 'config' '--get' 'svn-remote.svn.uuid'
trace: built-in: git 'config' 'svn-remote.svn.reposRoot' 'http://svn.supose.org/supose'
trace: built-in: git 'config' '--get' 'svn-remote.svn.usesvmprops'
trace: built-in: git 'config' '--add' 'svn-remote.svn.uuid' 'd38d36a4-06d2-11df-b1fb-6b773c2c1a53'
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: '/supose/!svn/bc/100/branches/B_0.7.1' 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
trace: built-in: git 'config' '--get' 'svn-remote.svn.nometadata'
trace: built-in: git 'config' '--get' 'svn-remote.svn.followparent'
trace: built-in: git 'config' '--bool' '--get' 'svn.brokenSymlinkWorkaround'
trace: built-in: git 'config' '--get' 'svn-remote.svn.ignore-paths'
trace: built-in: git 'update-index' '-z' '--index-info'
trace: built-in: git 'config' 'svn-remote.svn.reposRoot' 'http://svn.supose.org/supose'
error: git-svn died of signal 10
A: 

A good place to start would be the setting the GIT_TRACE environment variable to 1. I'm a git user, not an SVN user, so I'm not sure what your exact problem is, but it'll give you more verbosity.

Update: I've been reading more into the docs and it appears to me that you may not be able to only clone a single branch per se; you might only be able to clone at least the trunk and the branch of interest. From looking at the docs it looks like branches are second-class citizens in SVN compared to trunk, as opposed to git in which branches are rather more modular. Honestly the easiest thing to do is probably to clone the entire repo.

But if you really don't want that you might be able to hack a solution together:

git svn init --stdlayout http://svn.supose.org/supose

Then edit .git/config in the repo like this:

[svn-remote "supose"]
        url = http://svn.supose.org/supose
        fetch = trunk:refs/remotes/trunk
        branches = branches/B_0.7.1:refs/remotes/branches/*

Then git svn fetch.

It's a shot in the dark, but it just might work.

Update 2: Ok, so much for that (see comment below). Dan's suggestion seems best; but if you want to squeeze some more information out of the script then run git --exec-path to find your git command executables. Then add the -d option to the first line of git-svn (i.e. #!/usr/bin/perl becomes #!/usr/bin/perl -d). This might shed some light on where exactly the breakdown occurs. Just remember to remove it when you're done with it!

Matthew Phipps
There is nothing wrong with trying to clone a single Subversion branch (or any arbitrary subdirectory, for that matter). It ought to work just fine.
Dan Moulding
Thanks; I wasn't sure. Kudos for pointing me away from a wild goose chase :) I'm rather confused why the trace supposedly died during a git config though. Maybe we should see how far in the perl it's getting.
Matthew Phipps
+1  A: 

git-svn is actually a Perl script. The git executable itself is really just a program that launches other programs. The "died of signal" message is coming from the git launcher. Signal 10 is usually SIGBUS. This could mean a number of things:

  • There is a problem with Perl
  • There is a problem with the Subversion Perl bindings
  • There is a problem with the Subversion client

It also might mean there's a bug in git-svn that you've encountered, but that seems highly unlikely (a bug in a Perl script should never cause Perl to bus error).

I would check the versions of all of the above and verify that they are all compatible with each other.

Dan Moulding