git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Hudec <bulb@ucw.cz>
To: git@vger.kernel.org
Subject: Automating svn<->git gateway
Date: Mon, 11 Oct 2010 21:30:07 +0200	[thread overview]
Message-ID: <20101011193007.GA30870@efreet.light.src> (raw)

Hello Folks,

I want to set up a gateway between subversion and git, which would keep the
master synchonized with subversion trunk, both ways, and allow working with
any additional branches independent of subversion. For users it should behave
as any other shared git repository accessed by push and pull. And it needs to
be automatic.

Did anybody try to set up something like this?

Background:

At $work, we are considering switch from subversion to git. However to avoid
big disruptions in the work, we need to do it gradually. So the idea is to
switch to git one by one. The people who already switch need to be able to
test the final workflow with git, while other people still commit to the
subversion repository.

This basically rules out everybody just using git-svn, because individual
conversions are incompatible (or is there some way to make them compatible?),
so the people couldn't easily share their working branches.

That leaves me with creating one git-svn repository and having everybody
clone from that. Keeping the repository up-to-date from subversion side seems
trivial (just 'git svn fetch' to it from subversion's post-commit hook).

The trickier part is exporting changes pushed from the git side to
subversion. My plan is to write a post-receive hook, that will
'git svn dcommit' to svn trunk.

I suppose I will have to get the rewritten commit back from subversion and
merge it back to the master. I have not yet tested whether when dcommiting
a merge will properly keep the second parent in the rewritten commit or not.
I can do extra merge if it does not at the cost of slightly uglier history.

Thanks,
Jan

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

             reply	other threads:[~2010-10-11 19:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-11 19:30 Jan Hudec [this message]
2010-10-11 20:33 ` Automating svn<->git gateway Joshua Shrader
2010-10-12 17:35   ` Jan Hudec
2010-10-12 19:54 ` Jakub Narebski
2010-10-12 20:31   ` Jan Hudec
2010-10-12 23:25     ` Jakub Narebski
2010-10-13 17:17       ` Jan Hudec
2010-10-15 16:48         ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101011193007.GA30870@efreet.light.src \
    --to=bulb@ucw.cz \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).