Re: [proposal] switch our repository from Subversion to Git
On 08-03-2008, Remi Vanicat <remi.vanicat@gmail.com> wrote:
> 2008/3/8, Stefano Zacchiroli <zack@debian.org>:
>> On Fri, Mar 07, 2008 at 05:14:13PM +0000, Sylvain Le Gall wrote:
>>
>> > > Cons
>> > > ----
>>
>> > I am really not sure we can keep our revision history from Subversion. I
>> > really would like to keep it as far as possible (i.e. history of our
>> > subversion repository).
>>
>>
>> Yes, it is definitely possible, it is just a matter of understanding how
>> hard it is. The straightforward way to convert our repository to a git
>> one is to use git-svnimport (well-known contrib script available in
>> git-core).
>
> git-svnimport is now deprecated, and git-svn is the preferred way to
> import svn into git nowadays.
>
I have talked with jcristau about git-svnimport yesterday. I know this
tool. There is some problems with it concerning tracking renames of
trunk/ and tags/ in history. I.e. you give a svn dir for trunk and tags
and git-svnimport is able to know when you have done a tags... This is
good, but you should remember that the whole ocaml repository layout has
changed at a certain time (i.e something like packages/toto/{trunk|tags}
to trunk/packages/toto/trunk and tags/packages/toto). This is the point
where we will loose history!
Does git-svn solve this point?
>> Using that however you end up having the same space problems we have
>> right now, since a single "git clone" will then have to checkout all the
>> old tarballs. Not nice.
>
> Also, I believe that the "one working directories all ocaml package"
> is not the best way to do it: git don't work with partial checkout, so
> it is difficult to work on only one project if you don't want checkout
> every thing.
>
Full ACK.
If we go the git way, i suggest to have some kind one git repository (do
we call this repository?) per package and some kind of repository that
list all other repository (that is what i do with /layout/ in SVN, if
you check it out, you get all packages, without branches).
This way you can work either on subset or on the entire set of OCaml
packages.
>> Starting from that I can see 2 solutions. The first is to hack our
>> conversion script which when a tarball has to be checked-in, instead of
>> doing it blindly, it rather invokes git-import-orig with pristine-tar
>> support.
>>
>> The second is to do the blind conversion and after that use the git
>> mechanism to completely remove from a repository unwanted pieces of
>> code (which has been designed to completely erase
>> copyrighted/illegal bits which can have slipped in in the past),
>> applying it to old tarballs.
>> This solution has the drawback that
>> you won't have old tarballs in the repository, but this is not
>> strictly a problem, as all uploaded packages have their tarballs
>> available from snapshot.debian.net. Sure we want the current and
>> future tarballs to be checked in, but we can do that using "svn
>> checkout" and a round of git-import-orig.
>
> It is probably possible, with git-filter-branch, to remove the tarball
> as it is now, and to reimport it with git-import-orig. It is probably
> simpler thant hacking the conversion script, and can do the same work.
>
>
Maybe, you can get a svn dump file (svnadmin dump...) and the filter it
(svndumpfilter). This way it should be easy to remove all old
tarballs...
And of course there is "ocaml-archives" project floating around ;-)
Regards,
Sylvain Le Gall
Reply to: