简体   繁体   English

为什么git svn获取速度如此之慢?

[英]Why is git svn fetch so slow?

I'm trying to git svn fetch my repo to perform a git rebase -i I'm performing the fetch locally why is it so slow? 我正在尝试git svn fetch我的repo来执行git rebase -i我在本地执行fetch为什么它这么慢? Should it really take so much time to create 1000 revisions? 是否真的需要这么多时间来创建1000个修订版? It seems like the process just "falls a sleep" on a file then suddenly there is a flurry of activity. 似乎这个过程只是在文件中“睡了一觉”然后突然出现了一连串的活动。

This seems to be a problem of the windows port of 'git svn'. 这似乎是'git svn'的windows端口的问题。 Or more specifically one of the perl libraries of 'git svn' on windows/cygwin. 或者更具体地说是windows / cygwin上'git svn'的perl库之一。

cloning a 12MB 75 revision svn repo 克隆12MB 75修订版svn repo

  linux: 45 seconds
  windows (cygwin): 25 minutes

After going through the same thing, I found it's quite a bit faster on linux than it is with cygwin on windows. 经历了同样的事情后,我发现它在Linux上的速度比在Windows上使用cygwin要快得多。 I'd give that a try. 我试试看。

git svn fetch ( and clone) have to do the heavy lifting and create the entire repository, talking to svn and creating the git repository on your local machine. git svn fetch(和clone)必须完成繁重的工作并创建整个存储库,与svn交谈并在本地计算机上创建git存储库。 You may do it on the same server where the svn server is ( which is what I think you meant by locally), but still the git svn client has to process a lots of revisions, processing them one-by-one and creating the repo. 您可以在svn服务器所在的同一服务器上执行此操作(这是我认为您在本地的意思),但仍然git svn客户端必须处理大量修订,逐个处理它们并创建repo 。 1000 revisions is a lot, it might take a while. 1000次修订很多,可能需要一段时间。 Be patient and let it do its job. 要有耐心,让它发挥作用。 When you work on the repo, make sure you fetch / rebase often. 当您处理仓库时,请确保经常获取/变换。

This problem still persists for Windows: pulling/fetching hangs, and nothing happens. Windows仍然存在这个问题:拉/挂起挂起,没有任何反应。

As an addition to all previous answers, I could suggest using of WSL on your Windows machine. 作为以前所有答案的补充,我建议在Windows机器上使用WSL You'll be pleasantly surprised by the speed with which the fetch will take place. 你会惊喜地发现fetch的速度。 It works like a charm. 它就像一个魅力。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM