most efficient means for pushing code from git to FreeBSD svn?

Ulrich Spörlein uqs at FreeBSD.org
Tue Jul 1 10:56:54 UTC 2014


On Mon, 2014-06-30 at 08:16:37 -0700, Alfred Perlstein wrote:
> Hey folks,
> 
> I am looking for the most efficient means to take code from git and push 
> it into FreeBSD svn.
> 
> I know for some time there was a git-svn bridge setup for 
> http://github.com/freebsd/freebsd.git, however now when I google around 
> looking for steps on how to use it I get some conflicting information.
> 
> A few questions:
> 
> 1) Does the git-svn bridge still exist?

git-svn exists, so I'm not sure what you're asking. There is no special
converter or bridge process running, you just use git(1) to talk the svn
protocol with an svn server.

> 2) Where is the most up to date page on how to do this?

https://wiki.freebsd.org/GitWorkflow#Using_git-svn_.28FreeBSD_committers_only.29

> 3) Does this work for branches such as 10-stable (or is the git-svn 
> branch only good for -current)?

It should work for any branch, but we only provide already made
conversions for -CURRENT and I don't trust git-svn enough to handle
merge information properly. Please use svn merge to do your MFCs or be
prepared to muck around with svn mergeinfo to get everything recorded
properly in svn.

> 4) If the git-svn branch is only good for -current, how hard is it to 
> make one for 10-stable?  how hard for other branches?

Trivial, but takes some wall clock time. git-svn spectacularly failed
for me when trying to convert all the branches, but a handful should be
fine.

I have to piece this back togeher from memory, but something like this
should work:

git svn init -Tstable/10 svn+ssh://svn.freebsd.org/base freebsd-10
then 'git svn fetch' for the initial sync and use 'git svn rebase'
periodically to move your local master/trunk up to what stable/10 has on
the svn side.

You should be able to combine all of those branches in a single
workspace for easy git diff and saved storage thanks to repacking.

> 5) Are we still blocked by the requirement for setting "fbsd-keywords"?

I believe so, but haven't done any commits for some time now. It would
only take someone to patch git-svn to do the right thing for our
repository ...

Cheers,
Uli


More information about the freebsd-git mailing list