Per our email discussion, I have updated the HG prompt code to use the '-ib' option to 'hg id' so the branch name is always available, regardless of the state of the working copy.
Third parties software & init script.