threads / discuss / 11361

Git-to-svn convert

Subject: Git-to-svn convert

## tl;dr

5 messages between Dec 19, 2007 and Dec 20, 2007.

replies: 4people: 4as markdown or json

Thomas Harning· Dec 19, 2007, 22:14 UTC · lore

Is there a reasonable way to convert a Git project to Subversion... Yeah, I know, blasphemy :-P... but I worked on a project in Git and my boss wants me to put it into Subversion.

git-svn looks to be the tool for this.. however I had some non-linear dev, which doesn't look like it'd commit (In the past I think I tried this and it failed to deal w/ a branch-and-merge...).

Example of what I mean...:
a - b -
 `c'

As to how to pull the repository into subversion.. how would I do that? git-svn init ?

Miklos Vajna· Dec 19, 2007, 23:16 UTC · re: Thomas Harning · lore

Re: Git-to-svn convert

On Wed, Dec 19, 2007 at 05:14:25PM -0500, Thomas Harning <harningt@gmail.com> wrote:
Show 8 quoted lines
> Example of what I mean...:
> 
> a - b -
> `c'
> 
> 
> As to how to pull the repository into subversion.. how would I do that?
> git-svn init ?
i think you have two options:
- use some 3rd-party tool like tailor
- first you should rewrite your history by creating a linear history
  then git-svn can dcommit your changes to svn
- VMiklos
Martin Langhoff· Dec 19, 2007, 23:54 UTC · re: Thomas Harning · lore

Re: Git-to-svn convert

Hi Thomas,

I think Andrew McMillan had written a few scripts to "export" a git repo to SVN and CVS. Not sure whether the code is public. But at least for a while, the Mahara project was using git with SVN and CVS "readonly" exported repos, a bit like the BK->CVS of yore. He may have been using git-svn though.

cheers,
martin
Andrew McMillan· Dec 20, 2007, 05:32 UTC · re: Martin Langhoff · lore

Re: Git-to-svn convert

My code is an embarrasingly ugly, gruesome hack, but it (sort of) works...

I use it to keep the SVN and CVS trees up to date on Sourceforge for DAViCal ( http://rscds.sf.net/ ) from the Git tree.

Cheers,
					Andrew.
On Thu, 2007-12-20 at 12:54 +1300, Martin Langhoff wrote:
Show 13 quoted lines
> Hi Thomas,
> 
> I think Andrew McMillan had written a few scripts to "export" a git
> repo to SVN and CVS. Not sure whether the code is public. But at least
> for a while, the Mahara project was using git with SVN and CVS
> "readonly" exported repos, a bit like the BK->CVS of yore. He may have
> been using git-svn though.
> 
> cheers,
> 
> 
> martin
> 
-------------------------------------------------------------------------
Andrew @ Catalyst .Net .NZ  Ltd,  PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/            PHYS: Level 2, 150-154 Willis St
DDI: +64(4)803-2201      MOB: +64(272)DEBIAN      OFFICE: +64(4)499-2267
                        Is this really happening?
-------------------------------------------------------------------------
Thomas Harning· Dec 20, 2007, 15:12 UTC · re: Andrew McMillan · lore

Re: Git-to-svn convert

Andrew McMillan wrote:
Show 8 quoted lines
> My code is an embarrasingly ugly, gruesome hack, but it (sort of)
> works...
>
> I use it to keep the SVN and CVS trees up to date on Sourceforge for
> DAViCal ( http://rscds.sf.net/ ) from the Git tree.
>
> Cheers,
> 					Andrew

Where might I find the code? I checked out git.catalyst.net.nz ... but I couldn't find anything that seemed to be a sync tool... I figure I'd give it a try before manually rebasing or progressively cherry-picking a new tree...

← back to recent threads