comparison .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
comparison
equal deleted inserted replaced
253:93b24cdd2cce 254:b14e669b98bf
126 return 0 126 return 0
127 fi 127 fi
128 hg branch 2> /dev/null > /dev/null 128 hg branch 2> /dev/null > /dev/null
129 if [ $? = 0 ] ; then 129 if [ $? = 0 ] ; then
130 local br=`hg branch | head -c 10` 130 local br=`hg branch | head -c 10`
131 local rid=`hg parents | head -n 1 | awk '{print $2}' | head -c 7` 131 local rid=`hg parents --template '{node}\n' | head -n 1 | head -c 7`
132 echo "$br $rid" 132 echo "$br $rid"
133 return 0 133 return 0
134 fi 134 fi
135 return 1 135 return 1
136 } 136 }