Mercurial > dotfiles
comparison .shell.d/50.vcs_functions.sh @ 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 | 51aaf8bcd6ec |
children | 980b3df541cd |
comparison
equal
deleted
inserted
replaced
367:9e17f111c3d9 | 368:354d05616d65 |
---|---|
123 }'` | 123 }'` |
124 local rev=`svn info | grep Revision | sed 's/.*: /r/'` | 124 local rev=`svn info | grep Revision | sed 's/.*: /r/'` |
125 echo $br $rev | 125 echo $br $rev |
126 return 0 | 126 return 0 |
127 fi | 127 fi |
128 hginfo=$(hg log -r . -T'{if(activebookmark,"{activebookmark}","{branch}")} {shortest(node)}') | 128 hginfo=$(hg log -r . -T'{if(activebookmark,"{activebookmark}","{branch}")} {shortest(node)}' 2>/dev/null) |
129 if [ $? = 0 ] ; then | 129 if [ $? = 0 ] ; then |
130 echo "$hginfo" | 130 echo "$hginfo" |
131 return 0 | 131 return 0 |
132 fi | 132 fi |
133 return 1 | 133 return 1 |