git svn fetch retrieves the same Subversion revision multiple times for branches

后端 未结 4 1389
醉酒成梦
醉酒成梦 2020-12-14 15:14

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 reposit

4条回答
  •  庸人自扰
    2020-12-14 15:36

    git-svn appears to be repeatedly pulling the same revisions because you have tags in your SVN repository. SVN's concept of a tag is slightly different from git's: SVN tags are actually branches (thus SVN tags are copies).

    Take a closer look at your output:

    r1 = d349ed8cb2d76596fe2b83224986275be4600fad (QuoteSvcFix442@2698)

    Although the revision r1 = looks too familiar, the rest of the text probably differs. At a minimum, the tag name (in this case QuoteSvcFix442@2698) will not be the same.

    I think the only way to prevent this is by having git-svn skip the SVN tags. If you can't live without the tags, you can also convert the SVN 'tag' branches to real git tags (but you have to fetch all the tag branches, first!)


    A related SO question with possible work-arounds: Can Git-svn be used on large, branched repositories?

    Some discussion about this issue: git-svn --tags should at least /try/ to handle tags as tags.

提交回复
热议问题