Grab Bag of git/svn stuff¶
Using gitify to pretend everyone has already switched
A while back I looked into gitify after someone mentioned it. For some strange reason, I dismissed it. I think it may have been David Glick who mentioned it again when I was ranting recently, so I looked at it again and it is exactly what I want. It allows treating an svn checkout as both an svn checkout and a git-svn clone with a local git cache. Now if only I could get this to work with mr.developer.
But wait, hidden in a corner of mr.developer, and totally undocumented is a mr.developer.gitsvn module that does exactly that! You can use a “gitsvn” checkout type and you’re in business:
[sources]
...
collective.formcriteria = gitsvn https://svn.plone.org/svn/collective/collective.formcriteria/trunk
...
I was going to start modifying all my local.cfg buildout files to change all the “svn” checkouts to “gitsvn” checkouts when I noticed something about how mr.developer registers checkout types. At the very bottom of mr/developer/gitsvn.py I changed:
common.workingcopytypes['gitsvn'] = GitSVNWorkingCopy
to:
common.workingcopytypes['gitsvn'] = GitSVNWorkingCopy
common.workingcopytypes['svn'] = GitSVNWorkingCopy
Viola! Now mr.developer uses gitify for all svn checkouts. Now I’m getting close to being able to pretend svn doesn’t exist.
I would love to see mr.developer use a global switch so I don’t have to modify the egg like this, maybe something in ~/.buildout/default.cfg. If there’s interest in that, I’d be happy to contribute such a thing. I should also mention that gitify is often pretty rough and leaves svn and git in an inconsistent state which is only really repairable by someone who is very familiar with both svn and git. The next time I run into that, I’ll be trying to run it to ground and contribute fixes.
Updated on 25 July 2011
Imported from Plone on Mar 15, 2021. The date for this update is the last modified date in Plone.
Comments
comments powered by Disqus