SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Daniel Grunwald

Source Code Repository Migrated to GitHub

Last Saturday, we migrated our self-hosted Subversion repository to git and started using github for hosting.

As part of this change, the SharpDevelop repository was split up in three parts:

The SharpZipLib repository was migrated as well.

You only need the main repository to compile and extend the SharpDevelop code.

As part of this change, I also added a simple Git AddIn to SharpDevelop 4.0. It allows invoking the TortoiseGit commit dialog from the SharpDevelop project browser.

With the move from Subversion to git, we also had to change the way we handle version numbers. Git allows distributed development and encourages branching, so it impossible to assign a simple increasing number to commits.

So instead, we now calculate revision numbers based on the history: we count the number of commits between a known starting point and the current version. At least for the builds produced by our build server, this gives the illusion of an increasing revision number. Moreover, anyone checking out the same commit from git will calculate the same revision number. However, the numbers are not unique for builds created on different branches.

The counting is done using: git rev-list 6eceaaafce5ed9b45d19a1645b1b012675aac996..HEAD | wc -l (the hash is the known starting commit)

In fact, the numbers are now counting independently on each branch, synchronizing only when branches are merged into each other. For this reason, SharpDevelop now stores additional information about the commit it was built from:

  • Version number
  • Branch name (for feature branches)
  • Short commit hash

The same information is shown in the version info inside crash reports. Note that the branch name is included only for feature branches - the "master" branch and branches starting with a digit are considered version branches and will not be shown. The feature branch name will also be shown on the SharpDevelop splash screen.

For the purpose of looking up "which build corresponds to this commit" (or vice versa), we made our build server push this information into the git repository. For example, if you take a look at the commit b6f4ade7, you will see a "git note" at the end of the github page which says "Build 4.0.0.6500 on master successful".

Comments

 

darkcloud said:

Any reasons why you chose git over other DCVS?

September 1, 2010 8:42 AM
 

DanielGrunwald said:

I personally used git-svn for offline work on SharpDevelop for more than a year. In the last months, we saw several other open-source projects migrate to github (e.g. Mono.Cecil and Boo) and I liked the features provided by the github website.

When asking other SharpDevelop contributors, it turned out almost half of them were using git-svn.

We did take a look at mercurial, but I don't remember why we didn't go for that.

September 1, 2010 6:26 PM
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.