Skip to content. | Skip to navigation

Personal tools


You are here: Home / Blog / Grab Bag of git/svn stuff

Grab Bag of git/svn stuff

by Ross Patterson last modified Jul 26, 2011 06:14 AM
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:

collective.formcriteria = gitsvn

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/ I changed:

common.workingcopytypes['gitsvn'] = GitSVNWorkingCopy


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.

OpenID Login


IRC: rossp
Yahoo IM: patterson_ross
AIM: rosspatters
Skype: merpattersonnet

PO Box 7775 #10587
San Francisco, CA

+1 (415) 894-5323