Working with Subversion externals in Cornerstone for Mac

on

I’ve been using Zennaware’s Cornerstone for Mac as my primary Subversion GUI. The interface is much better than anything I’ve found for the features it has. (It’s only real shortcoming is that it doesn’t have support for branching and merging, so I occasionally need to use SmartSVN when it comes time for working with branches.)

I had a need today to work with some open source code that has its own SVN repository so I decided to give Cornerstone’s SVN Externals Definitions feature a try. If you aren’t familiar SVN Externals they allow you to reference an external repository in your own (or even just have subdirectories reference different locations in the same repository.) This is perfect for if you are using open source code as part of your project and want to keep up to date with the latest code in that project or just reference a particular revision from that project. If you were to put the code in your repository directly it could be a huge hassle to update it in the future.

Adding an externals property in Cornerstone wasn’t obvious to me at first:

  1. Select a directory in your repository
  2. In the File menu choose Open Externals for “directory” (or hit Shift+Command+X)
  3. Click the + to add a definition
  4. In the Check out to box enter the path in your repository to check out the external code. This path is relative to the folder you selected in Step 1
  5. In the Check out from box enter the path of the external repository code
  6. For Revision keep it at HEAD if you want it to reference the latest revision in that branch. If you want a specific revision you can specify it or click the tiny icon at the right of the input box and it will download a revision log for you to select from.
  7. Select File then Save (or Command+S) to save the externals property
  8. Commit the property change to your repository
  9. Update your repository. The external files will be pulled automatically
  10. That’s it!

Here’s an example of what my screen looked like when I was putting the JWPlayer source code as an external in my repository:
Adding a new external

If you want to see the files of externals in your file list in Cornerstone select Show Contents of Externals from the File menu.

6 Comments

  1. Jonathan Dean

    Hardy, did you make sure to select a folder in the file list first? It won’t let you add one on a file or ignored folder. Also make sure that folder has been added to the project and committed.

  2. Clare Swindlehurst

    I’ve been tearing my hair out with this one for the past few hours so I thought I’d flag the missing step. You need to do the steps mentioned here once you have created a working copy of the project. I was trying to do it in the actual repository!

  3. Shane

    My issue is that I want to be able to update the external repository. Although this feature is supported in seemingly inferior apps such as svnX, it appears that it is not supported in Cornerstone. Does anyone know otherwise?

    1. Sam Sehnert

      In my experience you simply modify the external file in the local working copy. When you go to commit back, Cornerstone knows its an external, and you can commit it back to it’s original repository.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>