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 couldn’t 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 you’re interested in the service install package or source code, let me know and I’ll send it to you!
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.
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 :)!
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 it’s 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 won’t 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 I’ve 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:
I’m 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.
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.