Mercurial > dotfiles
diff .shell.d/50.vcs_functions.sh @ 254:b14e669b98bf
vcs_current_branch: use 'hg parents --template' instead of just 'hg parents'
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Thu, 05 May 2011 11:00:37 -0500 |
parents | da06f9fd5016 |
children | 3350b219b653 |
line wrap: on
line diff
--- 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