Warning: strpos(): needle is not a string or an integer in /customers/a/f/c/fjorden.se/httpd.www/joel/index.php on line 31 Warning: strpos(): needle is not a string or an integer in /customers/a/f/c/fjorden.se/httpd.www/joel/index.php on line 37 Warning: strpos(): needle is not a string or an integer in /customers/a/f/c/fjorden.se/httpd.www/joel/index.php on line 43 Blog by Joel Fjordn a.k.a. Will o Wisp
Temporarily Disable Push in Mercurial (Hg) 
Thursday, July 7, 2011, 07:26 AM - General
We use Mercurial and TeamCity as CI server and have been experiencing some problems lately when developers are pushing Hg change-sets to the server when a build is in progress. The problem is that TeamCity first pulls and updates before starting the build and then during the build some files are generated and/or updated, like help files and version files (but also the .hgtags file). Then as the final step in the build process when its time for TeamCity to commit and push the changes there will be a problem if a new push has been made since the start of the build process, i.e. we will get an error message like "push creates new remote heads".

One solution to this is of course to pull, update, merge (if needed) and commit, or the Hg Fetch extension, but what we really wanted was to somehow prevent developers to push change sets into the remote server repository during the build process of that specific project in TeamCity.

After quite a lot of research on Google, I still couldnt find any existing solution to this, so I started thinking about how we could manage this ourselves. The solution I came up with was to develop a very simple, but yet quite smart, REST service hosted on the same machine as the Hg repositories. The service exposes endpoints for EnablePush/DisablePush together with the name of the target repository. What the service implementation does is then to temporarily change the hgrc file in the repository to disable push, but not for everyone, since the automated build account used by TeamCity for Mercurial still needs Push access (allow_push = Mercurial). In order to enable Push again when the build is completed we then allow everyone with an account in the AD to Push again (allow_push = *).

In order to use the REST service from TeamCity I discovered a very useful plugin called tcWebHooks that allows HTTP POST on TeamCity events like build started and build completed. Here is a configuration example of tcWebHooks for enabling/disabling Hg Push for a specific project and repository using the custom made RIA service.

If youre interested in the service install package or source code, let me know and Ill send it to you!
1 comment ( 103 views )   |  related link

Sony Sucks When It Comes to Support and Guarantee for Playstation 3 
Wednesday, February 25, 2009, 11:41 AM - General
I write this to inform you all about my experiences with the horrible Sony support in Sweden. It all started when the blueray drive in my one year old PS3 (40 Gb) stopped reading blueray discs, games and movies. I then contacted the support in order to try to get it fixed, guarantee or no guarantee. After some phone calls, which by the way cost about 1$ per minute, and a lot of e-mails, I understood that they were not interested in trying to find a solution, and I was told that a simple diagnose would probably cost more than a new console. I know for sure what the problem is, so why not simply exchange the drive or let me buy it as a replacement part so that I could replace it myself?!

The problem with the blueray drive is so very common, that I really think Sony should extend the guarantee period for these units, or at least try to be a little more professional in handling these issues. If you google for this problem you will find hundreds of hits in forums and YouTube also has an insane number of videos where people show you how to try to fix it or exchange it.

This blog article, that describes my experiences with Sony in more detail, is unfortunately in Swedish, but I guess you can always use a translation tool if you're interested in reading more about it.
1 comment ( 12 views )   |  related link

DevConnections Is Coming Up 
Thursday, November 1, 2007, 06:17 PM - General
It's time for DevConnections, Las Vegas, in the next week, chaired by Juval Lwy and Carl Franklin. Juval Lwy, from IDesign, is the man behind the C# code standard used by Code Style Enforcer, as default rules.

I'm really looking forward to this conference and to Las Vegas of course. We are about eight people from here, coming from different companies, who are attending the conference. We're leaving this Saturday and will stay for a little over a week, so hopefullt we'll experience more than just the conference, e.g. Las Vegas night life, Grand Canyon, etc.

So if any of you are going there, we might bump in to each other :)!
1 comment ( 8 views )   |  related link

Custom Actions and Upgrade Installations Cause Problems 
Sunday, March 11, 2007, 06:21 PM - General
I ran into this problem when making an upgrade installation of Code Style Enforcer. The problem is that Code Style Enforcer uses custom install/uninstall actions in order to locate and ensure that the correct DXCore version is installed, among other things.

When doing an upgrade installation, the old custom actions assembly is first loaded, into the AppDomain, in order to call the uninstall method for the version currently installed. When its time for the Install method to be called in the new Custom Actions assembly, it still uses the old assembly since that is already loaded into the AppDomain. This has to do with how the Assembly.LoadFrom method works. This is really bad, not only since the new and perhaps updated Install method wont be called, but since the old one will execute instead.

Microsoft suggests signing the Custom Actions assembly with a strong name in order to solve the problem, but Ive tried that without any success. Another solution might be giving the assembly different names for each new installer version, but this seems like a really ugly solution to me.

For more information about this have a look at:
http://support.microsoft.com/kb/555184
http://support.microsoft.com/kb/906766

Im really not sure if this problem is entirely bound to setup projects in Visual Studio and the Uninstall and Install/Commit custom actions implemented as part of an Installer class. I will try to migrate my setup project to WiX instead and see if I can get it work as expected.

For the interested, the Windows Installer XML (WiX) is a toolset that builds Windows installation packages from XML source code. I will tell you more about it in another blog post.
3 comments ( 66 views )   |  related link

Attending Tech-Ed Barcelona 
Wednesday, November 1, 2006, 06:43 PM - General
On Saturday I am heading down to Barcelona for some vacation, but mainly for the Tech-Ed Developers Conference. I am really looking forward to attend some mind-blowing sessions, who knows maybe I will see some of you there...

When I get back in about two weeks from now, I hope there will be a new version of DXCore available, so that we can get the last few things in to the upcoming version of Code Style Enforcer.


Next