[postgis-devel] Current git-svn workflow

Sandro Santilli strk at keybit.net
Sun Sep 22 02:20:06 PDT 2013


So that you know, the git _mirror_ of the postgis codebase is currently
an output-only repository. There's a script on my hosted machine that
runs hourly and mirrors anything that happened in the SVN repo onto
the git repo.

You can find the script at the end of the email (after the signature).

The consequence of this is that you cannot push non-svn derived
commits in the git repo without breaking the script (which will
currently refuse to push new things upstream due to loss of sync).
The script could be made to force-push, in which case you'd loose direct
pushes anyway.

So button-click pull merging is not supported. Please don't use it.

Now, we _might_ improve that by setting up some form of backward
sync, but is it worth it ? A core committer should still review
the changes, and should probably add acknoledgement (as SVN doesn't
know about author != committer) and possibly squash-rebase the whole
branch to make reviews of others easier (I hate non-linear history
full of noise). And maybe also add reference to a ticket (recommended).

For now I think the simplest thing is to keep committing to SVN
as an "official push", until someone steps up to work on a smooth
full migration to git (requires adding git knowedge to osgeo trac:
http://trac.osgeo.org/osgeo/ticket/720)


--strk; 


The script :

cd /usr/src/postgis # this dir was previously git-svn initialized
{
 date
 cd postgis
 git svn fetch

 # Mirror all branches
 git branch -r | grep -v `git remote`  | grep -v tags |
 grep -iv 2007 | grep -v pgis | grep -v refractions |
 sed 's/ *//' |
   while read; do
     cmd="git push origin ${REPLY}:refs/heads/svn-${REPLY}"
     echo $cmd
     $cmd
   done

 # Mirror all tags
 git branch -r  | grep  tags | sed 's/ *tags\///' |
 while read; do git tag "${REPLY}" tags/$REPLY; done

 git push origin --tags

}



More information about the postgis-devel mailing list