changeset 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 93b24cdd2cce
children 0f226b0af88a
files .shell.d/50.vcs_functions.sh
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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