# HG changeset patch # User Augie Fackler # Date 1441994222 14400 # Node ID 354d05616d6550b55541b8c16ec42e88a69ac324 # Parent 9e17f111c3d9d10d2bb6571e878f2c9a63381efb vcs_funcs: fix for when in no repo diff --git a/.shell.d/50.vcs_functions.sh b/.shell.d/50.vcs_functions.sh --- a/.shell.d/50.vcs_functions.sh +++ b/.shell.d/50.vcs_functions.sh @@ -125,7 +125,7 @@ function vcs_current_branch() { echo $br $rev return 0 fi - hginfo=$(hg log -r . -T'{if(activebookmark,"{activebookmark}","{branch}")} {shortest(node)}') + hginfo=$(hg log -r . -T'{if(activebookmark,"{activebookmark}","{branch}")} {shortest(node)}' 2>/dev/null) if [ $? = 0 ] ; then echo "$hginfo" return 0