How to go really really slow at programming


This morning I spent 10 minutes answering “ok” to 65,536 dialogs in Finder. This is the direct result of used the latest thing. I don’t do like I used to. I used to install bleeding edge software and constantly run around with napkins as my nose dripped red goo. I’ve learned my lesson. I now know to install software only after its been battle tested and at least 1/2 of my coworkers are using it. So what has happened? What I used was the latest version of SVN support in Versions… 1.6 support. It’s not what I would call bleeding edge. Version 1.6 of svn has been around long enough. It’s battle tested and proven. Why then do I have exactly 65,536 ok dialogs scattered across my screen, each informing me that “my client is too old to work with…”? And how did I know that there were exactly 65,536 dialogs? (An exercise left to the reader… YOU! Not your RSS reader!) A long time ago I installed a Tortoise-like plugin for Finder. It gives you little folder decorations for things that are up to date in svn, checked out, conflicting or whatever. I forget the name of the app. It was so long ago that I’ve since forgotten and lost the installer. I don’t even know if there’s an uninstaller. (Which reminds me… why is it soo difficult to remove software from a Mac?) Still it helps me. It’s one of those nice to have things that help but doesn’t do the job entirely. So this tool has been hanging around assiting Finder for the past year or so and keeping me out of trouble when I attempt to delete old work that I’m not sure is under a VCS. After I switched Versions to use 1.6 format for its checkouts I started getting these dialogs. I didn’t know which tool they were coming from because I also use IntelliJ which includes its own svn support. Also I’ve since irreparably hacked XCode to work with svn 1.5. The dialog could have been coming from any of these three svn related tools. (I’d completely forgotten about the Finder plugin.) So I restarted versions a few times which seemed to remedy the problem. I was sure it was a Versions problem because I had other minor glitches since taking a recent Versions upgrade. By the time I figured out the Finder plugin was the problem I was already in knee deep. Unable to delete the 4-5 projects checked out in 1.6 format. Today I got a small break and decided to address the problem. It took me 5-10 minutes to fix because I had to first answer ok to each dialog. Then I had to delete and checkout the projects again. I also had to delete and checkout the projects again after realizing I forgot to change the Versions flag before the first delete/checkout cycle.

A Subversion Command Line Tip


*Update* I Forgot a line in my magic script posted below. It actually does a revert now.

I got in a disagreement with a buddy of mine from work. “Use the command line!”, he urged.

“The command line is for fools who don’t want to understand modern tools!”, I insisted. “We’re in the year 2009 and and it makes no sense not to appreciate modern tools with decent UIs!”

The discussion was about using the command versus a GUI for subversion and it went something like that. I think half way through he uttered something like, “yo mama!” and I was like, “…is a very pleasant person.” I lost the argument. Lost not by giving in but by the mere fact that I was wrong. To this day I thank my buddy for his kind remark regarding my mother. I also thank him for reminding me to use the command line with Subversion. That brings me to my tip of the day. If you’re like me then you’re probably sitting in front of a Mac Pro reading the internet (yes, people do attempt to read the entire internet from time to time… though it’s worse when you try to read the internet over a 56K connection) and enjoying a can of Pabst Blue Ribbon. You’re also probably helplessly hooked on the command line for Subversion work.

One thing I hate about subversion on the command line is how a revert doesn’t completely revert. It leaves remnants. It also does nothing about files you intended to delete prior to the revert. Tonight I wrote a bash script to perform better clean up. I’ll post back with more detail on why I use the command line even though I have Idea installed. For now see my one-liner bash file below:

svnfulrevert.sh

#!/bin/sh

svn revert -R .
svn st | awk '{ if($1=="!") system("svn revert $1" $2); else if($1=="?") system("rm -frd $1" $2); }'

Brought to you by:
the guy that reminded me that it has been over a month since my last worthwhile post.

Co-sponsored by:
the lady who was doing 32mph on Rte 30. Driving behind her gave me time to mull over why my site has been inactive lately.