changeset 216:3c87de482011

tools: fixes for wc outputting with spaces.
author Augie Fackler <durin42@gmail.com>
date Sat, 28 Mar 2009 14:26:35 -0500
parents b5ef9a404f5d
children 6eb691a163cd
files tools/common.sh tools/verify-all-heads.sh
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tools/common.sh
+++ b/tools/common.sh
@@ -9,7 +9,7 @@ function verify_current_revision()
         echo 'export failed!'
         return 255
     fi
-    if [[ "`hg st | wc -l`" == "0" ]] ; then
+    if [[ "`hg st | wc -l | python -c 'import sys; print sys.stdin.read().strip()'`" == "0" ]] ; then
         return 0
     else
         if [[ $1 != "keep" ]] ; then
--- a/tools/verify-all-heads.sh
+++ b/tools/verify-all-heads.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 . $(dirname $0)/common.sh
 
-for b in `hg branches | cut -f 1 -d ' '` ; do
+for b in `hg branches -a | cut -f 1 -d ' ' | grep -v closed-branches` ; do
     hg co $b || break
     echo Verifying $b
     verify_current_revision keep > /dev/null || break