git svn克隆在Windows上完美无瑕,在OS X上静默崩溃 - 外部支持的状态?

时间:2016-02-25 18:10:50

标签: git macos perl svn clone

我正在尝试使用git svn来克隆包含外部的存储库。在我的Windows7机器上它完美运行。在我的Mac上,它在创建空本地存储库后无声地失败。

与此相关的一些问题的帖子已有两年多了,所以我希望情况有所改变。

我尝试过使用XCode安装的Git和SVN版本,以及安装了HomeBrew和MacPorts的新版本。最新版本的Git(2.7.2)就是我用故障排除的那个。

我发现线程需要将SVN Perl模块链接到Perl运行时搜索的目录中,并且做了类似的事情:

sudo ln -s /opt/local/lib/perl5/vendor_perl/5.22/darwin-thread-multi-2level/SVN /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/SVN
sudo ln -s /opt/local/lib/perl5/vendor_perl/5.22/darwin-thread-multi-2level/auto /opt/local/lib/perl5/site_perl/5.22/auto

如果我尝试打开Git的调试器,就像这样:

GIT_TRACE=1 git svn clone -s https://my-remote-repo

我得到了一堆类似于下面的冗余消息,当Git遇到第一个外部引用时发生了一些可疑的事情:

...
Checked through r45000
16:49:19.677091 git.c:348 trace: built-in: git 'config' 'svn-remote.svn.branches-maxRev' '45000'
16:49:19.684111 git.c:348 trace: built-in: git 'config' 'svn-remote.svn.tags-maxRev' '45000' 
Checked through r45100
16:49:19.721522 git.c:348 trace: built-in: git 'config' 'svn-remote.svn.branches-maxRev' '45100' 
16:49:19.728460 git.c:348 trace: built-in: git 'config' 'svn-remote.svn.tags-maxRev' '45100'
16:49:19.784923 git.c:348 trace: built-in: git 'config' 'svn-remote.svn.reposRoot' 'https://a-remote-external' 
16:49:19.807647 git.c:348 trace: built-in: git 'config' 'svn-remote.svn.branches-maxRev' '45172' 
16:49:19.814647 git.c:348 trace: built-in: git 'config' 'svn-remote.svn.tags-maxRev' '45172'

如果我像这样运行Perl调试器:

PERLDB_OPTS="NonStop frame=5" /opt/local/bin/perl5.22 -d $(git --exec-path)/git-svn clone -s https://my-remote-repository

我崩溃之前就得到了以下的stacktrace。看起来多个进程正在向TTY发送输出,因此堆栈跟踪是交错的。

在底部有一个对Error :: throw()的引用
  in  .=main::post_fetch_checkout() from /opt/local/libexec/git-core/git-svn:387
   in  $=main::verify_ref('HEAD^0') from /opt/local/libexec/git-core/git-svn:1716
    in  $=Git::command_oneline(ref(ARRAY), ref(HASH)) from /opt/local/libexec/git-core/git-svn:1806
     in  @=Git::command_output_pipe(ref(ARRAY), ref(HASH)) from /opt/local/lib/perl5/site_perl/5.22/Git.pm:314
      in  @=Git::_command_common_pipe('-|', ref(ARRAY), ref(HASH)) from /opt/local/lib/perl5/site_perl/5.22/Git.pm:344
       in  @=Git::_maybe_self(ref(ARRAY), ref(HASH)) from /opt/local/lib/perl5/site_perl/5.22/Git.pm:1561
        in  $=UNIVERSAL::isa(ref(ARRAY), 'Git') from /opt/local/lib/perl5/site_perl/5.22/Git.pm:1549
       in  .=Git::_check_valid_cmd('rev-parse') from /opt/local/lib/perl5/site_perl/5.22/Git.pm:1569
from /opt/local/lib/perl5/site_perl/5.22/Git.pm:1598
        in  .=Git::_setup_git_cmd_env(undef) from /opt/local/lib/perl5/site_perl/5.22/Git.pm:1608
        in  .=Git::_execv_git_cmd('rev-parse', '--verify', 'HEAD^0') from /opt/local/lib/perl5/site_perl/5.22/Git.pm:1609
     in  @=Error::subs::with(ref(CODE)) from /opt/local/lib/perl5/site_perl/5.22/Git.pm:325
     in  $=Error::catch('Git::Error::Command', ref(CODE)) from /opt/local/lib/perl5/site_perl/5.22/Git.pm:325
     in  .=Error::subs::try(ref(CODE), ref(HASH)) from /opt/local/lib/perl5/site_perl/5.22/Git.pm:325
      in  .=CODE(0x7fa8a367bd40)() from /opt/local/lib/perl5/vendor_perl/5.22/Error.pm:421
       in  .=Git::_cmd_close('rev-parse --verify HEAD^0', ref(GLOB)) from /opt/local/lib/perl5/site_perl/5.22/Git.pm:319
        in  .=Error::throw('Git::Error::Command', 'rev-parse --verify HEAD^0', 128) from /opt/local/lib/perl5/site_perl/5.22/Git.pm:1640
         in  $=Git::Error::Command::new('Git::Error::Command', 'rev-parse --verify HEAD^0', 128) from /opt/local/lib/perl5/vendor_perl/5.22/Error.pm:184
          in  $=Error::new('Git::Error::Command', '-text', 'command returned error', '-cmdline', 'rev-parse --verify HEAD^0', '-value', 128, '-outputref', undef) from /opt/local/lib/perl5/site_perl/5.22/Git.pm:1466
      in  $=CODE(0x7fa8a31d3db8)(ref(Git::Error::Command), undef, '') from /opt/local/lib/perl5/vendor_perl/5.22/Error.pm:426
      in  $=Error::subs::run_clauses(ref(HASH), ref(Git::Error::Command), undef, ref(ARRAY)) from /opt/local/lib/perl5/vendor_perl/5.22/Error.pm:432
       in  $=Scalar::Util::blessed(ref(Git::Error::Command)) from /opt/local/lib/perl5/vendor_perl/5.22/Error.pm:324
       in  $=UNIVERSAL::isa(ref(Git::Error::Command), 'Git::Error::Command') from /opt/local/lib/perl5/vendor_perl/5.22/Error.pm:324
       in  .=CODE(0x7fa8a23a74b8)(ref(Git::Error::Command), ref(SCALAR)) from /opt/local/lib/perl5/vendor_perl/5.22/Error.pm:345
        in  .=Error::throw(ref(Git::Error::Command)) from /opt/local/lib/perl5/site_perl/5.22/Git.pm:324
       in  $=CODE(0x7fa8a31d3db8)(ref(Git::Error::Command), undef, '') from /opt/local/lib/perl5/vendor_perl/5.22/Error.pm:354
      in  $=Scalar::Util::blessed(ref(Git::Error::Command)) from /opt/local/lib/perl5/vendor_perl/5.22/Error.pm:440
      in  $=UNIVERSAL::can(ref(Git::Error::Command), 'throw') from /opt/local/lib/perl5/vendor_perl/5.22/Error.pm:440
      in  .=Error::throw(ref(Git::Error::Command)) from /opt/local/lib/perl5/vendor_perl/5.22/Error.pm:442

问题:我可以在我的MacBook上使用Git / SVN吗?如果没有,我可以利用其他替代方案吗?

0 个答案:

没有答案