为什么"git svn fetch"命令似乎卡住了,什么也不做? [英] Why does "git svn fetch" command seem to be stuck and does nothing?

查看:378
本文介绍了为什么"git svn fetch"命令似乎卡住了,什么也不做?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方法. 现在我们了解了问题,这是解决方案:do

Workaround. Now we understand the issue, here is the solution: do

git svn fetch -r REVISION:HEAD

其中REVISION是分支创建的svn commit的数量.

where REVISION is the number of the svn commit of the branch creation.

使用git svn在项目主干上工作已经很高兴了,但是现在我还需要跟踪分支.

I've been happy using git svn to work on the trunk of my project for a while, but now I need to track branches also.

我试图初始化一个新的存储库来实现

I've tried to initialize a new repository to do that with

git init
git svn init https://svnserver/svn/repository

然后,我编辑本地配置文件以反映我的svn存储库的结构:

Then I edit the local configuration file to reflect the structure of my svn repository:

[svn-remote "svn"]
    url = https://svnserver/svn/repository
    fetch = path/to/trunk:refs/remotes/trunk
    branches = path/to/branches/*:refs/remotes/branches/*

然后我跑步

git svn fetch

此命令什么都不做:

  • 它不会终止
  • 它不会在控制台输出中写入任何内容
  • 它不使用任何CPU,也不创建文件

10分钟后我放弃了

我已经检查了svn存储库是否正常运行,因为git svn fetch在我仅跟踪干线的git存储库上可以正常工作.

I've checked that the svn repository is working, because git svn fetch works perfectly on my git repository where I track only the trunk.

这是一个错误还是我在这里错过了一些东西?

Is this a bug or am I missing something here ?

推荐答案

在获取了第一个相关的提交后,它变得冗长.

It becomes verbose after fetching the first relevant commit.

但是在获取该提交之前,您可以通过检查.git\svn\.metadata文件来确保命令正常运行. branches-maxRev = 123tags-maxRev = 123行将在工作时不断更新和增加其数量.

But until it fetches that commit, you can ensure the command is working properly by checking the .git\svn\.metadata file. The lines branches-maxRev = 123 and tags-maxRev = 123 will keep updating and increasing their numbers as it works.

这篇关于为什么"git svn fetch"命令似乎卡住了,什么也不做?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆