0

I'm setting up a Gerrit server for my team which is part of a larger IT organisation. The entire organisation uses a centrally backed up SVN server so I have no choice but to interface Gerrit and SVN. This has so far been easy enough.

I'm not sure how the changes will be committed to SVN after a commit has been approved and merged onto the gerrit master. Is it as simple as writing a 'change-merged' hook that runs 'git svn dcommit'?

Gaurav
  • 1,466
  • 3
  • 17
  • 24

1 Answers1

1

That is your best bet to get started. Unfortunately, if the SVN repository has changed and Gerrit doesn't know about it, you might end up with conflicts. In that case you'll need to update the repository in Gerrit and then have the user re-upload their patch.

Gerrit really just doesn't work well with this sort of setup. It has been requested before and we are kicking around ideas on how to properly handle situations where Gerrit isn't the owner of the repository.

Brad
  • 5,492
  • 23
  • 34
  • Thanks brad. We're planning to have all commits go through gerrit in the future too. Till that is done, can I not simply rebase my repo say every 15 mins to minimise conflicts? – Gaurav May 03 '12 at 15:36
  • Yeah that will help. There is no way to guarantee that you will avoid all conflicts, but that will probably get 99% of them depending on the size of the team. – Brad May 04 '12 at 04:17
  • I found this thread http://stackoverflow.com/questions/2014422/hooks-for-git-svn and it looks like exactly what I need. – Gaurav May 04 '12 at 05:06
  • Argh, completely missed the fact that gerrit does not run any of the standard git hooks. – Gaurav May 04 '12 at 05:26