From c7fcf206480046d4cc9e0f031ea9826b91a0adbf Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 8 Jun 2011 10:20:04 -1000 Subject: [PATCH] Updated scm function to include `hg root` to check for Mercurial Removed scm function from hawaii50.theme.bash --- themes/base.theme.bash | 1 + themes/hawaii50/hawaii50.theme.bash | 10 ---------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/themes/base.theme.bash b/themes/base.theme.bash index 7087662..948427a 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -24,6 +24,7 @@ function scm { if [[ -d .git ]]; then SCM=$GIT elif [[ -n "$(git symbolic-ref HEAD 2> /dev/null)" ]]; then SCM=$GIT elif [[ -d .hg ]]; then SCM=$HG + elif [[ -n "$(hg root 2> /dev/null)" ]]; then SCM=$HG elif [[ -d .svn ]]; then SCM=$SVN else SCM='NONE' fi diff --git a/themes/hawaii50/hawaii50.theme.bash b/themes/hawaii50/hawaii50.theme.bash index ac3bb59..4fb8b1d 100644 --- a/themes/hawaii50/hawaii50.theme.bash +++ b/themes/hawaii50/hawaii50.theme.bash @@ -66,16 +66,6 @@ function ip { echo $(ifconfig en1 | grep "inet " | awk '{ print $2 }') } -# Override function scm -function scm { - if [[ -d .git ]]; then SCM=$GIT - elif [[ -n "$(git symbolic-ref HEAD 2> /dev/null)" ]]; then SCM=$GIT - elif [[ -n "$(hg summary 2> /dev/null)" ]]; then SCM=$HG - elif [[ -d .svn ]]; then SCM=$SVN - else SCM='NONE' - fi -} - # Displays the current virtualenv information function curr_virtualenv_info() { [ ! -z "$VIRTUAL_ENV" ] && echo "`basename $VIRTUAL_ENV`" -- 2.17.1