Work-around for failing “git svn clone” (requiring full history)

前端 未结 5 1321
深忆病人
深忆病人 2021-01-31 09:47

I want to convert a Subversion repository sub-directory (denoted by module here) into a git repository with full history. There are many svn copy opera

5条回答
  •  迷失自我
    2021-01-31 10:01

    Not a full answer, but perhaps the snippet you are missing (I am interested in migrating as well, so I have found that part of the puzzle).

    When you look at the documentation of git-svn, you will find the following option:

    --no-minimize-url 
    

    When tracking multiple directories (using --stdlayout, --branches, or --tags options), git svn will attempt to connect to the root (or highest allowed level) of the Subversion repository. This default allows better tracking of history if entire projects are moved within a repository, but may cause issues on repositories where read access restrictions are in place. Passing --no-minimize-url will allow git svn to accept URLs as-is without attempting to connect to a higher level directory. This option is off by default when only one URL/branch is tracked (it would do little good).

    This fits to the situation you have, so that git svn does not try to read a higher level of the directory tree (which will be blocked).

    At least you could give it a try ...

提交回复
热议问题