Let me paint you a picture. It’s 5 minutes till 5 at the end of a long work week and you’ve just wrapped up a new feature on your current project. It’s time to commit those changes and head out for the weekend. You pull up TortoiseSVN, write a helpful and descriptive commit message (feeling vastly superior to your less-than-thorough colleagues with their ), and hit the Commit button.
AHHHH! The last thing you want to do is spend the next hour picking through other people’s changes to make sure your code still works.
Now here’s a little secret about developing software with a team. Merging is just a fact of life. Unless you want to go back to the old model you’re going to have to merge your changes with someone else’s at some point. But with today’s software, most merges can be handled automatically by our development tools. The only real problem arises when you have to merge lots of changes all at once across many different parts of your code-base. Resolving conflicts (deciding what code to keep when two changes contradict each other) requires intimate knowledge of your code and your colleague’s code. Not the activity for 5PM on a Friday!
There are two keys to keeping merges simple:
As you are making changes to your code, keep a mental note when you shift from one focus to another. Are you fixing a bug? Developing a new feature? Optimizing a query? As soon as you shift from one focus to another – assuming you are finished with the first thing – commit those changes along with a short, simple description of your changes. This is good practice in general, but it also greatly reduces confusion when a team member has to merge their changes with yours. A small, focused change is much easier for someone who isn’t familiar with your code to comprehend. So if I have to merge my changes with yours, and I see that your change fixes a certain bug, I can be sure to pay attention to that detail when merging so as not to re-introduce the bug into the code-base.
Staying up to date with the activities of your team is a critical step in reducing and even eliminating the pain associated with merging. If you see that a colleague committed a change to a file you are working on, you can update your working copy right then and there. This offers two significant advantages: (1) you will be dealing with smaller conflicts that are usually much simpler and (2) the other developer is probably still in the office if you have any questions.
This is where Sublime enters the picture. Sublime allows you to stay up to date with your development team using email notifications and RSS feeds. If you enable email notifications on your project repositories you will be notified immediately when another users commits changes. If you don’t like email, you can use the personalized activity stream RSS feed which notifies you whenever a user commits changes to any of your repositories. Both of these methods allow you to quickly scan the commit details including the commit message, and changed files so you can determine if their changes might conflict with your work.
The amazing thing about these two practices is that (a) they are actually pretty simple to implement and (b) the time and mental energy required for merging changes practically vanishes. And it’s not just that you are spreading that hour merging commits across the day so it doesn’t seem like it takes as much time, it really does take less time. The reason for this is that you are eliminating the mental ramp-up time required when you save this for the end of the day or worse, the end of the week.
A good way to think about this is efficiency in testing and fixing bugs. Fixing bugs while your team is actively engaged in development is vastly more efficient than fixing bugs after your team has disbanded and moved on to something else. While development is in progress, everyone is already engaged and can rapidly jump to the source of a problem, get it fixed, and move on. Your brain operates the same way. While you are working on a particular piece of code, your brain keeps a mental model of that code so that you can quickly navigate from one area to another implementing features. If you have to merge changes and you already have that mental model, you know exactly how those changes will impact your code and what needs to be done to resolve any impacts.
These two practices really aren’t that hard to implement with your team. Sublime has features that are designed specifically for making this easy, but even if you are using a different product you can still work to implement these practices. Once you have worked this way for a few days I guarantee you’ll never want to go back.
We just pushed the final bits live and you can download Sublime 1.2 now! Version 1.2 can be installed right over top of your existing Sublime 1.1 installation so upgrading is a snap!
We are super excited about Sublime 1.2 and feel that it’s the best version of Sublime yet. Version 1.2 introduces a slew of new features and enhancements. Check out the release notes for the complete list of new features and bug fixes included. Below are the highlights:
As you may know, last week saw the in New York City. This wasn’t a large event, rather it was a small meeting of several core members of the Subversion team. Their goal wasn’t marketing, community building, or flag waving, but rather to step back a moment and take a look at where Subversion was headed. And although they didn’t come away with a finalized roadmap or vision statement, it does appear that some good progress was made on mapping out the direction for Subversion.
I think this is great and I’m glad to see the Subversion team taking some time to map out the future. But I do wish we had seen some indication that Subversion may evolve to incorporate some distributed functionality. However, according to the immediate plan appears to be to “Maintain a centralized approach to version control”.
Considering the composition of the team – most members being from companies such as Collabnet or WANdisco who serve the enterprise – this isn’t exactly surprising. Centralization is still a key concern for enterprise IT organizations who need to maintain tight control on their systems for compliance and governance reasons. But I hate to see the team dismiss different approaches to source control simply because it doesn’t appeal to the enterprise yet.
I think distributed version control systems have some great advantages and not just in the open source space. I think cheap, personal branching and merging is an extremely powerful tool. From personal experience I can tell you that it can completely change your development workflow for the better. My opinion is that anything that stops a developer from committing changes is a bad thing. Your version control system is your safety net – it should be there to support you, not to impose speed bumps.
I’ve watched the rise in popularity of DVCSs over the last few years. Git made the DVCS sexy but they’ve been around for quite a while. Microsoft supporting is just one example of DVCSs being taken seriously by very large players.
But even though distributed systems are the hot “new” thing, most organizations – big or small – still place a high value on centralization. As a small business using Subversion, I see the value in having one location with all of our valuable IP. I have one asset to back up, one place to go to find repositories, one place to go to manage access, etc. These are all great arguments for a centralized system but I think there can be a middle ground.
The combination of a centralized version control system supporting distributed working copies could be extremely powerful. Allowing your developers to commit, branch, merge, and revert locally and then pushing changes up to the master repository as appropriate seems like the best of both worlds.
This is where the Git users out there yell at me and tell me that Github already works this way. I’m aware of that and have used it myself. It’s a great workflow – but it’s not ready for the enterprise, or even smaller companies. It will work for some, but not for the majority.
This is where I think the Subversion team can make some serious traction – not just supporting the status quo – but really moving the product forward in a new and exciting way. I think that Subversion is in the unique position of being able to take advantage of the benefits that distributed systems offer while at the same time serving those who care about centralization.
In the coming months I expect that the Subversion team will make their roadmap public and I’m excited to see what’s on it. I really like what I’ve been hearing about the Working Copy changes (no more .svn folders littering my working copy!) and love to see the momentum in the community. Subversion is still hands-down the best source control solution for small, medium and enterprise organizations, but it can always be better. I hope that the core team will consider some of these opportunities when mapping out Subversion’s future.
Over the last couple of days we have started . Initially these videos focus on how to use Sublime but over time we will expand the scope to cover Subversion topics as well.
Please let us know if these videos are helpful and if you have any suggestions on features to cover or ways we can improve them.
Over the coming months we will be releasing the roadmap for Sublime. This will include new features and updates for version 1.0 (which are available free to all current 1.0 users) as well as future plans. To make sure we are planning the right features for Sublime we have set up a to capture your feedback and ideas. you can vote on ideas submitted by other users, or submit your own suggestions.
Currently the top contenders are:
There are plenty of other ideas as well ranging from an enhanced repository browser, incremental backups, and security/permission audit.
Please help us make Sublime the best Subversion server available by providing !
Sublime will automatically send email notifications to your developers after a commit is made. You can enable email notifications for your repositories by navigating to the Repository in Sublime, clicking the Edit Settings link, and changing the Email Notification setting to “On”.
By default, each email notification looks like this:

Default subversion email notification
However, this can be customized by editing an HTML template file located on your Sublime subversion server.
Here’s an example of a customized email template. We have added our company logo at the top, and excluded some of the commit details.

Customized email notification
The table below contains the complete list of placeholder tokens which may be used in your email notification template. The example for each is taken from the screen shot below the table so you can see exactly where the token is used in the email notification.
| Token | Description | Example |
|---|---|---|
| {REPOS} | Repository Name | Synergy |
| {REPOS_URL} | Repository URL | svn://svn.mycompany.com/Products/Synergy |
| {AUTHOR} | Username of the committer | jimm |
| {AUTHOR-EMAIL} | Email address of the committer | jimm@mycompany.com (not shown, used for author link) |
| {DATE} | Date and time of the commit | 9/25/2009 10:42:39 AM |
| {REV} | Revision number of the commit | 10 |
| {COMMENTS} | Free-form comments entered by the committer | “Began implementing order repository methods” |
| {CHANGES} | Full list of changed, added, or deleted files/folders | M /trunk/src/Synerg.Data… |

Default subversion email notification
Sublime automatically backs up all of your Subversion repositories on a schedule you define. In this short article we will walk through the process of configuring your backups, monitoring your server to ensure backups are happening, and restoring a repository.
To configure your backups, navigate to the Administration section in Sublime and click the “Backups” tab. First, enter a path for your repositories to be backed up to. When you install Sublime, it will default this path to be a Backup folder within your Sublime installation directory. However, it is strongly recommended that you back your repositories up to a network device such as a NAS or remote network share.
Next, enter a time of day and the days of the week that your backups should occur. Generally this should be a time of the day that users are not using Subversion. However, Sublime uses the subversion “hotcopy” command when making backups so even if your users are still accessing Subversion you are not at risk of corrupting data or interrupting the backups.
Lastly, enter a backup account to be used when performing the backups. This account must have read/write access to the Backup path. It will also be added to the local administrators group on your subversion server.

Scheduling subversion backups in Sublime
Each time Sublime backs up your Subversion repositories, it will write an entry to the Windows Event Log. You can monitor this directly from the Sublime web interface, or by connecting to the server using remote desktop. Each entry in the windows event log will list the number of repositories backed up, the number of errors (if any), and the duration for the backup.

Successful Subversion backup in the Windows Event Log
If you are using Windows Server 2008, you can create a Custom View to show only Subversion backup messages. Simply create a new Custom View to display “Information” events filtered where the Source is “Sublime.SubMaint”.
Restoring a repository is essentially copying the backup repository from the backup location back to your Subversion server. However, as a best practice we recommend the following steps:
Let’s look at an example. In the screen shot below, the left folder is the Repositories folder on our Subversion server. This contains all of our current “live” repositories. The folder on the right is our backup location. If we wanted to restore the “CommonLibs” repository, first we would delete “CommonLibs” from the “Archive” folder on the left. Then we would copy the “CommonLibs” folder from the backup location on the right and paste it in the “Archive” folder on the left. The result would be a fully restored version of the “CommonLibs” repository from the time the last backup ran.

The Backup location is a mirror of your Repository location
Once you have restored your repository you can bring the Subversion service back online. It is also a good idea to reset IIS (open a command prompt and type “iisreset”) to ensure that the Sublime cache is cleared.
If you are new to Subversion it may not be clear exactly what constitutes a repository. In short, a repository consists of a folder containing a number of specific sub-folders and files. So when we say “repository” we are talking about the parent folder and all child folders and files.
You can identify the repository parent folder by looking at its children. A repository will contain the following child folders: conf, db, hooks, locks. It will also contain a file called “format” and there may or may not be a README.txt. In the following screen shot, we are looking at the content of “CommonLib” You can see that it contains these folders, thus “CommonLib” is a repository. The parent folder “Archive” is not – it’s merely a folder.

Identifying a repository folder
Repository Templates are a great way to reduce the time required for setting up a new project, and encourage consistency across projects. Consistency is important especially in an organization with many different repositories spread over different projects and development teams. Having a consistent repository structure drastically reduces common errors made by new developers or even experienced developers in an unfamiliar repository.
Setting up Repository Templates in Sublime is as easy as creating a folder structure on your Sublime server containing the files and folders you want to include in your new project. In this walk-through we’re going to create a Repository Template for new projects using . Sharp Architecture is a perfect candidate for a Repository Template because there are quite a few dependencies that can take a while to download and organize.
In the following steps we’ll be creating a Repository Template for Sharp Architecture, but the same steps can be applied to any number of project types you may have.
The first step is to create the new Repository Template folder on your Sublime/Subversion server.

Create a new folder for the template

Create the branches, tags, and trunk folder

Create the project folder structure
Now that our basic structure has been created, it’s time to download the related Sharp Architecture binaries as well as their dependencies.

Copy Sharp Architecture binaries to template
The last step is to register the newly created Repository Template with Sublime.
[SharpArch]
name = Sharp Architecture
description = Use for Sharp Architecture based projects.

Insert new template description into templates.txt
C:\> iisresetOpen a web browser and navigate to Sublime. Click on the Create New Repository tab and in the Template section, you should see the new “Sharp Architecture” template.

Preview the new template
In this walkthrough we’ve created a new Repository template for projects using the Sharp Architecture framework. We created a folder structure and pre-downloaded all binaries and their dependencies so that new repositories would automatically have this structure and these resources. This same approach could be taken for any number of project types relevant to your organization.
Using these same techniques you could make your template more robust including common resources such as:
For additional information and complete documentation on creating Repository Templates, please see the Sublime documentation.
This article summarizes a few tips and tricks for working with Subversion from the Visual Studio IDE. Note that these tips assume that you are using TortoiseSVN as your SVN client. However, they should hold up whether you are using an SVN client integrated with Visual Studio or simply the command line.
One of the first things you should do with any new solution or project is to ignore the bin and obj folders that are automatically created when you compile your project. Here are the steps I follow when adding a new project to your solution:
These files pop up from time to time and you want to watch out for them. These files are specific to each user, so if they get committed, everyone will be continuously prompted to resolve conflicts because their version differs from the version in Subversion.
I’m going to catch a lot of flack for this one because it seems like a pain. But it’s really not that hard and it will help you avoid making multiple commits for a single change because .csproj or .sln files hadn’t been saved yet. For example, let’s say you add a new .cs file to your project. You code it up and are ready to commit. Switching over to TortoiseSVN you see your new .cs file needs to be committed, but nothing else. You commit that file and keep working. However, the .csproj file has been changed to, but it has only been changed in memory and not saved to disk so TortoiseSVN doesn’t see the change. You are now left in a position where only the new .cs file has been committed, and the .csproj file hasn’t. Ideally both files would be committed at the same time because together they represent the addition of your new .cs file.
My workflow is this:
This one is easy to overlook especially when it comes to ASP.NET projects. Subversion creates a hidden .svn folder inside each folder of your working directory. If your deployment “process” consists of copying your ASP.NET project folder and all sub folders (images, css, etc) and pasting them on your web server, you’re going to be copying all of those .svn folders along with it.
There are really two options to avoid this. The first is to use the “export” command from Subversion. If you are comfortable installing the Subversion command line client on your target server, then you can run a command like this to deploy your changes:
C:\> svn export svn://myserver/myrepo/trunk C:\inetpub\wwwroot\mywebsite
Once you have done that you’ll also need to copy over the DLLs because the bin folder won’t be included in the repository (assuming you followed tip #1).
A better solution is to use some sort of continuous integration or automated build process. Cruise Control.NET is a great solution for this sort of thing.
The Subversion team the release of Subversion 1.6.5 today. This is mostly a bugfix release based on the .
Here are the changes between 1.6.5 and 1.6.4.
User-visible changes:
Developer-visible changes: