by ampatspell
in Code
Git has nice bash function for showing current branch and status in bash prompt. Here is the branch only version for Mercurial:

__hg_ps1 ()
{
if [ "$(hg root 2> /dev/null)" ]; then
printf "$1" "$(hg branch)"
fi
}
export PS1='\u:\w$(__hg_ps1 " (%s)\$ '
and PS1 version with colors:
export PS1='\u:\w$(__hg_ps1 " \[\033[1;31m\](%s)\[\033[0m\]")\$ '