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

后端 未结 4 1385
醉酒成梦
醉酒成梦 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:41

    If, at any point, the trunk of your repository existed at a different location in SVN, try specifying this location to additionally fetch in the repository's config file. For example:

    [svn-remote "svn"]
    ... 
        fetch = project/trunk:refs/remotes/origin/trunk
        fetch = previous/location/of/trunk:refs/remotes/origin/trunk-old1
        fetch = another/location/of/trunk:refs/remotes/origin/trunk-old2
        ...
    

    For the project I was importing, there were many branches and tags that had been created from these previous locations. Since these were branches/tags created from an 'unknown' place, git svn was throwing up its hands and just fetching all the history to find out. (This approach still required a full fetch for each location, but that was MUCH faster than a full history fetch for every tag)

提交回复
热议问题