G’Day and Welcome!

G’Day and welcome to Stuff the Box!

Here you will read about opinions of tech news, opinions on bass guitar gear, personal tid-bits and whatever else I feel like writing (complaining/ranting) about.
Feel free to comment to your hearts content…I only ask that you keep it civil and in good taste.

N.B. No trolls! Comments are moderated and trolling comments will be denied and the trolls will be condemned to a place worse than Hell!
You have been warned…

Coffee Buzz 1.2

Coffee Buzz 1.2 is out!

Just a sniff of an update really:

  • Changed behaviour if you try to run more than one copy of Coffee Buzz on the same computer when logged in as the same user
    • Before, each time you tried to run a new copy when one was running, the new copy would just exit leaving the running version untouched. Now, it will tell the running version to Buzz! the machine :D
  • Fixed a consistency problem with the menu aware click-behaviour of the Notification Tray icon left-click

So, the new version is right here if you want it; as always, any issues please get in touch!

Tagged , , , , , , , , , , , ,

pain => pain = hg.Convert(svn.RepoOrWc(“Doesn’t matter, it was all painful …”))

WARNING I swear a little in this post; if you don’t like swear words, move along …

So I decided to take the plunge and convert my personal/private SVN repository to a Mercurial (HG) repository.

My reasons for doing this are varied:

  • I have been wanting to play with DVCS for a while
  • I don’t like Git
  • Mercurial appears to have matured somewhat over the last couple of years and seems very extensible and powerful
  • Assembla, the SVN repository hosting service that I have been using, has been getting more and more annoying

At work we use a lot of Atlassion products, and so I have been looking at Bitbucket as a host for my HG repository. A lot of developers I respect use it and like it, and it is free with unlimited private repositories and up to 5 users.

So the first thing I did was create an account on Bitbucket, which seemed painless and simple. As part of the account creation process, you can create your first repository1, which I did. Once the repository was created and I had customised it a little, I set out to import/convert/migrate my existing SVN repository to Bitbucket …

This is where the rant will begin …

Shit a brick!?! What a painful process!?!
Seriously …

I am still frustratingly fuming!

I had saved a few articles to my Instapaper queue some time back when I first thought about doing this which documented how to migrate a SVN repository to a HG repository, but when it came time to follow them, they didn’t work!
There were different errors, assumptions that were not documented, and other shit-fights.

So, I am going to document what I had to do to get it to work.

Firstly, some assumptions:

  • You know how to use a command line; most of the commands here will be from the command line
  • Have TortoiseSVN installed and ensure that you selected the CLi tools as part of the install process; if you didn’t, rerun the installer and install them!
  • Install TortoiseHG and make sure that you install the CLi tools too
    • As an aside, TortoiseHG is pretty good :P

Now, the process

I needed to create a local copy/backup of my online SVN repository as the hg convert process hated my checked out working copy. To do this, I had to perform the following:

  1. svnadmin create PATH_FOR_LOCAL_REPO
    • i.e. svnadmin create C:\Repositories\SVN\repo
    • This creates an empty SVN repository with folder structure, etc.
  2. Echo Exit 0 > PATH_OF_LOCAL_REPO\hooks\pre-revprop-change.bat
    • i.e. Echo Exit 0 > C:\Repositories\SVN\repo\hooks\pre-revprop-change.bat
    • For some stupid reason, if this doesn’t exist, it borks out … if someone can explain why this is required, please let me know!
  3. svnsync init file:///PATH_OF_LOCAL_REPO URL_OF_REMOTE_REPO
    • i.e. svnsync init file:///C:\Repositories\SVN\repo https://subversion.assembla.com/svn/repo/
    • This will initialise the [blank] local repository to replicate the remote one in full.
    • Yes, the file:/// is required because svnsync is stoopid.
  4. svnsync sync file:///PATH_OF_LOCAL_REPO
    • i.e. svnsync sync file:///C:\Repositories\SVN\repo
    • This will cause a full synchronisation from the remote repository to the local.

So now, I have a local SVN repository that is a direct mirror of the remote one! When viewing it this way, it doesn’t seem so bad, but getting to this point took WAY too long :(

Anyhoo, now that I have the local repository, I can convert it!

  1. hg --config config.svn.trunk= convert -s svn PATH_OF_LOCAL_SVN_REPO PATH_FOR_HG_REPO
    • i.e. hg --config config.svn.trunk= convert -s svn C:\Repositories\SVN\repo C:\Repositories\HG\repo
    • The --config config.svn.trunk= was required for my conversion as my SVN repository was not configured with the trunk, branch, etc directory structure but was more configured as standard directory tree. This option tells HG to treat the root as the trunk.
    • This will convert the SVN repository into a new HG repository with all metadata, versions and history … but no files!
    • i.e. CD C:\Repositories\HG\repo
  3. hg up
    • This will make HG update the repository location with all of the file data that is stored in the converted repository .hg folder.

And just like that, I now have a fully mirrored HG repository!!!

Now I need to configure TortoiseHG so that pull/push commands can default to my Bitbucket repository. Because HG is a DVCS, there are no working copies of the repository that are checked out, but instead every copy is also a full repository. So, to get my local repository into Bitbucket, all I need to do is push it up.

Here’s one of the big kickers that got me: logon and check the Bitbucket repository URL; does it end in .git? If so, delete the repository and create a new one. This caused me to piss fart around for well over an hour trying things, reading support docs, searching online, and other stuff to get working as there was no indication that the repo was not dual function. When you create the first repository when also creating your account, it will default to Git without any ability to change (at least, it did for me!). Once you create a new repository, and ensure that you specify the repository be configured for Mercurial, you can configure TortoiseHG pull/push defaults:

  1. Navigate to the HG repository, right-click and select Hg Workbench
  2. Right-click the repository in the left-hand repository tree and select Settings
  3. When viewing the TortoiseHg Settings dialog, click the Edit File button near the top
  4. In the configuration file editor dialog, add the following lines:

default-push = URL_OF_REMOTE_HG_REPO

  1. Once complete, click Save to the configuration file editor dialog and then click OK to the TortoiseHg Settings dialog
  2. A push should be able to be performed now and should default to the configured URL and populate the Bitbucket repository!

And just like that, the SVN repository, including all history and whatnot, should be converted to HG and in Bitbucket. As simple as that! :P

  1. Yeah, this will be covered later as to why this was a PITA and needs to be handled by Bitbucket better! 
Tagged , , , , , , , , , ,

Method Load Order for a .NET Outlook Addin

I have been creating a .NET Outlook addin lately1 and it has been an incredible learning journey. I have had to support 3 generations of Outlook, using the base bottom COM feature/API set (oldest supported; 2007), and have still had to stay within the speed requirements of the latest supported (2013) :-/

One thing that perplexed me was how I could hook in, early enough, to the addin load/startup process to subscribe to the AppDomain.UnHandledException and Application.ThreadException event handlers so that I can log exceptions. This is desired because Outlook is so damned efficient that it decides to kill an addin as soon as it exhibits signs of an unhandled exception.

The Hunt

Continue reading

Tagged , , , , , , , ,

Desktop UI Testing Without Running the Build? No Way?!

This is a post that I originally wrote on the Microsoft Development Team’s Brain Dump blog at work the other day, and thought I’d share it my non-work viewers too

So, it turns out that you can test WinFroms (and WPF) UI controls from within LINQPad!1

First save and build your project so that you have an/the assembly (*.exe, *.dll). Once you have a build, fire up LINQPad and right click on the query tab and select Advanced Properties. On the Additional References tab select Add and then Browse. Find the assembly that you did a build of and click OK; add any other necessary assemblies, i.e. System.PresentationFramework.dll, System.Windows.Forms.dll, System.Xaml.dll, etc. Once you have all of your assemblies added, switch to the Additional Namespace Imports tab and click Pick from assemblies and select the appropriate namespaces from all the assemblies that you need; this is what will give you IntelliSense.

Once you have done the above, you can close the Advanced Properties window and change the Language to C# Program (or VB Program … if you like pain ;P). Now you can create a new instance2 of your WinForms/WPF window and test3 out the UI without executing your app! You could even use LINQPad as a way of doing some Unit Tests or some such if you were really inclined …

Happy testing and debugging!

  1. I discovered this awesome feature by stumbling across this post by Matthew MacSuga; I have however documented my method of testing WinForms UI and confirming WPF support 
  2. Beware class/constructor access; if you have your class, constructor/s or other methods set to internal instead of public, you will not be able to create a new instance of your UI :( 
  3. Make sure that you set .ShowInTaskbar = true to ensure that you have a hook to kill the window if something goes wrong; especially if you are using .ShowDialog() to display it 
Tagged , , , , , , , , ,

Sold: Hartke HA3500 Bass Amp + Hartke 4.5XL Bass Cabinet – AU$600 Neg.

Update: the amp has been sold! A nice young guy, still in school, came ’round to try it out as he is in a band and wanted to upgrade his gear. He was incredibly talented and I am so happy that this amp kit has gone to someone who will look after it and use it. Continue reading

Tagged , , , , , , ,

Coffee Buzz 1.1

Coffee Buzz 1.1 is here!
It has been a fun holiday working on some different personal projects, and this was one of them :)

Since initially creating Coffee Buzz, I have learnt a lot [more] about Object Orientated Programming, and the language C#; so for this release there is quite a lot of refactoring, performance improvements, better memory management and a few little features/changes.

The main features additions/changes are:

  • Added the ability to disable balloon tips
    • Shift+Click the Icon to access the new setting
  • Added menu header to easily identify current version
  • Added menu aware click-behaviour of the Notification Tray icon left-click
  • Altered left-click behaviour when clicking the Notification Tray icon to allow for double click before presenting the menu; right-click behaviour unchanged
  • Added error log saving and notification for easier support in the rare case of issue
  • Rearranged menu item placement for the addition of the header and moved the About menu item to above Quit

You can get the new version here; and of course, any issues please don’t hesitate to get in touch :)

Tagged , , , , , , ,

EnumInstalledApp – Query the Registry Uninstall Key

Ever wanted to quickly find out what application is listed in the registry’s Uninstall key? Wanted to know what sub-key name it has and what version is recorded?

EnumInstalledApp is the CLi utility for you! Continue reading

Tagged , , , , , ,

Praying the Rosary

I start the prayer;
already a feeling of disconnect …
I pray the first decade;
why this feeling of hollowness to my words and intentions?
I pray a second decade;
for you God, and for myself, I try to mean every word I say …
I pray the third decade;
the yawning starts, I struggle to focus …
I pray the fourth decade;
God, give me strength to give my all to you …
I pray the fifth decade;
I love you Lord, I really do!

Tagged , , ,


I hate starting things and then not finishing them.
Some things work great when treated as an always incomplete project1; but, for the most part, I hate the practice.

I managed to not only start, but complete two personal projects: Coffee Buzz and PromoteNTA. This was an amazing feeling to complete and release them!

When developing them, I signed up for an account with Assembla and created a private SVN2 repository so that I can commit to and track changes and progress. I was using the commit messages to keep track of items to-do; sadly this wasn’t ideal.
I have recently upgraded the account to include ticketing features. This now allows me to create tasks against the different little projects that I am committing so that I can easily see what is left to do and how close to release I am.

With these new features in Assembla active, I have embarked on:

Hopefully, by setting up the ticketing support, this blog post and other factors, it may help keep me on track and complete these projects!

Time will tell … ;P

  1. Like this blog … 
  2. There are many different types of version control; I use SVN as I like the centralized model and find it very powerful. I have also been looking into Mercurial but haven’t set aside the time to tinker yet. 
Tagged , , , , , ,

Get every new post delivered to your Inbox.

Join 82 other followers