# HG changeset patch # User Augie Fackler # Date 1352759346 21600 # Node ID 901e8517451399062fc18cff88ef83f69186ff1c # Parent 6be920ed2fe4eb8ad7dfbc32a1cfcdf06acffc30 rps1: show hg bookmark (if any) in rps1 instead of current branch diff --git a/.shell.d/50.vcs_functions.sh b/.shell.d/50.vcs_functions.sh --- a/.shell.d/50.vcs_functions.sh +++ b/.shell.d/50.vcs_functions.sh @@ -127,9 +127,14 @@ function vcs_current_branch() { fi hg branch 2> /dev/null > /dev/null if [ $? = 0 ] ; then + local bm=$(hg book | egrep ' \* ' | awk '{print $2}') local br=`hg branch | head -c 10` local rid=`hg parents --template '{node}\n' | head -n 1 | head -c 7` - echo "$br $rid" + if [ -z "$bm" ] ; then + echo "$br $rid" + else + echo "$bm $rid" + fi return 0 fi return 1