2011-10-12 85 views
1

我在Windows XP上使用msysgit來克隆SVN回購。經過很長時間的等待,我得到了一些錯誤,克隆無法繼續。它說:在git的核心/混帳svn的線3015在字符串EQ未初始化值的使用我在這個文件中的代碼中發現:git svn clone:在字符串eq中使用未初始化的值%git-core%/ git-svn line 3015

最後,如果($網址EQ $ GS-> full_url);

我不知道如何解決這個問題。 Git有這裏創造了許多分支,每添加一個 - 如

refs/remotes/[email protected]
refs/remotes/[email protected]
refs/remotes/[email protected]
refs/remotes/[email protected]
refs/remotes/[email protected]

等。

你能告訴我如何解決這個問題嗎?謝謝!

回答

0

我希望有更多知識的人會回答,但這裏是我發現的。 我使用的是相同的工具,頂部的$ VERSION是'1.7.6.msysgit.0'。

圍繞線3015我看到這個區塊的代碼:

while (1) { 
    # It is possible to tag two different subdirectories at 
    # the same revision. If the url for an existing ref 
    # does not match, we must either find a ref with a 
    # matching url or create a new ref by growing a tail. 
    $gs = Git::SVN->init($u, $p, $repo_id, $ref_id, 1); 
    my (undef, $max_commit) = $gs->rev_map_max(1); 
    last if (!$max_commit); 
    my ($url) = ::cmt_metadata($max_commit); 
    last if ($url eq $gs->full_url); 
    $ref_id .= '-'; 
} 
print STDERR "Initializing parent: $ref_id\n" unless $::_q > 1; 

線3015是 「最後如果($網址EQ $ GS-> full_url);」所以$ url或$ gs-> full_url是未定義的,這是程序不準備處理的一個條件。我懷疑存儲庫結構中的某些東西讓它感到困惑。在任何情況下,我們都可以假設沒有找到匹配的url,並退出循環。因此,如果我是你,我會試圖添加「最後除非(定義$ url & &定義$ gs-> full_url);」 3015之前,看看會發生什麼。它可能工作,可能不會。

實際上,調試程序首先要看看哪些是未定義的,並找出原因。作者可能有興趣修復它,特別是如果您可以發送存儲庫的副本。

相關問題