# HG changeset patch # User Augie Fackler # Date 1228269218 21600 # Node ID b4bfce76123fafab588346fd6f57bb114629e616 # Parent a6581f7a5b1a6333bad6cd5f16c4944da3047ab4 Reorder these checks. With my home being in hg, it was winning over any other checkouts. Now look for hg last. diff --git a/.zsh/50.vcs_functions.zsh b/.zsh/50.vcs_functions.zsh --- a/.zsh/50.vcs_functions.zsh +++ b/.zsh/50.vcs_functions.zsh @@ -67,14 +67,7 @@ function update_source_trees() { } 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` - echo "$br $rid" - return 0 - fi - git branch 2> /dev/null > /dev/null + git branch 2> /dev/null > /dev/null if [ $? = 0 ] ; then git branch --verbose | grep '^*' | sed 's/* //;s/ /:/;s/ .*//;s/:/ /' return 0 @@ -99,6 +92,13 @@ function vcs_current_branch() { echo $br $rev return 0 fi + 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` + echo "$br $rid" + return 0 + fi return 1 }