Migrating from CodePlex to GitHub

While I have a lot of respect for the work Microsoft have done with CodePlex, personally I think GitHub is fundamentally a much better platform for open source projects. The main reason being is that it is just so easy to get access to the code, make changes and do whatever you want while utilising the power of Git. I have a couple of projects on CodePlex, so I wondered how easy it would be to port them over to GitHub.

After creating a new repository on GitHub, you are given the option to import from a Subversion Repository. All you need to do is enter the public Subversion URL for your repository.

image

Thankfully, CodePlex allows you to access your source code via TFS and Subversion. To find the URL, simply go to the Source Code tab and click Connection Instructions. This will give you the project’s SVN URL to enter into Github.

image

After clicking next the experience isn’t great – there is no real feedback about what is going on which is unfortunate.  However, after a while I received an email saying the Import had been completed successfully. If it fails, it also will send you an email to let you know.

image

My GitHub repository now has all the source code from my CodePlex project.

image

Along with the code, it also has all the commits and history associated with the project which is pretty awesome!

image

In just a few clicks I was able to migrate from CodePlex and SVN to GitHub and Git.

If you didn’t want to use the UI, or it failed for some reason, GitHub have a great guide about how you can do this import manually.

Continuous Integration Builds for CodePlex Projects

As many of you might be aware, I maintain the IronEditor project on CodePlex.  I like CodePlex, I find the wiki and issue tracking to be useful, but I find the directory structure and searchablity of projects on the site to be most useful. However, the one thing which I wish it could offer, and this goes for Google Project Hosting as well, is a continuous integration server. I would like to know that after I have pushed my changes to CodePlex, that it does actually compile.

As I’ve posted before, I run TeamCity on my home machine as it is free and easy to configure. As TeamCity can connect to Team Foundation Server (what CodePlex runs under the covers), I decided I would just be able to connect to the CodePlex servers and threat it like any normal source control system.

Sadly, I was wrong. When I tried to connect, I found the following (extremely helpful) error:

image

If anyone knows the reason why this failed, please leave a comment.

However, all is not lost! CodePlex have created the SVNBridge, a small application which runs on your local machine, or in this case your CC server. This translates all SVN commands into TFS commands, the result is that you can connect to CodePlex using SVN clients, one of which is TeamCity!

Connecting TeamCity via SVNBridge to CodePlex

SVNBridge is a single executable. It lives in the system tray and listens for communications on a particular port, in my case 8081.

image

In order to connect to SVNBridge, and as such your CodePlex project you must use a particular URL.  The URL is your SVNBridgeAddress/YourCodePlexServer/YourProject

For example, IronEditor lives on tfs03.codeplex.com and in order for me to connect via the bridge my URL would be:

http://localhost:8081/tfs03.codeplex.com/IronEditor

With my setup, I simple wanted to be able to click run and TeamCity go off, download the latest code from TFS, build my solution and execute my unit tests again just to be sure I haven’t broken anything (or in my case simply forgot to upload the latest code changes).

In order to connect TeamCity to CodePlex, you simply need to use the Subversion VCS settings and point it at your SVNBridge. Below, are my settings for IronEditor. The username and password you need to use to connect are your website login details.

image

On TeamCity’s dashboard, I now have my new CodePlex build along with my local IronEditor build, both run the IronEditor.build MSBuild script, they just pull the sources from different locations. After I have pushed my changes to CodePlex, I manually click run, and off it goes. The reason I don’t have it manually checking is because it’s rare I push changes to codeplex and as such I’m happy to be in control of when it happens.

image

TeamCity is now happily talking to my CodePlex repository, building as and when asked. If you happen to have a spare server, or a windows home server, then you could run this setup from there, have it automatically check for modifications with all the developers on your project benefiting.

Technorati Tags: , , ,

Using CodePlex mailing list

Codeplex have recently added a new feature – mailing lists for the project.  This means you can use the discussion forumboard in the style of a mailing list. To join a ‘mailing list’ for a project, login to CodePlex and visit the Discussion tab for a project

image

Click get email notifications, you can then select how you would like the messages to be delivered. However, its a shame you can’t have a different project address and discussion address, I like to use Googlemail for all discussions as it has a much better interface but my private webmail for personal emails.

image

You have now signed up to the ‘mailing list’. To post a message, you send an email to @discussions.codeplex.com, where ProjectName is the name in the URL. For example IronEditor@discussions.codeplex.com

image

Your email message will then be placed on the discussion board. This actually took a while to appear, I don’t know if it was because I had only just created the project.

image

Very useful feature, means all discussions can happen in a central place without having to go to a separate service provider (Google Groups).

Documentation:
http://www.codeplex.com/CodePlex/Wiki/View.aspx?title=Mailing%20Lists&referringTitle=CodePlex%20Documentation

Technorati Tags: