comparison tools/common.sh @ 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 b1d2ea765516
children 52cc0982dfcd
comparison
equal deleted inserted replaced
215:b5ef9a404f5d 216:3c87de482011
7 if [[ "$x" != "0" ]] ; then 7 if [[ "$x" != "0" ]] ; then
8 echo $exportcmd 8 echo $exportcmd
9 echo 'export failed!' 9 echo 'export failed!'
10 return 255 10 return 255
11 fi 11 fi
12 if [[ "`hg st | wc -l`" == "0" ]] ; then 12 if [[ "`hg st | wc -l | python -c 'import sys; print sys.stdin.read().strip()'`" == "0" ]] ; then
13 return 0 13 return 0
14 else 14 else
15 if [[ $1 != "keep" ]] ; then 15 if [[ $1 != "keep" ]] ; then
16 revert_all_files 16 revert_all_files
17 fi 17 fi