Within the last two weeks I messed up my Mercurial queue a couple of times. Working on several patches in parallel you will forget about the currently applied patch. Doing changes and refreshing the patch will overwrite the whole content of the wrong patch! That could be really bad. To circumvent such an action Jason Orendorff posted a nice solution which integrates the name of the top patch into your prompt. So it will like like:
The only thing you have to do is to enter the following entry into your .bashrc or .bash_profile:
PS1='\u@\h:\w[\[`hg qtop 2>/dev/null`\]]\$ '