git svn fetch对分支检索多次相同的Subversion版本 [英] git svn fetch retrieves the same Subversion revision multiple times for branches

查看:168
本文介绍了git svn fetch对分支检索多次相同的Subversion版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到git svn fetch在Subversion版本库中发现分支时反复检索相同的Subversion
版本。我们使用标准的Subversion版本库布局
,最高级
/ trunk,/ tags和/ branches目录(并且git存储库是使用'git svn init -s'创建的
) 。但是,有问题的分支是
通常是从trunk中的子目录拷贝而不是
trunk。



git svn fetch输出通常看起来像像这样:

 
r2537 = d5b22e956157af036d4112e42e8fb927e45758c8(中继线)
M企业/ VC / libgc / SymbolVenue.cpp
r2538 = cfed4ca0491da0b732f32bfff72ba678450a0915(trunk)
找到可能的分支点:http:// repo / prod_repos / trunk / Enterprise / VC => http:// repo / prod_repos / branches / file_conversion,2523
W:Refspec glob冲突(ref:refs / remotes / scripter @ 832):
预期路径:branches / scripter @ 832
实际路径:trunk / Enterprise / Python
继续前进trunk / Enterprise / Python
W:Refspec glob冲突(ref:refs / remotes / trunk):
预期路径:branches / trunk
实际路径:trunk
继续前进trunk b $ b初始化父文件:file_conversion @ 2523
A gc / QuoteService.cpp
A g c / TestSuite.h
A gc / quote_svc.pro
A gc / QuoteService.h
.....

r1 = d349ed8cb2d76596fe2b83224986275be4600fad(QuoteSvcFix442 @ 2698)
D gc / FixMessageLogger.h
.....
r5 =
r19 =
r20 =
.....

然后我们回到修订版本1. git svn fetch然后
继续获取修订版,直到它达到修订版
创建了分支。



我做错了什么?有没有反正我告诉git svn fetch to
不能检索它已经被取消的修订版本?

解决方案

这个问题因为我得到了同样的错误信息:

pre $ W $ Refspec glob conflict(ref:refs / remotes / trunk):
预期路径:branches / trunk
实际路径:trunk

原来, .git / config有重复的行似乎混淆了git-svn,就像这样:

  [svn-remotesvn] 
...
branches = project / branches / *:refs / remotes / *
tags = project / tags / *:refs / remotes / tags / *
branches = project / branches / *:refs / remotes / *
tags = project / tags / *:refs / remotes / tags / *

删除这些重复项为我解决了怪异的git-svn行为,也可能适合您。我不确定是什么原因导致git-svn首先复制这些信息。我杀了并继续初始克隆,这可能是相关的?


I am seeing git svn fetch repeatedly retrieve the same Subversion revisions when it finds branches in my Subversion repository. We are using the standard Subversion repository layout, with top level /trunk, /tags, and /branches directories (and the git repository was created with 'git svn init -s'). However, the problematic branches are often copies made from a subdirectory inside of trunk, instead of trunk.

The git svn fetch output typically looks something like this:

r2537 = d5b22e956157af036d4112e42e8fb927e45758c8 (trunk)
        M       Enterprise/VC/libgc/SymbolVenue.cpp
r2538 = cfed4ca0491da0b732f32bfff72ba678450a0915 (trunk)
Found possible branch point: http://repo/prod_repos/trunk/Enterprise/VC => http://repo/prod_repos/branches/file_conversion, 2523
W: Refspec glob conflict (ref: refs/remotes/scripter@832):
expected path: branches/scripter@832
    real path: trunk/Enterprise/Python
Continuing ahead with trunk/Enterprise/Python
W: Refspec glob conflict (ref: refs/remotes/trunk):
expected path: branches/trunk
    real path: trunk
Continuing ahead with trunk
Initializing parent: file_conversion@2523
        A       gc/QuoteService.cpp
        A       gc/TestSuite.h
        A       gc/quote_svc.pro
        A       gc/QuoteService.h
.....

r1 = d349ed8cb2d76596fe2b83224986275be4600fad (QuoteSvcFix442@2698)
        D       gc/FixMessageLogger.h
.....
r5 =
r19 =
r20 = 
.....

And we are back at revision 1. git svn fetch then continues to fetch revisions until it reaches the revision that created the branch.

What am I doing wrong? Is there anyway for me to tell git svn fetch to not retrieve revisions it has already pulled?

解决方案

I noticed this question because I got the same error message:

W: Refspec glob conflict (ref: refs/remotes/trunk):
expected path: branches/trunk
    real path: trunk

It turned out that .git/config had duplicate lines that seem to confuse git-svn, like this:

[svn-remote "svn"]
...
    branches = project/branches/*:refs/remotes/*
    tags = project/tags/*:refs/remotes/tags/*
    branches = project/branches/*:refs/remotes/*
    tags = project/tags/*:refs/remotes/tags/*

Removing those duplicates solved weird git-svn behaviour for me, and might as well for you. I'm not sure what caused git-svn to duplicate this information in the first place. I killed and continued the initial clone, this might be related?

这篇关于git svn fetch对分支检索多次相同的Subversion版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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