Displaying the cwd's svn branch/trunk in your linux command prompt

Recently I’ve been delivering to and maintaining features in multiple
branches at work. For whatever reason I end up doing a lot of the work
and delivery from the command prompt; which means I end up either adding
the full path to my prompt or running pwd a lot. So I did a bit of
searching and found that someone had already done the hard
work
of displaying your current svn
trunk/branch in your prompt. I did end up changing the color and what’s
included in the prompt so for trunk svn repo’s it looks like

[sfortelny@sfortelny (trunk) pig ]$

and for a branch

[sfortelny@sfortelny (version2.3) pig ]$

The really nice thing about this bash prompt it that when you are not in
a svn directory it drops the svn label so you get.

[sfortelny@sfortelny log ]$

Here’s my updated prompt(PS1) from the script

PS1="[[33[1;34m]u[33[1;37m]@[33[1;32m]h[33[1;37m] ${BRANCH} [33[1;36m]W [33[0m]]${PROMPT_SYMBOL} "