git svn clone 格式错误的索引信息错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32465621/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 11:21:56  来源:igfitidea点击:

git svn clone malformed index info error

gitperlsvn

提问by Aelphaeis

When I run git svn clone I get the following error :

当我运行 git svn clone 时,出现以下错误:

  0 [main] perl 24432 cygwin_exception::open_stackdumpfile: Dumping stack trace to perl.exe.stackdump
  fatal: malformed index info 100644 362f1c18ceed5d593eb021432545685283a93 
  0 [main] perl 24432 cygwin_exception::open_stackdumpfile: Dumping stack trace to perl.exe.stackdump
  fatal: malformed index info 100644 362f1c18ceed5d593eb021432545685283a93 

When I open the file I see the following :

当我打开文件时,我看到以下内容:

Exception: STATUS_ACCESS_VIOLATION at rip=0048360C537 rax=00000006039F81E0 rbx=000000005219E248 rcx=000000060003A3C0 rdx=0000000000000000 rsi=000000000000FDB4 rdi=0000000000000004 r8 =0000000000000000 r9 =0000000000000000 r10=0000000000230000 r11=000000048D785FBA r12=0000000000000003 r13=000006FFFF7FEDB8 r14=00000006014D4030 r15=000006FFFF7FEDD0 rbp=000000000007EDA8 rsp=000000000022BE80 program=C:\Program Files\Git\usr\bin\perl.exe, pid 24432, thread main cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B

例外:STATUS_ACCESS_VIOLATION在RIP = 0048360C537 RAX = 00000006039F81E0 RBX = 000000005219E248 RCX = 000000060003A3C0 RDX = 0000000000000000 RSI = 000000000000FDB4 RDI = 0000000000000004 R8 = 0000000000000000 R9 = 0000000000000000 R10 = 0000000000230000 R11 = 000000048D785FBA R12 = 0000000000000003 R13 = 000006FFFF7FEDB8 R14 = 00000006014D4030 R15 = 000006FFFF7FEDD0 RBP =000000000007EDA8 rsp=000000000022BE80 程序=C:\Program Files\Git\usr\bin\perl.exe,pid 24432,线程主cs=0033 ds=002B es=002B fs=00050B gs=00520B gs

I checked the following links :

我检查了以下链接:

Error with Git SVN clone

Git SVN 克隆错误

Problem cloning a single SVN Branch via git svn

通过 git svn 克隆单个 SVN 分支的问题

Python SVN bindings for Windows

适用于 Windows 的 Python SVN 绑定

subversion python bindings documentation?

颠覆 python 绑定文档?

Unfortunately, I'm not familiar enough for the underlying technologies to figure out exactly what I should be doing. Would could be causing this and how might I be able to resolve?

不幸的是,我对底层技术不够熟悉,无法弄清楚我应该做什么。可能会导致这种情况,我该如何解决?

回答by Rajat Srivastava

I got this error while migrating huge svn repository to git using svn2git tool. I added below lines in my .git/config file and it started working:

我在使用 svn2git 工具将巨大的 svn 存储库迁移到 git 时遇到了这个错误。我在我的 .git/config 文件中添加了以下几行,它开始工作:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
    packedGitLimit = 256m
    packedGitWindowSize = 256m
    longpaths = true
[http]
    postBuffer = 524288000
[pack]
  deltaCacheSize = 256m
  packSizeLimit = 256m
  windowMemory = 1024m

These settings are explained at the git-config man page.

这些设置在git-config 手册页中有解释。

回答by matthias.lukaszek

Update:After updating to Ubuntu 17.04 with 2.11.0 and git-svn 1:2.11.0-2ubuntu0.2 the clone worked flawlessly.

更新:使用 2.11.0 和 git-svn 1:2.11.0-2ubuntu0.2 更新到 Ubuntu 17.04 后,克隆工作完美无缺。

I found a funny solution for that issue while debugging through the perl scripts:

在通过 perl 脚本进行调试时,我发现了一个有趣的解决方案:

  • Slow down or somehow manipulate the execution by running git svnin the perl debugger.
  • 通过git svn在 perl 调试器中运行来减慢或以某种方式操纵执行。

Start git svn fetchwith the following command (you might have to change the paths. This should also work with clone). Make sure to run the command inside your git repository / directory:

git svn fetch以下命令开始(您可能需要更改路径。这也适用于克隆)。确保在 git 存储库/目录中运行命令:

perl -d /usr/lib/git-core/git-svn fetch

Enter the following into the debugger and press ENTER:

在调试器中输入以下内容,然后按ENTER

b /usr/share/perl5/Git/SVN/Fetcher.pm:368 $base==undef or $dup==undef

This basically adds a conditional breakpoint at the position where I get the signal 11. This is the line of code:

这基本上在我得到信号 11 的位置添加了一个条件断点。这是这行代码:

[ SVN::TxDelta::apply($base, $dup, undef, $fb->{path}, $fb->{pool}) ];

Then enter cto continue the execution and press ENTER.

然后输入c继续执行并按ENTER

Can someone explain why this helps?

有人可以解释为什么这有帮助吗?

Edit: It worked: 213000 revisions and 1780 branches cloned into git!

编辑:它有效:213000 次修订和 1780 个分支克隆到 git 中!

回答by centic

I had similar exceptions and error messages, for me a

我有类似的异常和错误消息,对我来说

git gc

and/or a

和/或

git svn gc

brought the repository back into a usable state. See also https://stackoverflow.com/a/1436386/411846

使存储库恢复到可用状态。另见https://stackoverflow.com/a/1436386/411846

回答by P.D.P.

Check which svn commit caused the problem.

检查哪个 svn commit 导致了问题。

The commits are outputted by the git svn clonecommand, preceded by an r. The last commit that is outputted is the problematic one.

提交由git svn clone命令输出,前面是r。输出的最后一个提交是有问题的提交。

The next example shows what the git svn clonecommand outputs when begin procesing the Subversion revision15as the Git commit373fb1...:

下一个示例显示了git svn clone开始将Subversion 修订15作为Git 提交处理时命令输出的内容373fb1...

r15 = 373fb1de430a6b1e89585425f276aae0058c3deb (refs/remotes/svn/trunk)

Split up the git svn clonecommand using the -r(revision) option

git svn clone使用-r(revision) 选项拆分命令

Use this method:

使用这个方法:

git svn clone -r 0:<problematic_revision - 1> <repo URL>
git svn clone -r <problematic_revision - 1>:problematic_revision <repo URL>
git svn clone -r <problematic_revision>:HEAD <repo URL>

Supposing the revision 15as the problematic one, and the repo in /tmp/svn/repo/, the solution would be:

假设修订15是有问题的,并且是 中的回购/tmp/svn/repo/,解决方案将是:

git svn clone -r  0:14   file:///tmp/svn/repo/
git svn clone -r 14:15   file:///tmp/svn/repo/
git svn clone -r 15:HEAD file:///tmp/svn/repo/

回答by Rajeshwar Agrawal

Updated- The problem still occurs after git gc for me. I tried every version of git windows (both 32 and 64 bit), but still I got this error. Then I switched to using git on linux and it works fine for me, even for extremely large commits. I recommend to switch to linux otherwise you are out of luck as the issue raised here - https://github.com/git-for-windows/git/issues/274is almost 6 months old.

更新- 对我来说 git gc 后问题仍然存在。我尝试了每个版本的 git windows(32 位和 64 位),但仍然出现此错误。然后我转而在 linux 上使用 git,它对我来说很好用,即使对于非常大的提交也是如此。我建议切换到 linux,否则你会很不走运,因为这里提出的问题 - https://github.com/git-for-windows/git/issues/274已经快 6 个月了。

Updated- To add to centic's answer, the git gconly works fine for 32-bit git for windows, for this particular problem.

更新- 要添加到 centic 的答案中git gc,对于这个特定问题,唯一适用于 Windows 的 32 位 git。

I think the problem exists for 64-bit git for windows. I was having the same problem with 64 bit git, but after switching to git 2.7.2 windows 32-bit, the problems seems to be solved for me.

我认为 64 位 git for windows 存在问题。我在 64 位 git 上遇到了同样的问题,但是在切换到 git 2.7.2 windows 32 位后,问题似乎对我来说解决了。

回答by Marc W.

For me the only solution that worked was using an older version of Git. I used the portable package of Git 1.8.3 which can be downloaded here:

对我来说,唯一有效的解决方案是使用旧版本的 Git。我使用了 Git 1.8.3 的便携包,可以在这里下载:

https://github.com/msysgit/msysgit/releases/tag/Git-1.8.3-preview20130601

https://github.com/msysgit/msysgit/releases/tag/Git-1.8.3-preview20130601

with it there was no need for .git/config edits, splitted checkouts, or perl debug statements.

有了它,就不需要 .git/config 编辑、拆分结帐或 perl 调试语句。

回答by feos

I was getting all sorts of errors with git-svn where the perl script would die in various places, fetching would break, or the server would cut the connection. This was a huge repo that took dozens GBs when checked out via svn.

我在使用 git-svn 时遇到了各种各样的错误,其中 perl 脚本会在不同的地方死掉,获取会中断,或者服务器会切断连接。这是一个巨大的存储库,通过 svn 签出时占用了数十 GB。

What solved this for me was simply using SmartGit instead of git-svn. It required Java 8, ran extremely fast, and reported no errors whatsoever, seamlessly completing in a few hours the task that took svn several days.

为我解决这个问题的只是使用 SmartGit 而不是 git-svn。它需要 Java 8,运行速度极快,并且没有任何错误报告,在几个小时内无缝完成了 svn 几天的任务。

回答by lcltj

Here is the problem I have:

这是我遇到的问题:

  • OS: xubuntu 16.04
  • git-svn version 2.7.4 (svn 1.9.3)
  • 操作系统:xubuntu 16.04
  • git-svn 版本 2.7.4 (svn 1.9.3)

Trace info from perl -d /usr/lib/git-core/git-svn fetch:

跟踪信息来自perl -d /usr/lib/git-core/git-svn fetch

Signal SEGV at /usr/local/share/perl/5.22.1/Git/SVN/Fetcher.pm line 368
    Git::SVN::Fetcher::apply_textdelta(Git::SVN::Fetcher=HASH(0x20ee160), HASH(0x2488a40), undef, _p_apr_pool_t=SCALAR(0x2488bf0)) called at /usr/lib/x86_64-linux-gnu/perl5/5.22/SVN/Ra.pm line 623
    SVN::Ra::Reporter::AUTOLOAD(SVN::Ra::Reporter=ARRAY(0x8d0fa0), SVN::Pool=REF(0x20ee910)) called at /usr/local/share/perl/5.22.1/Git/SVN/Ra.pm line 308
    Git::SVN::Ra::gs_do_update(Git::SVN::Ra=HASH(0x20df170), 42560, 42560, Git::SVN=HASH(0x20dea08), Git::SVN::Fetcher=HASH(0x20ee160)) called at /usr/local/share/perl/5.22.1/Git/SVN.pm line 1205
    Git::SVN::do_fetch(Git::SVN=HASH(0x20dea08), HASH(0x20ee1d8), 42560) called at /usr/local/share/perl/5.22.1/Git/SVN/Ra.pm line 471
    Git::SVN::Ra::gs_fetch_loop_common(Git::SVN::Ra=HASH(0x20df170), 42500, 95400, ARRAY(0x1637c08), ARRAY(0x1637c20)) called at /usr/local/share/perl/5.22.1/Git/SVN.pm line 179
    Git::SVN::fetch_all("svn", HASH(0x20dee28)) called at /usr/lib/git-core/git-svn line 570
    main::cmd_fetch() called at /usr/lib/git-core/git-svn line 386
    eval {...} called at /usr/lib/git-core/git-svn line 384
Aborted (core dumped)


I finally fixed this problem by the following steps(This is for Ubuntu Linux 16.04 users):

我最终通过以下步骤解决了这个问题(这是针对 Ubuntu Linux 16.04 用户的):

sudo apt build-dep subversion
sudo apt install libneon27-dev
sudo cpan SVN::Core

Then I can use git svn fetch/clonewithout any crash.

然后我可以使用git svn fetch/clone而不会发生任何崩溃。

The root cause of this problem is that the Perl SVN::Core library script does not match the binaries installed in Perl(There are separate subversion binaries installed in Perl beside the system installed ones).

此问题的根本原因是 Perl SVN::Core 库脚本与 Perl 中安装的二进制文件不匹配(除了系统安装的之外,Perl 中还安装了单独的 subversion 二进制文件)。

Beware this will downgrade your git-svn's svn version to 1.8.11(before it's 1.9.3), and might cause other problems.

请注意,这会将您的 git-svn 的 svn 版本降级到 1.8.11(在 1.9.3 之前),并且可能会导致其他问题。

回答by h3n

In my case, I was not connected to our VPN, which is needed for our svn connection. This is my error:

就我而言,我没有连接到我们的 VPN,这是我们的 svn 连接所需要的。这是我的错误:

Exception: STATUS_ACCESS_VIOLATION at rip=00000000000
rax=0000000000000000 rbx=00000006010BBDA8 rcx=00000006010BBDA8
rdx=00000006010C40E8 rsi=0000000000000011 rdi=0000000000000000
r8 =0000000000000000 r9 =00000006010EBCA8 r10=0000000100000000
r11=000000049F2423C9 r12=00000000FFFFC190 r13=00000000FFFFC198
r14=00000006010B2DF8 r15=00000006010B2D68
rbp=00000000FFFFC1A8 rsp=00000000FFFFC138
program=C:\Program Files\Git\usr\bin\perl.exe, pid 7884, thread main
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame        Function    Args
End of stack trace

回答by sevensevens

I was able to check out the svn repo correctly using Cygwin.

我能够使用Cygwin正确检查 svn 存储库。