This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Contrib PATCH] Add scripts to convert GCC repo from SVN to Git


On Tue, May 14, 2019 at 6:11 PM Maxim Kuvyrkov
<maxim.kuvyrkov@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...)

I suppose it converts only history of not deleted branches?

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?

> 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!

Richard.

> --
> Maxim Kuvyrkov
> www.linaro.org
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]