I'm working in an environment, where the primary version control system is SVN. The setup is such that when something is commited to SVN, a build is scheduled. When the build server is idle, it takes the current SVN HEAD revision (which may be different from the one that caused the build to be scheduled), and tries to build. If successful, it drops the built binary into some archive directory, and goes back to idle (or starts a new build, if one is scheduled).
So there exists a log of all buildable revisions somewhere. I would like to setup a GIT repository against our SVN that works as a downstream only repository (GIT pulls from SVN, but does never accept commits from users, and never pushes changes back into SVN). I would like to update this GIT repository only to the latest buildable revision in SVN (i.e. determine the latest buildable SVN revision, and then update the GIT repo to that SVN revision). The way that I have gotten this to work is, in a nutshell: 1. clone SVN->GIT 2. run cronjob to update GIT: 2.1 get latest buildable revision number R 2.2 git svn fetch -r R My problem with this setup is that the individual SVN commits are lost on 'git svn fetch'. Instead of 'git svn fetch -r revision', I would actually like to do either 'git svn rebase -r revision', but this does not work (rebase only works against SVN HEAD?). Another approach to solving the problem might then be to run the fetch in a loop for every single SVN commit up to (and including) the latest buildable revision, i.e.: 2. run cronjob to update GIT: 2.1 get latest buildable revision number R 2.2 determine last SVN revision B pulled into GIT 2.3 for each SVN revision R' from B (excluding) to R (including): git svn fetch -r R' As I am new to using GIT, I would like to know if this is a correct assessment of the situation. Are there any other approaches? BR Matthias --