How to install SVN plugin for Mac’s Finder?

Do you missed the TortoiseSVN plugin for Windows Explorer? I missed it terribly. I was living with RapidSVN for quite sometime. It is not that bad but I needed a bit more satisfaction than that. I was really wishing that I can get SVN integration right in the File Browser – The Finder. Eclipse Projects are well taken care of by Sublipse. What about the other projects that do not necessarily come under Eclipse – where I just monitor the codes, file hierarchy, et al and not really get involved with.

The solution came in with 2 free software – SVN Client and the SCPlugin.

Step 1 – Downloads

Before we start on How to install/use SVN plugin for Finder, let us download the following files

a) SVN Client – get this easy to install Package from Metissian. For the bravehearts, they can compile the source from Subversion.
b) SCPlugin

Step 2 – SVN Client Installation & Confirmation

a) Double click the SVNClient Installer and follow the steps to install it.
b) Add to PATH & Confirm SVNClient Install (follow steps below)

(i) Open Terminal (it is located under Applications > Utilities)
(ii) Type the following without quotes in a single line — “pico .bash_profile”
(iii) Type the following 2 lines –

PATH=”/usr/local/bin:/usr/local/subversion/bin:$PATH”
export PATH

(iv) Save this using Control + O in the Pico Window
(v) Restart your Terminal
(vi) Type “svn” without the quotes to confirm, it should says something like “Type ‘svn help’ for Usage”
(vii) That’s it, SVNClient is now installed and functional on your system.

Step 3 – SCPlugin Installation

a) Double Click the SCPlugin Installer and follow the steps to install it.
b) Restart Finder. Well, you really cannot restart Finder, so either Restart your OS or Force Quite (Command + Option + Escape) Finder and Relaunch.

Step 4 – SCPlugin Setup

a) SCPlugin is installed under System Preferences – Screenshot
b) Enable Finder Integration and follow the steps below to set the path to the SVNClient – Screenshot

(i) Click “Open” and Press Command + Shift + G to invoke “Go to Folder” and enter the following line without the quotes – “/usr/local/bin/”
(ii) Select “SVN” and thus your path will look like – “/usr/local/bin/svn”
(iii) Close the System Preferences because you are done!

Now, right click on any folder to start “Subversion > Checkout”. Well, you can then sit back and enjoy.

  • jimwoolum

    After installing the software per Step 1, I opened Terminal, then pasted:
    PATH=?/usr/local/bin:/usr/local/subversion/bin:$PATH?

    Then I pasted:
    export PATH
    (After the first paste, I had some funky looking characters that looked like “^”.) 

    Then I typed Control + O to save.

    Now whenever I launch Terminal I get this error:
    “-bash: pico: No such file or directory”

    Can anyone tell me how to correct this? 
    (And maybe tell me what the heck I did wrong.)

    Thanks very much for your help,
    Jim

  • http://www.brajeshwar.com/ Brajeshwar

    Well, then let us reset and redo the steps. In your terminal, type this –

    pico .bash_profile
    and delete the two lines that we added.
    Now Press Control + O to save it.

    It might be a good idea to restart Terminal and redo the steps. Remember to type them and the two lines are separeted by a return (I mean they are 2 lines). Save it and close Terminal.

  • jimwoolum

    I launched Terminal and entered:
    pico .bash_profile

    Then Terminal says:
    -bash: pico: No such file or directory

    I think this is a bad sign. Could I have nuked the file? Maybe I need to locate a tutorial somewhere that tells you how to create the profile …

  • http://www.brajeshwar.com/ Brajeshwar
  • jimwoolum

    Fixed … before I studied enough to figure it out, a couple of people at MacOSXHints recognized the problem and sent me a fix. The problem was that I copied and pasted from the web page to the Terminal, and the web page text has curly quotes that Unix choked on – it wanted ASCII double quote characters.

    Once I knew how to get around the “No such file or directory” problem by going directly to the bash profile ( /usr/bin/pico .bash_profile ), I was able to delete what I pasted and then type the line in correctly.

    Now it works! And I have my Terminal back. Whew.

  • http://www.brajeshwar.com/ Brajeshwar

    Cool, nice to know that you got it working.

  • Mark

    Does this not work with 10.4.8?

  • http://www.brajeshwar.com/ Brajeshwar

    I am also on 10.4.8 and it does work for me.

  • http://firelitedesign.com Chris Kelley

    When I installed the plugin, I went to open up the system preferences panel for it, and I got the following error message:

    You cannot open SCPlugin preferences pane on this computer. Contact the developer of this software for a newer version.

    Any Ideas?

  • http://firelitedesign.com Chris Kelley

    I should also note that I’m on 10.4.8 / Macbook Pro

  • http://www.brajeshwar.com/ Brajeshwar

    Oh! I am not sure then, I’m on a PPC and it works for me. Why not try and inform the developer of SCPlugin through his link?

  • Pingback:   How To: install SVN plugin for Finder by Apple Gazette

  • http://www.wildtangents.net Marc

    Anyone know if this will this work using svn+ssh?

  • http://www.brajeshwar.com/ Brajeshwar

    Hi Marc,

    I am not sure but if you mean https thingy then, it does not work so far.

  • http://www.wildtangents.net Marc

    No, most SVN clients have the ability to tunnel svn through ssh. TortoiseSVN can do this out of the box just by using “svn+ssh://” in the URL for the repository. This allows for instance me to access my SVN at home while only having the ssh port open on my firewall.

  • http://www.brajeshwar.com/ Brajeshwar

    Hi Marc,

    Well, that is cool then. I’ve never tried it before.

  • http://www.wildtangents.net Marc

    I just picked up a new Mac Book Pro to travel with. It looks like I’ll have to find something now, so I’ll give it a try.

  • http://www.brajeshwar.com/ Brajeshwar

    Marc, congrats on your New Mac Book Pro.

  • Pingback: Le blog » Archive du blog » Subversion et Mac, c’est pas le pied

  • Nagra

    Ok, I’m the biggest Mac rookie, so maybye what I’m about to ask is trivial.

    When I donwload SCPlugin, the zip file gets decompressed and I’m left with a package called “SCFinderPlugin.plugin”. How do I install that???
    Double clicking doesn’t work:
    “There is no default application specified to open the document SCFinderPlugin.plugin”

    I tried to put the file in
    Library | Contextual Menu Items
    and
    System | Library | Contextual Menu Items
    but it doesn’t seem to work…

  • Tim

    http://scplugin.tigris.org/servlets/ProjectDocumentList

    Dropping the plugin file into the “Library | Contextual Menu Items” folder within your home folder works. You may have to create the “Contextual Menu Items” folder though. Also you will need to open “Force Quit” from the apple menu and restart the Finder.

    If you are on an intel mac then there is a new intel binary on the plugin; http://scplugin.tigris.org/servlets/ProjectDocumentList

    For a more stable and fully featured svn client I wither use the command line or svnX; http://www.lachoseinteractive.net/en/community/subversion/

  • http://alldj.org Pierce

    What I want to do on my blog, is every few hours take the oldest post and move it to the
    front of the queue, all automatically. Anyone know if there is a plugin that can do this or
    a simple way to set up another plugin to do this (use my own feed perhaps)?
    Thanks.

  • Sanna

    well, I made all fine so far until this:
    Now, right click on any folder to start “Subversion > Checkout”. Well, you can then sit back and enjoy.
    -> when I do this and add the url of one sourceforge project I, it asks me username and password and then it comes only a blank screen… nothing really happens.

  • http://www.brajeshwar.com/ Brajeshwar

    Well, I have to wait for sometime most of the times and it does works for me. Of course, the first time sync show nothing as there are nothing to sync.

  • Erik D

    You can restart Finder! Simply hold alt and right-click on the Finder icon in the dock; you’ll see a relaunch option. (Holding down alt changes a good few menus in case you never tried…)

    I like the subversion package from http://www.codingmonkeys.de/mbo/

  • ckatyal

    I installed SCPLugin .I already had svn client installed on my machine.
    I get the menu for Subversion -> checkout on right clicking the mouse.But whenever I check out, it gives me error about prop finds.I can checkout from command line successfully though.

    I also removed all the files from by using cd ~/.subversion/auth/svn.simple.

    I also never get the SCplugin in my System Preferences pane.

    I would appreciate if anybody has any insight into this.

  • http://scplugin.tigris.org Jack Repenning

    I’m the Project Owner and release engineer for SCPlugin. We’ve just released a new version, 0.7, which has substantially more features, and substantially less hassle, than the one discussed here. Two things of particular importance:

    1. There is no long a Preferences Panel. Just run the installer, log out and in, and you’re in business.

    2. You probably no longer need a command-line client: we’ve added dialogs to collect your name and password during checkout. Once you’ve done that, they’re cached in the OS X Keychain, a very secure place, and you don’t need to enter them again.

    This is still a beta release, but it seems to be pretty solid. Feedback on version 0.7 has identified these bugs and notes that might interest you:

    1. If you access Subversion through an https:// URL, and if your server uses an improperly certified certificate, you’ll still need a command line client (sigh! missed one case!). Just do “svn ls https://…” once to your server. You’ll be prompted about the improper certificate, and given the option to “p”ermanently accept it. After that, you won’t need the command line again.

    2. The 0.7 installer installs into /Library, so all users can use it. This requires administrator user name and password. We’re debating whether that was the right choice right now, over in [email protected], we may switch to private installation (which would not require authentication). If you have an opinion, drop on by that list (email [email protected]) and let us know!

    3. You may sometimes find that the special icon “badging” doesn’t work. If so, put the window into icon mode and issue the “refresh icons” command in the submenu, and things should be good again.

  • http://www.brajeshwar.com/ Brajeshwar

    Hey Jack, this is an awesome news. I’ll be checking it out.

  • Annie

    I actually get this same issue. I pasted from previous post. Any ideas??

    I installed SCPLugin .I already had svn client installed on my machine.
    I get the menu for Subversion -> checkout on right clicking the mouse.But whenever I check out, it gives me error about prop finds.I can checkout from command line successfully though.

    I also removed all the files from by using cd ~/.subversion/auth/svn.simple.

    I also never get the SCplugin in my System Preferences pane.

    I would appreciate if anybody has any insight into this.

  • http://scplugin.tigris.org Jack Repenning

    Annie – can you provide the rest of the error message? PROPFIND isn’t actually an error (even though it is shown all in caps!), it’s just one of the operations in the WebDAV protocol used by Subversion — one of the more common ones, so I can’t even guess where things are breaking down for you based on that one word!

  • Annie

    When I tried to svn update it gives:

    Subversion Error
    PROPFIND request failed on ‘/svn’
    PROPFIND of ‘/svn’: authorization failed (http://………..)

  • http://scplugin.tigris.org Jack Repenning

    OK, “authorization failed” means something pretty specific. Good. Well, it means one of several specific things; not so good. But anyway, it’s progress.

    Quick review:

    1. If you’re upgrading from some 1.3 or earlier version of Subversion to a 1.4 or later version (and SCPlugin is 1.4), or if you ever did that in the past and didn’t know about or do what I’m about to tell you, then you should clean out all the files in ~/.subversion/auth/svn.simple/* (as ckatyal mentions). Older Subversions stored your password here; newer ones store it in the OS X keychain (visible with the Keychain Access tool), a vastly more secure place. The old ones in svn.simple/ can still be used, but at the very least this cleanup will make the present debugging conversation simpler.

    2. SCPlugin presently only handles the passwords for Subversion itself. If you’re using “svn+ssh”, you’ll have to arrange matters so that no password is required for the SSH part. (We know that any “PROPFIND … authorization failed” message is not this, but I mention it just for completeness.)

    3. SCPlugin presently only accepts passwords at the check out interface. It’s possible to configure a Subversion repository so that checkouts do not require a password, and in that case SCPlugin’s lovely username / password fields turn out to be utterly useless (so sad!). We clearly need to fix this, but that’s the state of SCPlugin at the moment. If your repository is, indeed, configured to allow anonymous check outs but require authorization for check in, SCPlugin alone can’t handle the task. You will need, one time, to do a check in (or other operation that requires credentials) using a command line copy of Subversion (version 1.4 or greater!). In case you haven’t got one handy, we’ve helpfully included one for you in your SCPlugin installation, at the quite unhelpfully long path:

     /Library/Contextual\ Menu\ Items/SCFinderPlugin.plugin/Contents/Resources/SCPluginUIDaemon.app/Contents/bin/svn

    (Sorry about the way the line gets broken, there.)

    If you can use that copy of “svn”, and make it ask you for a password, then it will stow it into the Keychain, and SCPlugin will be able to use it.

  • Mikhail Gurevich

    Anyone knows if and if yes when svn+ssh feature will be added? SCPlugin is a beautiful solution to the command line on the mac and I hate to see it go to waste.

  • http://scplugin.tigris.org Jack Repenning

    We don’t have that work scheduled at the moment, unfortunately — this is an open-source project, and a small one at that; “scheduled” basically means “someone’s working on it.” We’re always open to new community members with an interest in implementing cool stuff like this!

  • Michael

    I´ve tried the SCplugin and the subversion-client. basicly following the guide at the top of the page. I maneged to gain acces to the server I´m supposed to be linked up, but its a read-only connection. Is there any way I can get able to submit my work to the servers folder? Im kind of a newbee – go easy on me :-)

    - Michael

  • Mikhail

    To those that need svn+ssh access and are running an Intel powered Mac you can install Tortoise SVN on Windows with Parallels. To get file sharing working check out the post by e7sharp9 at http://forum.parallels.com/archive/index.php/t-142.html

    Good luck.

  • http://scplugin.tigris.org Jack Repenning

    Michael: what do you mean “it’s a read-only connection”? What do you see when you try to “commit”?

    There are a couple things that might be what you mean. One would be if whoever set up your repository intentionally set it up so that you can only read, not write. That sort of configuration is possible, so you might want to make sure you’re actually granted the necessary permissions.

    The other thing is that some repositories are set up so that anyone can read them, but you have to log in to make changes. Despite the fact that this makes a fair amount of sense, I have to admit that we on the SCPlugin project just completely forgot about the possibility in the current release. If you have such a configuration, you will have to log in to the Subversion server once from the command line. When you do that, Subversion will store your credentials in the OS X Keychain, and then SCPlugin will be able to use them, too.

    Here’s how to do that.

    First, check out some files from the server, using SCPlugin. Sounds like you’ve already done that.

    Next, open Terminal (it’s in /Applications/Utilities).

    OK, this next part’s kind of ugly, sorry about that. In the Terminal window, type
    PATH=”/Library/Contextual Menu Items/SCFinderPlugin.plugin/Contents/Resources/SCPluginUIDaemon.app/Contents/bin:$PATH” 
    That all has to go on one line; I know it’s been broken into two or more lines, to display in your browser but pull it all up onto one, and be sure to leave the spaces in “Contextual Menu Items”.

    Now, type “cd XXX“, where XXX is the directory where you checked out those files.

    Now, type “svn update” (you may see some newer files come over, or you may see nothing at all if there aren’t any new files, but you should not see an error message).

    Now, make some change to some versioned file (if you haven’t already), and type “svn commit”.

    What should happen is:
    1. an editor will appear, asking for your commit comments, describing this change you’re committing. Type in whatever’s appropriate. Save the result, and exit the editor.

    2. the commit should begin, and you should be asked to provide your password. Do so.

    3. the commit should complete

    4. and now, you should be able to use SCPlugin for all operaitons.

  • Michael

    When I try “svn update” in the terminal I get an error message:

    svn: Can’t convert string from native encoding to ‘UTF-8′:
    svn: Gruppem?\195?\184der

    I´ve tried to type the command:

    pico .bash_profile

    but i get the error:

    -bash: pico: command not found

    Can anybody help me?

    - Michael

  • http://scplugin.tigris.org Jack Repenning

    Michael -

    That’s interesting. Do you have some other raw text editor you’re familiar with, vi or emacs or something like that? You can use any text editor on the .bash_profile file.

    As to why you have no pico …

    Try this: type “/usr/bin/pico .bash_profile”, see if that works.

    If not, do you have a file named /Library/Receipts/BSD.pkg? (Type “file /Library/Receipts/BSD.pkg”, does it say ”/Library/Receipts/BSD.pkg: directory”?) If not: you have not installed the BSD package (which I guess is optional).

    Try this instead:
    open -a /Applications/TextEdit.app .bash_profile

  • Pingback: marcus’ tagebuch » Blog Archive » Subversion und MAC

  • Jason Belec

    Well I thought this was cool some time ago. So I thought I’d try it under Leopard. I downloaded the beta plugin. So far so good!

    Might I suggest updating the instructions to represent the current version improvements like not in System Preferences. I had to read quite a bit more to catch this, nice that at least it was present.

    Again – very cool. One less thing to open!!!!

  • Mike Lynch

    Thanks! That information on the second copy of svn being inside the plug in was priceless!

  • babu prakash

    I able to see all option under more on right click, as soon as i select checkout , i am getting error “/.subversion/config:13:option expected”. please help.

  • http://scplugin.tigris.org Jack Repenning

    The message “~/.subversion/config:13:option expected” suggests that there is an error in your Subversion configuration file. Check that file, at line 13, to see what might be wrong.

  • Pingback: lab.joelGillman.com › SVN For Beginners, no really.

  • bastiaan

    If you’ve installed developer tools (Xcode) then you don’t need step 1-a and step 2 because subversion comes with the developer tools. To check this just type ‘svn’ in the terminal and if you’ll see a message like “type ‘svn help’ for usage” then subversion is already installed.

  • http://scplugin.tigris.org Jack Repenning

    Wow, this conversation has been going on a long time! I imagine that means this blog is still helping people, which is great. However, life at Apple moves on, and a lot of this is a bit out of date. Let me see if I can update it a bit.

    First, on getting a basic command-line version of Subversion: ever since Leopard, this has been included in Mac OS X–in the base package, always there. You don’t particularly need to install the Developer tools: although they use Subversion, they don’t include Subversion: it’s built into the system. So Leopard-and-later (10.5.x and later), you already have Subversion. Sweet! And any lingering Tiger users have probably finished any set-up they’re ever going to do on that box. So the “step 1″ listed in this blog has become unnecessary for pretty much everyone.

    Second, although there once was a version of SCPlugin that used the installed Subversion, this is no longer the case. Rather, SCPlugin comes with its own, built-in copy of Subversion. Installing your own (back on Tiger), or using Apple’s (Leopard and beyond) is still handy for Subversion operations from the command line, or from some other Subversion clients that don’t come with Subversion built in, but is not strictly necessary for SCPlugin now. And just in case, we do make our built-in one available to you for those other uses as well, as a link in /usr/local/bin/svn.

    Third comes the sad, sad tale of Snow Leopard. For OS 10.6, Apple made some major changes to Finder (converted it to Cocoa, made it 64-bit capable, and abandoned Contextual Menu Items). I’m sure these changes are unspeakable wonderfullness for some reason or other, but they totally flummoxed SCPlugin. We’re buried in Snow, as it were: our menus don’t appear in Finder’s menu any more, and Finder file icons don’t get badged any more (although you still see them occasionally in find-file dialogs of other programs). While we dig ourselves out, we’ve provided an additional component SCToolbarButton. After installing SCPlugin, you drag this program to somewhere convenient, and then click it to do Subversion stuff. The expected menu appears, and you’re off to the races. Popular places for the Button include:
    – The Finder tool-bar (hence the name;-), at the top of each Finder file-browsing window
    – The Dock
    – Dock replacements, like Trampoline