Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.6: Create Services to interact with Subversion Desktop
After hastily upgrading to Snow Leopard, I found myself without various tools I had grown used to. One such tool was the SCPlugin, which provided a contextual menu for many operations with Subversion repositories.

After reading that Finder contextual plugins are now no longer possible (in the Ars Technica Snow Leopard review), I gave up hope of an update being released. Services are seemingly the nearest equivalent. Fortunately, Automator now makes making your own services relatively easy. I confess to never having used Automator before today, so this may not be the best way, but it at least goes some way to restoring the functionality I lost. These two workflows provide Update and Commit commands, which is all I find myself in desperate need of right now. To create both, launch Automator and select Service from the initial screen.

Update workflow (the easy one):
  1. Set the 'Service receives selected' drop-down menu to folders, and the 'in' drop-down menu to Finder.
  2. Drag the Utilities » Run Shell Script action into the work area. Set the 'Pass input' drop-down menu to as arguments. Set the script to cd "$@";svn update;.
  3. Save the new Service.
Commit workflow:
  1. Set the 'Service receives selected' drop-down menu to folders, and the 'in' drop-down menu to Finder.
  2. Utilities » Set value of variable: Name the variable dir.
  3. Text » Ask for Text: Set your Commit message here.
  4. Utilities » Set value of variable: Name the variable message.
  5. Utilities » Get value of variable: Get the value of the dir variable.
  6. Utilities » Run Shell Script: Set the 'Pass input' drop-down to as arguments. Set the script to cd "$2";svn commit -m "$1";
  7. Save the new Service.
I hope this will be enough to tide some Subversion users over until some clever developer comes along and provides a more complete solution.

[robg adds: I haven't tested this one.]
    •    
  • Currently 1.78 / 5
  You rated: 5 / 5 (9 votes cast)
 
[8,217 views]  

10.6: Create Services to interact with Subversion | 2 comments | Create New Account
Click here to return to the '10.6: Create Services to interact with Subversion' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
The shell is faster
Authored by: pauljlucas on Sep 22, '09 08:30:12AM

Nice hint, but typing svn commands directly into a shell (in Terminal) is still faster. One also gets to see any output in case there are conflicts or the commit fails.

---
- Paul



[ Reply to This | # ]
10.6: Create Services to interact with Subversion
Authored by: mchmarny on Sep 22, '09 08:44:29AM
The plugin build into PathFinder works great too, if you are looking for the GUI-based approach.

---
Mark

[ Reply to This | # ]