changeset 368:354d05616d65

vcs_funcs: fix for when in no repo
author Augie Fackler <raf@durin42.com>
date Fri, 11 Sep 2015 13:57:02 -0400
parents 9e17f111c3d9
children 8b2a2f63e799
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
@@ -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