2013-03-13 7 views
30

私はgit svnを使ってGitにSVNリポジトリをクローンしています。Git Svn - 可能な分岐点を見つけました

私は、次のコマンドを実行します。

C:\Projects>git svn clone -T trunk -b branches -t tags --no-metadata https://svn.mycompany.com/Projects/MyProject MyProject

を私は次のエラーを取得:gitのの

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 ''

バージョンは次のとおりです。

1.8.1.msysgit.1

+0

ヒント:「可能な分岐点」メッセージは正常でエラーはありません。 – eckes

+0

Ok ...しかし、私のrepoフォルダにはトランクブランチやタグは含まれていません.... .gitフォルダは唯一のものです – Alex

+0

** no **タグ 'https://svn.mycompany.com/プロジェクト/ MyProject/tags/11.1.9.33334'?あなたはこれを言及すべきです... – eckes

答えて

62

私の問題は、そのような大きなSVN(ファイルとログ)のために、いくつかの点でクラッシュし続けていたことと、再起動したときでした私の.git/configファイル内にブランチとタグの複数行を作成しました。

​​

私は単に私のコマンド

git svn fetch 
+5

私は同じ問題を抱えていましたが、[svn2git](https://github.com/nirvdrum/svn2git)私はsvn2gitが "再開"するとそれらを追加したので、ブランチとタグのすべてのエントリを削除しました。先端に感謝します。 –

+5

私のために働いた。私は "git svn fetch"で再開 – Wolfgang

+1

.git/configファイルで重複を取り除いた後に働いてくれました。ありがとうございました。 – Koti

0

でこれらの重複したエントリを削除し、再起動、私は同じエラーを持っていたgit version 2.6.2.windows.1

0

同じエラーにアップグレードすることで、それを解決しました。 SVNリポジトリをGitに変換しています。

C:\Windows\system32>git svn clone https://mycompany.svn.beanstalkapp.com/myproject 
     --no-metadata -A c:\temp\svn_to_git_users.txt 
     --trunk=https://mycompany.svn.beanstalkapp.com/myproject 
     --tags=https://mycompany.svn.beanstalkapp.com/myproject/tags 
     --branches=https://mycompany.svn.beanstalkapp.com/myproject/branches 
     c:\code\Git_myproject 

[...] 
W: +empty_dir: branches/20080918_DBDEPLOY/vendor/src/csharp/MS WCSF Contrib/src/Services 
W: +empty_dir: branches/20080918_DBDEPLOY/vendor/src/csharp/RealWorldControls/References 
r530 = c276e3b039d8e38759c6fb17443349732552d7a2 (refs/remotes/origin/trunk) 
Found possible branch point: https://mycompany.svn.beanstalkapp.com/myproject/trunk => https://mycompany.svn.beanstalkapp.com/myproject/branches/20080918_DBDEPLOY, 529 
Use of uninitialized value $u in substitution (s///) at /mingw32/share/perl5/site_perl/Git/SVN.pm line 101. 
Use of uninitialized value $u in concatenation (.) or string at /mingw32/share/perl5/site_perl/Git/SVN.pm line 101. 
refs/remotes/origin/trunk: 'https://mycompany.svn.beanstalkapp.com/myproject' not found in '' 

C:\Windows\system32> 

v2の作品:パスを修正(ライン短くする代わりに、絶対の相対的な使用)

をリポジトリのルートと同じに誤って設定され

git version 2.8.2.windows.1 
Windows 8.1 Pro 64bits, running Git For Windows 32bits. 

V1、トランクアドレスが間違っています、

C:\Windows\system32>git svn clone https://mycompany.svn.beanstalkapp.com/myproject 
     --no-metadata -A c:\temp\svn_to_git_users.txt --trunk=trunk 
     --tags=tags --branches=branches c:\code\Git_myproject 
[...] 
r529 = 40442d32486f4ca6f713e659b3785a446bd19de6 (refs/remotes/origin/trunk) 
Found possible branch point: https://mycompany.svn.beanstalkapp.com/myproject/trunk => https://mycompany.svn.beanstalkapp.com/myproject/branches/20080918_DBDEPLOY, 529 
Found branch parent: (refs/remotes/origin/20080918_DBDEPLOY) 40442d32486f4ca6f713e659b3785a446bd19de6 
Following parent with do_switch 
Successfully followed parent 
r530 = 9fefc1b3a892555e315d55c2024cdf3d3a05010f (refs/remotes/origin/20080918_DBDEPLOY) 
     A  src/database/sds.dbd 
[...] 

他の人に示唆されているように、私はconfigファイル(C:\ code \ Git_myproject.git \ config)を開き、最初のバージョン(broken)は以下の通りです。フェッチはおそらくv2と比較して間違っています(ブランチとタグも重複していますが、問題を引き起こす可能性もあります)。

[svn-remote "svn"] 
noMetadata = 1 
url = https://mycompany.svn.beanstalkapp.com/myproject 
fetch = :refs/remotes/origin/trunk 
branches = branches/*:refs/remotes/origin/* 
tags = tags/*:refs/remotes/origin/tags/* 
branches = branches/*:refs/remotes/origin/* 
tags = tags/*:refs/remotes/origin/tags/* 

と(作業)第二バージョンは以下のとおりであった:

[svn-remote "svn"] 
noMetadata = 1 
url = https://mycompany.svn.beanstalkapp.com/myproject 
fetch = trunk:refs/remotes/origin/trunk 
branches = branches/*:refs/remotes/origin/* 
tags = tags/*:refs/remotes/origin/tags/* 

svn.pmを見ると、私たちはメッセージ"Found possible branch point"を出力find_parent_branch()にいる見ることができます。エラーがライン100/101にスローされた場合 resolve_local_globs($u, $fetch, $globspec);resolve_local_globsは次のとおりです:呼び出す Git::SVN->find_by_url($new_url, $url, $branch_from); :それは、自身が呼び出す other_gs($new_url, $url, $branch_from, $r, $self->{ref_id}); を呼び出し

my $u = (::cmt_metadata("$refname"))[0]; 
$u =~ s!^\Q$url\E(/|$)!! or die 

私は確かに私のコマンドラインでミスを犯しました私のトランクパスを修正すると、エラーが取り除かれました。私は設定ファイルで重複した行を削除したことはありません。コマンドを再実行すると自動的に調整されました。