Cornerstone 2 Review - The Best Version Control System
When I started to get more into what I do, which is of course programming, I started to fear one thing that every developer had experience with... code organization failures. You developers know exactly what that means -- the failure to keep your code in an organized fashion. We all had our days when it was nearly impossible to find release fourteen revision five (just an example) in a massive 10GB folder on an external hard drive housing many months of development work.
I've had it happen and I'm quite sure every other developer can chime in with their own experiences. For a more personal one, I used to organize my code in the following folder structure:
(Company Name) --> "Sources" --> (Application Name) --> (Build Number)
At the time, I thought that was a brillant way of source code organization; I ending up using that method for nearly two years... that is, up until now (if your wondering what I was doing before my folder method, let's just say I had no method of organization)! A more modern way of organizing your code is with a version control system. A version control system can not only store your code, but it can also keep track of all of your revisions; hence the term "version control".
One popular version control system, at least for the Mac that is (sadly, there's no good version control system on Windows or even Linux), would be Zennaware's Cornerstone 2. With 181,000 lines of code and much thought put into the design process, Cornerstone 2 is not only one of the most functional version control system on the Mac, but it is ideally one of best designed ones too! We'll get more into this later, but for now, please enjoy the full review of Cornerstone 2!
Just as a side note, I am using the old Google Code repository of jQuery to demonstrate the features in Cornerstone 2. As much as I would like to show you my own code, I cannot. I have quite a bit of unreleased projects in there that I want to keep under disclosure for now.
User Interface
Being a Mac user, it's hard to believe of an application that has a bad user interface, but in reality, some Mac applications are not laid out despite the awesome graphical tools Apple gives developers to work with. In Cornerstone 2, Zennaware did an amazing job at taking a very powerful piece of software, Subversion, and transforming it into a clean and easy-to-use interface.
I've found other version control systems on the Mac to be fairly unorganized in terms of the user interface. Versions, which is another popular version control system on the Mac, shows a very good example of being unorganized. In all seriousness, that tool bar at the top has way too much going on. In Cornerstone 2, the elements and various tools are laid out in a way that just makes sense.
Whether this isn't a post about how Cornerstone 2 compares with Versions, I have to say that Cornerstone 2 kicks Versions out of the way in user interface design. This was one of the factors that played a huge roll on what version control system that I think is the best.
As you'll see throughout this review, Cornerstone 2 keeps this consistant and nicely organized interface no matter where you are. The user interface means so much to me because despite how well I love Cornerstone 2, I don't want to be working in it for all to long; I want to get my work done in the application and go back to what I do best... coding. Having an user interface that's optimized for quick use is something that really means quite a bit to me.
Setting Up a Repository
Cornerstone 2 would be just a fancy icon sitting on your dock without setting it up. Thankfully, to make things cost effective for some people, Cornerstone 2 comes with a built in Subversion system; in other words, so you don't need to fire up a server to host a Subversion server.
Cornerstone 2 has a variety of methods of connecting to a Subversion host:
- Cloud Hosting - Powered by Codesion, it offers an easy way of logging in and managing your different repositories. They offer many plans along with a student plan, free plan, and an open source plan.
- File Repository - This, at least in my mind, would be an option that most people would select. This uses the built in Subversion built into Cornerstone 2 for your convenience. Nothing to set up but where to store and what you'll call it; very simple and effective. If you are going to have a very large repository, it might be best to put it somewhere else than on your internal hard drive.
- HTTP Server - For me personally, this is what I'm using. When selecting an HTTP server, you're basically setting it up to use a server that you have access to and that Subversion is installed on. You could, however, set up a local server on your own network and install Subversion onto that to use this feature. You could even set up a local server on your own computer if you really wanted to.
- SVN Server - Like an HTTP server, but instead of using the HTTP protocol to host Subversion, it's using the SVN protocol (port 3690) and it's powered by Svnserve. It's much faster than the HTTP server option and you can still use a secure connection also, which is of course always a plus. I prefer the HTTP server option for some authentication reasons.
And that's all the options of connection Cornerstone 2 offers! I'm hoping they'll add more cloud hosts in the future for an easy set up.
Checking Out and File Management
As important as setting up your repository, downloading and even importing is just as important. Luckily, Cornerstone 2 makes it extremely easy to do both.
If you want to check out a working copy, which would be the local copy which you would edit, it only takes a couple of steps: selecting the folder(s) or file(s) you want to check out, clicking on the "Check Out" button in the upper left, and filling out what you want to call it and where to put it. If you want to get the the advanced options, you can of course set what revision to check out and at what depth to check out at.
For exporting (and even importing) files, Cornerstone 2 makes this extremely easy. Select what you want to import/export and then set a few other options. You can even drag files/folders into the browser to move files into the repository simply. Simplicity at its finest!
In other words, Cornerstone 2 makes adding into and checking out your repository take no time at all. Transfer speeds will be determined at how fast your internet connection (that is, if you're using an external repository) and even how fast your internal hard drive is.
Another thing to mention is that Cornerstone 2 can create your entire folder structure (tags, branches, and trunk) for you automatically. That's just one nice feature Cornerstone 2 does for you. It's very much appreciated when I set up my repositories for the first time.
Maintaining Files, Folders, and Repositories
Viewing all of your files and folders along with their properties is a critical part in any version control system. Cornerstone 2 is no exception of having one of the best implementations that I've ever seen.
On the top of every browser and right below the black/gray bar, displays a nice button-like selector to narrow down your searches. You can organize the list by practically anything you wish.
I was extremely happy to have a search bar right there; searching for files in the SVN is extremely easy with that feature.
You have your choice to show the inspector, like in many Mac applications, gives you the details of all of the folder(s) and files(s). It offers quite a bit of details which I appreciate very much. This is where you can manage svn:externals and svn:ignore. Not only that, but it even shows you some interesting details like the checksum, URL, depth, and even lock details. Now that's what I call a useful inspector!
At the bottom of the window, you can open the file, compare it with another revision, resolve any conflicts, the log, timeline, and of course, the transcript. We'll cover the last four items later in the review.
A little neat feature under the "Transcript" menu bar at the top leaves you with an option called "Add Note". It's a great feature that's somewhat hidden in Cornerstone 2.
When you make changes to your working copy, Cornerstone 2 will let you know with a badge icon in your dock and some nice indicators under the flags column of the file browser. Not only do you have two indicators telling that your working copy has changed, it also shows it under the "Working Copies" sidebar. No matter where you are in the application, you'll know if your working copy has been changed.
Creating Tags and Branches
Tags and branches serve as a critical part of any SVN repository. Basically to describe tags and branches, tags are commonly used for keeping the state of a release (whether public or private) and branches are technically the same as tags, but can be used to edit them and fix a feature if you need to.
For an example, if you release version 1.0 of a piece of software, you create a tag and a branch out of it. You're on 2.0, but you discover a major flaw in your 2.0 and 1.0 code. You merge the fixed 2.0 code into the 1.0 branch and then create a 1.0.1 tag. Hopefully that helps a bit with explaining what the two are used for.
Anyways, gearing back onto the subject, creating a branch or a tag in Cornerstone 2 is the same process for both and extremely simple. Basically, once you select the folder that you want to branch or tag, just give it a name and you're done!
Simple, effective, and extremely efficient! And besides, the two icons look awesome!
Available Settings
For a tool as vast as Cornerstone 2, you might expect the settings to be very daunting. But actually, they're quite simple and the exact opposite. Cornerstone 2 gives you general settings to change the inspector window, tab width, the font (Inconsolata FTW!), external compare tool (it's nice to see they added BBEdit support), comparing options, what to do on a double click for a working copy file, and some customization of the badge dock icon.
Of course, they also offer settings for working copies, when to check for software updates, advanced SSH options, and quite a bit of Subversion settings (it's nice that they also set an option to ignore the .DS_Store files).
The only thing I noticed is I was not able to change the document color in the font dialog window (it's the upper right button). I'm the one who likes to code (or even read code) on a black background.
Help Documentation & Support
I really have to give a hand to the guys over at Zennaware; they have added some of the best help documentation that I have ever seen in any Mac application. Not only do they teach you about how to use Cornerstone 2, they also give teach you about Subversion in a very extensive way.
As seen in the left image above, the "Introduction" section introduces version control in a very simplistic way. If you want to get learn much more about Subversion, they included a whopping 395 page PDF that's available in the "Help" menu bar.
If you want to take a look at the help documentation yourself before you buy, you may do so at the below link:
http://www.zennaware.com/cornerstone/helpbook/
On the other side of support, Zennaware has some amazing e-mail support. Simon Wilson, the developer of Cornerstone 2, was responding to every one of my questions in a very detailed manner. They're very open for your thoughts so if you have any gripes with Cornerstone 2, be sure to leave them a message! They responded within a day for every e-mail I sent them. Now that's awesome support!
Committing to the Repository
With one of the main features in Cornerstone 2, committing to your repositories couldn't be any simpler. Cornerstone 2 provides an easy interface to set your log message, take a look at what will be changed, and some options that one may use.
When adding a log message, Cornerstone 2 makes it extremely easy to see the recent changes right in your commit window. I really appreciate that one feature; it makes things much easier when logging your messages.
The changes section of the commit window is pretty straight forward, but not only can you see the changed files, you can also see the changes for a specific file right in that window.
Under the options section, Zennaware included two extremely useful features. Unlocking the files right after you commit and running a script right after the commit. What's nice about running a script is not only does it give you much more flexibility, it can also save you much more time in some cases. It supports a Unix shell script (.sh), Perl script (.pl), Python script (.py), AppleScript (.scpt), or even an Automator action (I found that to be the most useable; Automator is extremely powerful even to us developer, but it's not only easy to use, it can also save you time).
If any conflicts may arise when changing files in your working copy, Cornerstone 2 will guide you through with correcting those problems with its resolve features.
When I was speaking with Simon Wilson, I mentioned whether or not if it would be possible for offline commits (that is, when you're using an server off your network). He said it would be difficult to add in the functionality because Subversion is a centralized repository. Cornerstone 2 only supports Subversion and no other systems like Git or Mercurial. Luckily, Simon also pointed out that Subversion 1.7 will include a new working copy implementation which should allow for offline commits to be supported.
I also mentioned to Simon the possibility of Growl integration for notifications when Cornerstone 2 detects any changes. It seems that not too many people have asked for the feature. Because of the badge dock icon, I can see it as not needed, but then again, Growl is certainly useful. (Update: Growl has been added in Cornerstone v2.2)
The Timeline of Changes
Unlike some other version control systems, Cornerstone 2 comes with a vast amount of tools to help you see your changes over time; one of those features being the timeline. With the timeline, you can compare two revisions of a file (you can do this without the the timeline, but the timeline makes it really simple to compare against different revisions) and even view some annotations.
The annotations feature is what really made me love Cornerstone 2. You can see the legend the timeline graph; this is a very nice visual representation of how the file was changed over time by the different authors. You can click on any one of those circles in the legend and it will show you what was changed. Another nice feature of the annotations is that you can view of how much a author contributed to the file.
Not only does the legend provide quite a bit of information on its own, but you can hover over any of the color blocks on the side of code viewer to see when it was changed and who changed it. If you click on the same color block, it'll show you why it was changed (the commit note).
This feature alone is what really made Cornerstone 2 my version control system of choice. If you're deciding against other version control systems, this should be why you would buy Cornerstone 2. The built in comparison tools and annotations really makes Cornerstone 2 the champion when compared to any other version control system.
With Cornerstone 2 having support for over fifteen different languages, it's only lacking one feature that I noticed. With most professional code editors, they have a function browser, like this one in BBEdit. Simon said it would be a feature they would like to add, but the only thing holding them back is the development resources of parsing every language to take out the semantic information. Being a developer myself, I mentioned that they could just use regex, but then that would not be possible because it could turn up false positives because of symbols in comments or even strings. They would have to create a lexical analyzer which would be a lot of work. But on the bright side, they did say it would be a feature they would like to add. We could see it in the next major release!
One of the best parts of Subversion is that you can easily track the changes over time. Cornerstone 2 takes advantage of this feature in a way that is extremely helpful.
The first part of Cornerstone 2's tracking features would be the log. Quite simply, it's just a log of all of your changes over time. Not only does it look classy, it's also extremely functional. You can clearly see the notes for the different revisions, when it was changed, who changed, and what was changed. A nice feature is that it doesn't show the entire note for the revision if it's too long and to copy a log of a revision, they conveniently added in a "Copy" button. After copying the data, the date isn't too human readable. It would be nice if they made it a "fancy" date with some more explanations so it's easier to read... something like "Revision 6,581 | Changed By: wycats | September 16, 2009 at 4:33:00 AST | 1 Line". I'm still trying to figure out what the "1 Line" means though. In my mind, I would replace that with something like "2 Lines Added | 1 Line Deleted | 5 Lines Modified".
The second tracking feature would be the transcript. This isn't per se a feature of Subversion, but a feature of Cornerstone 2. Basically, it keeps a transcript of everything you do and errors that may come up along the way. There's no way to keep the transcript forever, but instead, they offer you to discard it when a newer entry is added, after fifteen minutes, one hour, one day, one week, or one month. It's nice to have this feature here in Cornerstone 2. If you forget what files you modified on a certain day, the transcript will be a big help to figure that out.
Merging
One of the most functional features of Subversion is that you can merge changes from revision to the next. Cornerstone 2 not only makes it extremely easy to merge, it also provides four options of merging and additional feedback.
To understand Cornerstone 2's merging features, you have to know what the four options are used for. So how about we list them out below?
- Synchronize Branch - Copying all changes since the last merge. Used when needing to synchronize a feature branch with trunk (the development version).
- Reintegrate Branch - Related to synchronization, but instead of integrating features from the trunk to branches, it'll merge the changes from the feature branch back into trunk.
- Cherry Pick Changes - Certain individual revisions are copied from one branch to another. Typically from trunk into a working copy for the destination branch.
- Advanced Merge - Comparing two folders and the differences being merged.
Clearly Cornerstone 2 offers quite a bit of merging features. Not only that, but they even include a checklist to make sure your merge will go well with no conflicts. Right below that, they give you a preview of the changes.
Merging has just gotten much easier in Cornerstone 2. I really appreciate the easy-to-use merging tools they provide. Merging is one feature that needs to be in any version control system and to have such a powerful merging system helps many developers like myself. Think about it, some version control systems don't even support merging; Cornerstone 2 provides a variety of merge tools!
For more information and examples on merging, view their help documentation.
My Final Thoughts
It's without a doubt that Cornerstone 2 is one of the most extensive of version control systems out there. Not only does it have features that other version control systems don't have, it's also extremely easy to use. Even though developers are used to using very advanced and hard to use tools, it doesn't mean that we want a hard to use version control system.
Just thinking of all of the time Zennaware spent on Cornerstone 2 really says something. For how much time they spent on just designing the logo and two weeks to design one icon shows how much work Zennaware put into Cornerstone 2.
The entire interface is clean as a whistle and is just so easy to use. Instead of spending time finding things in Cornerstone 2, you can focus on what you do best.
Cornerstone 2 is my version control system of choice because it not only does what I want it to do, it does it remarkably. I've used many SVN clients on many operating systems, and Cornerstone 2 is by far the best that I've ever used.
If you're looking for a stable version control system, one that's easy to use, and with much help and support to save your back when you're in trouble, get Cornerstone 2, you won't regret it!
For more information or to purchase Cornerstone 2, visit their website below:
Stalk me on social media! Any other way would just be creepy…
Follow me: