On Fri, Apr 02, 2010 at 12:48:44AM -0400, Avery Pennarun wrote: > On Fri, Apr 2, 2010 at 12:22 AM, Miles Bader <miles@xxxxxxx> wrote: > > Avery Pennarun <apenwarr@xxxxxxxxx> writes: > >> At work, we have a cronjob that basically does most of these steps for > >> us. Then there's a central git repo that corresponds to the svn repo; > >> people who want to use git can use that repo and not worry about > >> git-svn. > > > > Do you happen to have the cron script available for perusal anywhere? > > > > I imagine many of the details would need to be changed for other > > installations, but just looking at a working concrete example could be > > very helpful... > > Unfortunately the particular script we're using is about 99% local > stuff and 1% useful stuff, so posting it won't really help. The > pseudocode is something like this: > > # configure your git-svn so that all its branches are under remotes/svn/* > git fetch origin > git svn fetch --fetch-all > for each branch in remotes/svn/* > git checkout remotes/svn/$branch # detaches HEAD > git merge --no-ff origin/$branch > git svn dcommit # replaces merge commit > git checkout origin/$branch > git merge remotes/svn/$branch > git push origin HEAD:$branch > git push origin refs/remotes/svn/*:refs/heads/svn/* > > And then people who want to push into svn can push into the 'origin' > repository, wherever that may be. With some tweaking, you could make > the git-svn repo and the origin repo the same. It's a little annoying > because git-svn absolutely insists on its branches being in > refs/remotes/ somewhere, which means they don't normally get fetched > when other people grab from your repo. > > Also consider setting [merge]summary=true in your .gitconfig, so that > the svn commit will have *some* useful information about what got > committed. > If I understand you correctly, this will commit only the the merge to svn and won't show all the commits the developer made (because of the --no-ff). >From a SVN standpoint isn't it the same as doing the following? git checkout remotes/svn/$branch # to deatch the HEAD git merge --squash origin/$branch git svn dcommit I asked because in my workflow I can't to afford lossing the single commits. Peter -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html