Git ships with a tiny utility __git_ps1 that displays your current branch in your bash prompt. For Mercurial is a similiar project on Bitbucket available, however it's slow. In fact; it's so slow, you can't work with your shell anymore.
Jannis pointed me to another project called vcprompt which is written in C and currently supports Git and Mercurial. And it's as nearly fast as the __git_ps1 utility. :-)