One of the (only) things I miss in my move to the Mac is TortoiseSVN, a really nice Subversion client which integrates with the Windows shell giving you all the Subversion commands on a right click context menu. SCPlugin for OS X is coming along, and what they have is very nice, but they don’t have it all yet… still, good effort guys, thanks.
One function missing from SCPlugin, and from the Subversion bundle on Textmate, is the ability to easily set the SVN:Ignore property. Setting SVN:Ignore on a file or directory means that SVN will never bother you with trying to add or commit it. I’m always heading for the command line, then getting confused and failing to remember how to do the business… so for my benefit here it is (and embarassingly for my memory it’s actually quite easy):
svn propedit svn:ignore .
This will fire up your assigned editor (you could probably set it to Textmate, but I’m not sure how, so I haven’t), then enter your file patterns and you’re away. (The above command assumes you’re setting svn:ignore on objects in the current directory, otherwise just change the . at the end to a filepath to wherever.)
export SVN_EDITOR=vi
will set the editor to vi. For TextMate you can useSVN_EDITOR=mate
Hi Sameet. Good tip about the SVN_EDITOR setting. Unfortunately TextMate doesn’t seem to work for me, I get the error “No changes to property ‘svn:ignore’ on ‘.'” no matter what I do. (Emacs works fine though, and I assume vi would too if I were that way inclined.)
Hey Simon… fancy that. I’m on Google looking for this and you pop up. Nice one… Thanks.
Hi Graham, glad to be of service!
I know this is from a long time ago, but the correct way to get TM to work as your SVN editor is:
export SVN_EDITOR='mate -w'
The -w tells mate to “wait” until that document is closed. Otherwise, mate returns immediately and SVN thinks nothing changed. You have to save the temp file that is opened in TM and then close that file.
Percy that is awesome. Thank you.
Percy, you just saved my life. Thanks a ton for that.
Thanks for the article and all the comments. I just recently moved to a Mac for my main development machine at work and am relearning svn commands after a love affair with TortoiseSVN on my old windows machine, sigh…
Setting up TextMate with the argument ‘-w’ worked wonderfully with the svn:ignore command from your article. Thanks a bunch!