Subversion

A 13-post collection

Continuous project statistics with StatSVN and TeamCity

Yesterday I wrote about Continuous code quality measurement with NDepend and TeamCity where I looked at nightly builds that assessed code quality using the very excellent NDepend. These reports are great and it’s easy to configure but you need to make both a dollar investment in the software and an education investment to really understand the metrics and how they relate to code quality. What’s nice about StatSVN is that it’s free and it doesn’t take a lot of thinking to use it. Rather than analysing your codebase, like NDepend, StatSVN analyses your Subversion repository and reports on how your app has changed over time. In a way, it’s kind...

Defeating Red Gate’s SQL Source Control insensitivity

I’m a big fan of Red Gate’s SQL Source Control, I really am. I raved about it earlier in the year and I still think it’s the best solution going for getting your databases under source control with Subversion.However, I’ve hit a glitch which unless I’m wrong, appears to be a bit of a design flaw; versioning changes in case. Let’s say I have a table, creatively named “MyTable”, and an equally creatively named column called “MyColumID”. It looks just like this:It’s all happily versioned under source control as indicated by the friendly green database:Now let’s say...

You're deploying it wrong! TeamCity, Subversion & Web Deploy part 5: Web Deploy with TeamCity

<< Part 4: Continuous builds with TeamCity In the first four parts of this series we got config transforms playing nice, command line builds and packaging ticking along, Web Deploy happily receiving our application and TeamCity continuously building the entire solution on every commit. The last thing to do is to harmonise everything so that we can actually automate the deployment. Breaking down the build and deploy processes First up, we’re now only focussed on the web application. If there are other projects in the solution on which the web app is not dependent, they’re not going to play a role in this post. It’s now all about building, packaging and deploying the...

You're deploying it wrong! TeamCity, Subversion & Web Deploy part 4: Continuous builds with TeamCity

<< Part 3: Publishing with Web Deploy Part 5: Web Deploy with TeamCity >> Over the last three posts in this series, we got to the point where all the Microsoft bits are working really nicely together. Config transforms, packaging and Web Deploy are great stable mates in the world of web application deployment.The bit that’s missing though is automation. Actually there are several bits missing but automation is the common solution. Deployment by developers directly from Visual Studio or command line with MSDeploy works fine most of the time but has a few flaws we’re simply not going to be able to overcome without a build and deployment server. In all likelihood,...

You're deploying it wrong! TeamCity, Subversion & Web Deploy part 3: Publishing with Web Deploy

<< Part 2: MSBuild and deployable packages Part 4: Continuous builds with TeamCity >> In the first two parts of this series we got config transforms working and the web app successfully bundled into a nice self-contained deployable package. Next up: get the thing to publish. For the most part, the vast majority of web app deployment has historically been done by pushing the entire site out over either UNC or FTP, a practice which has a series of fundamental shortcomings that set deployment up for potential failure. To begin with, by default neither protocol is encrypted. Yes, there’s SFTP and FTPS but it’s not often you see these applied, particularly not as a...

You're deploying it wrong! TeamCity, Subversion & Web Deploy part 2: MSBuild and deployable packages

<< Part 1: Config transforms Part 3: Publishing with Web Deploy >> In the first part of the series we looked at config transforms and how we’ve moved on from the bad old days of manual Web.config configuration at release time. Now let’s take a look at how we can incorporate this into a nice clean deployable package with the rest of the application. Many people, me included at one stage, have only ever been familiar with the concept of .NET compilation as a result of building within Visual Studio. Keep in mind though that Visual Studio is no more than an IDE. Ok, it’s a particularly good IDE but it...

You're deploying it wrong! TeamCity, Subversion & Web Deploy part 1: Config transforms

  Part 2: MSBuild and deployable packages >> If you publish a web application using CTRL-C and CTRL-V, you’re deploying it wrong. If you manually run an Xcopy command, you’re deploying it wrong. If you use an FTP client to move your files to a remote server, you’re deploying it wrong. If not everyone is following exactly the same release process, you’re deploying it wrong. If publishing involves any manual handling of Web.config, you’re deploying it wrong. This might seem a little sensationalist but after Scott Hanselman set a high “doing it wrong” bar in his excellent Web Deployment Made Awesome: If You're Using...

Rocking your SQL Source Control world with Red Gate

I knew it was going to be good before even seeing it. After all, SQL Source Control is from the guys who brought us SQL Compare and Data compare, two of my all-time favourite tools in the “stuff that would be a real pain to do without” category. They’re tools I tend to berate developers for not having and have regularly waxed lyrical about in the past, albeit it within 140 characters; until now.Versioning database objects very much fits into the same realm in that it’s a nightmare to do without a dedicated tool. The simplicity with which we version other applications files – HTML, images, classes, etc – hasn’t been...

Subversion’s mysterious malformed or missing path

I hit a couple of little hurdles with Subversion this week which I thought I’d share simply because I couldn’t find much public information about it and it was only through trial and error it got resolved. The context was I was adding an externals to a project from another repository and there were two little barriers that threw a spanner into the works. For the sake of simplicity, here’s a recreation of the scenario: The first problem is that whilst there are spaces in the repository path, we’re not going anywhere because the space character is used to delimit the path from the target folder. What we’ll get is...

Creating Subversion pre-commit hooks in .NET

A while back I wrote about Creating your own custom Subversion management layer which involved rolling your own UI in .NET to perform common management tasks in SVN such as provisioning a repository or managing permissions. This is a great way of quickly and easily giving users a self-service mechanism for managing their own repositories in a controlled, secure fashion.Continuing the theme of customising SVN to do your bidding I thought I’d share some info on commit hooks. There are a heap of examples out there in Python and Perl but not much in the .NET realm so hopefully this will make someone’s life a little easier.As with the previous blog post, all the...