Kash Farooq's software development blog

.NET Developer

Bazaar or Git? Moving away from Subversion.

Posted by Kash Farooq on September 8, 2009

I’ve had enough of Subversion and decided to move to Bazaar. Click BZR in the Tag Clould to see my series of blog posts to help you do the same.

Do any of these Subversion complaints sound familiar?

  • You are randomly instructed that “you need to run update”. You then do an update – which takes ages to complete. And then, finally, you see that there were no changes that needed to be downloaded.
  • You are randomly instructed that “you need to run cleanup”.
  • You have huge merge problems. For example, you use ReSharper to rename a class, and some else has updated that class in the meantime. You then see the dreaded tree conflict error (shudder). Or even worse, you rename an entire namespace and folder (double shudder). Now you really are in for a world of pain.
  • Your merges tend to be more and more manual. You frequently have to use WinMerge because Subversion hasn’t got a clue.
  • You are often waiting around for Tortoise to update/check for modifications/anything.

I have a subversion repository on my USB pen drive. I get tree conflicts and merge problems with that, and I’m the only user!

The main problem is merging. Our team has to work on branches as we have different projects running concurrently, working on the same code base. We don’t know which project will be going live first, or even if the project will be released at all (they may get canned). So, we need an efficient merging process.

Merging has become so problematic that we’ve considering adding merging as a separate task for each MMF we implement – that’s how long it takes nowadays. We’ve even considered putting a “Work In Process” limit on particular pieces of code to make sure two unrelated MMFs don’t touch the same code.

[Can you tell that I am not happy with Subversion?]

So, I decided to try something else.

I was going to try Git. I downloaded binaries, documentation and guides. But then I read this article: Renaming is the killer app of distributed version control. And I agree, renaming is really, really important. We rename files all the time. We refactor.

Git doesn’t handle renames as a “first class operation” – renames are just a delete operation followed by an add operation. This is the same as Subversion. I assume Git handles it much better than Subversion, but I wanted a SCM that has it built in.

So, I decided to start using Bazaar: renames are a first class operation in Bazaar, and it also has “Intelligent Merging” to cope with your Dev Studio file moves or renames.

For a full feature list of a number of SCM systems see this source control comparison page.

So far, I’m happy:

  • It runs natively in windows (I didn’t really want to run a unix-type shell to get Git working).
  • It is easy to work with from the command line (I thought I’d miss Dev Studio integration, e.g. VisualSVN and Ankh, but I don’t).
  • I even decided not to install TortoiseBZR – you don’t need it. [Tortoise is one of the reasons I wanted to move away from Subversion so I didn't want to install the BZR equivalent.]
  • BZR comes with some GUI applets if you really need your GUIs. For example, there is a useful one for viewing change logs (command: “bzr qlog”)

To make the move, check out getting started with Bazaar source control.

About these ads

4 Responses to “Bazaar or Git? Moving away from Subversion.”

  1. Jakub Narebski said

    Actually Git does have ‘intelligent renames’ that can deal with file renames, but it deals with renames using rename detection, and not (like Bazaar is doing) rename tracking. Rename tracking, usually done using file-identifiers and directory-identifiers, has its disadvantages.

    Currently git might not handle (rare) case of new files created in renamed directory as expected, as it doesn’t have wholesame directory rename detection, but it isn’t something that cannot be done; there were some patches posted on git mailing list adding such feature.

    And git-blame can deal with movement and copying of contents across files, not only renaming files as a whole.

    • kashfarooq said

      Thanks for your comments.

      I did assume Git would handle renames and moves better than Subversion; I’ve just never used Git so couldn’t say exactly how it would handle the sort of renames/refactors I often do.
      My main driver was to get away from Subversion. I decided to start using Bazaar as it did everything I needed it to do – and so far, so good.
      I’m about to publish a blog post called “Renaming files with Bazaar” – it will be interesting to hear how Git would handle my examples.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: