On 5/15/19, Maxim Kuvyrkov <maxim.kuvyr...@linaro.org> wrote: >> On May 15, 2019, at 2:19 PM, Richard Biener <richard.guent...@gmail.com> >> wrote: >> >> On Tue, May 14, 2019 at 6:11 PM Maxim Kuvyrkov >> <maxim.kuvyr...@linaro.org> wrote: >>> >>> This patch adds scripts to contrib/ to migrate full history of GCC's >>> subversion repository to git. My hope is that these scripts will finally >>> allow GCC project to migrate to Git. >>> >>> The result of the conversion is at >>> https://github.com/maxim-kuvyrkov/gcc/branches/all . Branches with "@rev" >>> suffixes represent branch points. The conversion is still running, so >>> not all branches may appear right away. >>> >>> The scripts are not specific to GCC repo and are usable for other >>> projects. In particular, they should be able to convert downstream GCC >>> svn repos. >>> >>> The scripts convert svn history branch by branch. They rely on git-svn >>> on convert individual branches. Git-svn is a good tool for converting >>> individual branches. It is, however, either very slow at converting the >>> entire GCC repo, or goes into infinite loop. >>> >>> There are 3 scripts: >>> >>> - svn-git-repo.sh: top level script to convert entire repo or a part of >>> it (e.g., branches/), >>> - svn-list-branches.sh: helper script to output branches and their >>> parents in bottom-up order, >>> - svn-git-branch.sh: helper script to convert a single branch. >>> >>> Whenever possible, svn-git-branch.sh uses existing git branches as >>> caches. >>> >>> What are your questions and comments? >> >> Any comments on how it deals with "errors" like removing trunk which >> happened a few times? >> (not sure what other "errors" Eric refers to reposurgeon "deals" with...) > > Stock git-svn can deal with deleted parents; e.g., for the first deletion of > trunk, git-svn treats trunk@180802 as a /generic/ parent path for trunk, and > happily follows its history. > >> >> I suppose it converts only history of not deleted branches? > > The scripts can convert history of deleted and moved branches. E.g., > branches/gcc-3_2-rhl8-branch was moved (which is copy and delete for svn) to > branches/redhat/gcc-3_2-rhl8-branch around revision 95470, so one would need > to point the scripts to branches/gcc-3_2-rhl8-branch@95470 to convert its > history. Something like: > > ./svn-git-repo.sh --repo $HOME/gcc-branches --svnpath > branches/gcc-3_2-rhl8-branch@95470 > >> >> For the official converted repo do we really want all (old) >> development branches to be in the >> main git repo? I suppose we could create a readonly git from the >> state of the whole repository >> at the point of conversion (and also keep the SVN in readonly mode), >> just to make migration >> of content we want easy in the future? > > Having a single full repo is simpler than having the main repo and the full > one with all the history. So, unless full repo is twice the size of the > main one, let's keep all the branches. > > We can also give a shout to representatives of RedHat, Google, and others to > voluntarily remove their old maintenance branches from the repo, and, > possibly, stash them somewhere on github. > >> >>> The attached is cleaned up version, which hasn't been fully tested yet; >>> typos and other silly mistakes are likely. OK to commit after testing? >> >> Thanks for taking up this ball! > > -- > Maxim Kuvyrkov > www.linaro.org >
Wasn't Eric S. Raymond working on his own conversion of the GCC repo from SVN to Git? Whatever happened to his?