# HG changeset patch # User Augie Fackler # Date 1304611237 18000 # Node ID b14e669b98bff84dc3bc8aa6c63ab2334fca4d2d # Parent 93b24cdd2cce9b92bd590f2e9fa1fda2969f5554 vcs_current_branch: use 'hg parents --template' instead of just 'hg parents' 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 @@ -128,7 +128,7 @@ function vcs_current_branch() { hg branch 2> /dev/null > /dev/null if [ $? = 0 ] ; then local br=`hg branch | head -c 10` - local rid=`hg parents | head -n 1 | awk '{print $2}' | head -c 7` + local rid=`hg parents --template '{node}\n' | head -n 1 | head -c 7` echo "$br $rid" return 0 fi