If you use Subversion for development, and you use a Mac, you probably find yourself wanting a Subversion client designed specifically for macOS.
Cornerstone from Assembla is just such a client. In this article, I take a look at how Cornerstone works. Specifically, this article is a review of Cornerstone 4.
By way of background, I’m currently working as a lead software engineer, focused on developing Java microservices to support commerce functions in the AWS Cloud and other related DevOps activities. I have more than a decade of experience in the industry.
My experience with source code repositories extends from Visual SourceSafe when I first started as a developer to Git and Mercurial. I’ve used TortoiseHg as a GUI interface with Mercurial repositories, and with Git, I manage my activities from the command line.
My experience with Subversion, however, has been more limited. Like most software engineers, I’ve encountered it from time to time, but I have never used it systematically in my job. I also did not have any experience with Cornerstone prior to writing this review. That said, I agreed to write this review in order to provide a sense of how easy Cornerstone is to use for a developer who does not approach the product already having deep Subversion expertise.
For this review, I focused on the following activities and how to perform them with Cornerstone.
- Installation and Configuration
- Shelving and Checkpoints
- Diff Comparisons
Installation and Configuration
The Cornerstone installation was straightforward. I applied for my 14-day trial, downloaded the compressed file, and installed it on my MacBook. Automatic updating appears to be enabled by default, and I found the upgrade from version 3.1 to 4 extremely simple.
The client displays the dialogs to add a new repository by default when you first log into the product, or on subsequent sessions if there were no repositories configured. The tool appears to automatically enter details for the repository (based on the website I had displayed in Chrome before clicking on the dialog window). This feature was a nice (although surprising) touch.
With my cloud Subversion repository configured, I was able to check out the code successfully.
When I first opened up Cornerstone, I was impressed by the clean interface. Buttons can trigger primary user functions at the top of the UI. The only other GUI tool I’ve used with source repositories before has been Tortoise, so I was expecting a layout similar to that. The display configuration of Cornerstone is different, but intuitive at the same time.
The view options were hard to understand and didn’t appear to have tooltips explaining what each view represented.
The left-hand panel appeared by default and showed the remote repository and my local checkout of the code branch. While informative, this panel traded a lot of real estate for a limited amount of information.
The right-hand panel did not appear by default and wasn’t obviously available due to the size of the window when I opened the tool. This panel has a great deal of useful information in it.
Shelving and Checkpoints
The first feature that I wanted to try out when faced with a product review for Cornerstone was the Checkpointing feature. My assumption when seeing that Checkpointing was a feature was that it allowed for a marker to be added to the history of a revision, letting a user revert to a specific point in the history of the working copy. When working with Git, I’ve accomplished something similar by creating a commit, and then reverting changes later if needed. It’s a cumbersome process, and the implementation of checkpoints within Cornerstone will be a handy feature.
The only information I found on Checkpointing with Subversion was in the release announcement for Cornerstone 4.0, and an article explicitly covering the new Shelving & Checkpointing features. In my opinion, this is a feature which should be better highlighted and advertised to users.
By following the instructions in the detailed article on how to create checkpoints, I was able to create a series of checkpoints while adding new code to a Java microservice. I enjoyed being able to create a checkpoint shelf as I went through.
Figure 1. Creating a Checkpoint with the Shelf Feature
Once I had created a series of checkpoints, and had my code into a state where I was unable to unshelve the checkpoints without conflicts, I then used the Shelve and Revert feature to shelve all my changes and then used the checkpoints to Unshelf myself back into a working state.
Realizing that the timeframe for my test might not be typical, I can see this feature being incredibly valuable. The crucial factors for the engineer would be making checkpoints at the right times and ensuring that meaningful names have been assigned to the shelves. By comparing this process with the process I usually follow when making incremental commits with Git, I preferred this approach, and the user interface made it easy to navigate.
As I mentioned above, I was able to use the Shelf and Unshelf features to recover my work and return my code to a working state. I did run into a minor problem when my changes to the code came into conflict with the code in the shelved version of the code.
Figure 2. Facing Conflicts when Unshelving Changes
The only options I could see were available to me were to inspect the patch file and resolved the conflicts manually, or cancel the unshelf operation. I think a diff tool might make this particular process more straightforward to work through.
Other than resolving conflicts, my experiences with Shelving and Unshelving changes were excellent.
To test the merge functionality, I set up a situation which would be typical where multiple engineers are assigned the same project. With the basic framework for my application, I added a few informational REST endpoints to the application on my MacOS workstation. On my Windows workstation, starting with the same base application, I created different endpoints and chose different configuration formats in the build.gradle file. I committed my Windows-based changes first and then performed an Update with Cornerstone on MacOS updates.
Figure 3. The Result of an Update Execution Which Caused Conflicts
In attempting to merge the files, Subversion ran into a lot of conflicts. I’m confident the logic to merge differing content is independent of the Cornerstone tool, so I’ll focus instead on steps I took to resolve the conflicts and combine both my local code and that which had been committed into the repository already.
My first attempt was to find a way to view the differences between the versions of the files in conflict. Right-clicking on one of the problematic files, I found the option to Resolve Conflicts. Unfortunately, this option marked the file as having the conflicts resolved, which made sense, but didn’t help me resolve the conflicts within the file.
Using the combined file and the versions generated by the Subversion merge process, I was able to manually move code around in the conflicted file to resolve merge conflicts, but I’d like to see if there is a diff tool which could show me both source files and let me combine them into the final file to commit.
There did not appear to be any documentation on the Assembla site detailing how to resolve merge conflicts. The right-click menu indicates that External Tools can be used, but I did not yet have any of these installed.
Viewing the files in the Conflicted view pane, I saw two options available at the bottom of the screen.
Figure 4. Options Available to Resolve Merge Conflicts
Using the Compare with HEAD option, I was able to see the differences between my existing files and those which had been checked in from the other workstation. I tried a comparison between different versions using this tool, and eventually found a combination which allowed me to merge the latest changes into the files.
The Resolve option appeared to be a drop-down menu; however, when I clicked on it, it marked the file as resolved directly. I had to introduce changes in both workstations again to produce the conflicts to try using an external diff comparison tool.
Comparison with Diff Tools
From the primary menu, I was able to find the following list of potential comparison tools.
Figure 5. Compare Tools
I signed up for the trial version of Araxis Merge and installed it using the evaluation key I received. I then added the tool support from the Cornerstone Compare Tools dialog. I was unable to find a way to launch a diff with Araxis Merge from within Cornerstone (even after restarting the application) in case it needed to pick up the configuration on startup.
Finally, after navigating to the Conflicted tab and clicking on one of the files with conflicts, I was able to click on the Open button, and the file was opened in Araxis Merge. Initially, only the merge file with all merge annotations was opened, but after exploring the Araxis tool more, I was able to open up a couple of panes and perform a merge between different versions.
Figure 6. Initial View when Opening Araxis Merge
Araxis Merge did allow me to view a diff between the version of the files. However, it required me to find the files and set up the comparison myself. There was a minimal advantage to linking to the merge tool from within Cornerstone.
The Timeline option took a little exploration to figure out, but I found it to be a convenient feature once I did. The most confusing part was changing my perspective from its being a timeline for the project to the timeline for a specific file. One of the aspects which made this hard was not having a way to change the file that I was viewing from within the timeline tool.
I also experienced a little weirdness when viewing the timeline for a file which had a rename of the file in its history. I changed gradle.build to build.gradle, and while the changes displayed in the right-hand panel showed this, the timeline itself appeared to break at the rename point.
Figure 7. Timeline Inconsistencies for a Renamed File
When comparing the non-commercial tools available for Subversion repositories against others, such as Git and Mercurial, it is apparent that Subversion tools have some catching up to do. However, Cornerstone stands out from these other solutions as a more mature, robust Subversion tool client. It is the best Subversion tool available, in my opinion.
An observation I’ve made with other repository management options available is that the UI-based tools and the CLI tools are often very different in how they surface functionality and allow the user to interact with their repositories. Cornerstone appears to have found a balance between the CLI commands and UI tool which allows the user to transition between them both with minimal context switching.
In my opinion, Cornerstone is a good tool with a lot of potential features which could be added in future releases. In addition to changes I outlined in the process of this review, I’d like to see a more comprehensive Help system, which includes detailed feature explanations, and allows the user access to recent articles on the tool. Such explanations could include:
- How to configure an external comparison tool to work with Cornerstone.
- How to resolve merge conflicts.
- View options and UI configurations.