Fix tabs in source (fossil support)

This commit is contained in:
Olivier Mengué 2013-12-04 22:54:03 +01:00
parent 83266cd6a5
commit c5b1c3d705

View File

@ -967,45 +967,45 @@ _lp_fossil_branch_color()
local C2E # Modified files (added or edited) local C2E # Modified files (added or edited)
local C2D # Deleted files local C2D # Deleted files
local C2A # Extras files local C2A # Extras files
local C2AA # Added files local C2AA # Added files
local PLUSLINE # Added lines local PLUSLINE # Added lines
local MINUSLINE # Deleted lines local MINUSLINE # Deleted lines
local ret local ret
C2E=$(fossil changes | wc -l) C2E=$(fossil changes | wc -l)
C2A=$(fossil extras | wc -l) C2A=$(fossil extras | wc -l)
PLUSLINE=$(fossil diff | egrep '^\+[^+].+$' | wc -l) PLUSLINE=$(fossil diff | egrep '^\+[^+].+$' | wc -l)
MINUSLINE=$(fossil diff | egrep '^-[^-].+$' | wc -l) MINUSLINE=$(fossil diff | egrep '^-[^-].+$' | wc -l)
ret="" ret=""
C2AA=`fossil changes | grep ADDED | wc -l` C2AA=`fossil changes | grep ADDED | wc -l`
if [[ $C2AA -gt 0 ]] ; then if [[ $C2AA -gt 0 ]] ; then
# We count the line "à la" git # We count the line "à la" git
local ADDFILE local ADDFILE
local FILE local FILE
ADDFILE=`fossil changes | grep ADDED | sed -e 's/\s\{2,\}/ /g' | cut -d" " -f2` ADDFILE=`fossil changes | grep ADDED | sed -e 's/\s\{2,\}/ /g' | cut -d" " -f2`
for FILE in $ADDFILE ; do for FILE in $ADDFILE ; do
PLULI=$(wc -l $FILE | cut -d" " -f1) PLULI=$(wc -l $FILE | cut -d" " -f1)
let PLUSLINE=$PLUSLINE+$PLULI let PLUSLINE=$PLUSLINE+$PLULI
done done
fi fi
if [[ $PLUSLINE -gt 0 ]] ; then if [[ $PLUSLINE -gt 0 ]] ; then
ret+="+$PLUSLINE" ret+="+$PLUSLINE"
fi fi
C2D=`fossil changes | grep DELETED | wc -l` C2D=`fossil changes | grep DELETED | wc -l`
if [[ $C2D -gt 0 ]] ; then if [[ $C2D -gt 0 ]] ; then
# We count the line "à la" git # We count the line "à la" git
local DELFILE local DELFILE
local FILE local FILE
DELFILE=`fossil changes | grep DELETED | sed -e 's/\s\{2,\}/ /g' | cut -d" " -f2` DELFILE=`fossil changes | grep DELETED | sed -e 's/\s\{2,\}/ /g' | cut -d" " -f2`
for FILE in $DELFILE ; do for FILE in $DELFILE ; do
MINLI=$(wc -l $FILE | cut -d" " -f1) MINLI=$(wc -l $FILE | cut -d" " -f1)
let MINUSLINE=$MINUSLINE+$MINLI let MINUSLINE=$MINUSLINE+$MINLI
done done
fi fi
if [[ $MINUSLINE -gt 0 ]] ; then if [[ $MINUSLINE -gt 0 ]] ; then
if [[ "$ret" = "" ]] ; then if [[ "$ret" = "" ]] ; then
ret+="-$MINUSLINE" ret+="-$MINUSLINE"
else else