I'm trying to use git svn
to clone a SVN repo into Git.
I run the following command:
C:\Projects>git svn clone -T trunk -b branches -t tags --no-metadata https://svn.mycompany.com/Projects/MyProject MyProject
And I get the following error:
Found possible branch point: https://svn.mycompany.com/Projects/MyProject/trunk => https://svn.mycompany.com/Projects/MyProject/tags/11.1.9.33334, 33334
Use of uninitialized value in substitution (s///) at /usr/lib/perl5/site_perl/Git/SVN.pm line 106.
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/Git/SVN.pm line 106.refs/remotes/MyProject-10.2: 'https://svn.mycompany.com/Projects' not found in ''
Version of git is:
1.8.1.msysgit.1
My problem was that due to such a large SVN (files and log) that it kept crashing at some points and when I restarted it created multiple lines of the branches and tags within my .git/config file.
I simply removed the duplicate entries of these and restarted with my command
I had the same error and solved it by upgrading to
git version 2.6.2.windows.1
Same error. I am converting my SVN repository to Git.
v1, trunk address is wrong, set by mistake to same as repository root:
v2 works: corrected the paths (and using relative instead of absolute to make line shorter)
As suggested by others, I opened the config file (C:\code\Git_myproject.git\config) and the first version (broken) was as follow. The fetch is probably the wrong thing comparing with v2 (branches and tags are duplicated too, some people say it might also cause problems).
and the 2nd version (working) was:
Looking at svn.pm, I can see we're in
find_parent_branch()
which outputs the message"Found possible branch point"
. It then callsother_gs($new_url, $url, $branch_from, $r, $self->{ref_id});
which itself calls:Git::SVN->find_by_url($new_url, $url, $branch_from);
which calls:resolve_local_globs($u, $fetch, $globspec);
andresolve_local_globs
is where the error is thrown on line 100/101:I made a mistake in my command line for sure, fixing my trunk path removed the error. I never removed duplicate lines in the config file, they were adjusted automatically when re-running the command.