cookutils rev 80

Fix: hg log parsing
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 08 00:24:38 2011 +0200 (2011-05-08)
parents 246abb0e12d9
children 5d21241ca811
files cooker
line diff
     1.1 --- a/cooker	Sun May 08 00:09:36 2011 +0200
     1.2 +++ b/cooker	Sun May 08 00:24:38 2011 +0200
     1.3 @@ -325,11 +325,10 @@
     1.4  		rev="$2"
     1.5  		[ "$rev" ] || exit 0
     1.6  		cd $wok
     1.7 -		log=$(hg log --rev=$rev --template "{files}\n" | cut -d "/" -f 1)
     1.8  		rm -f $cooklist && touch $cooklist
     1.9 -		for pkg in $log
    1.10 +		for pkg in $(hg log --rev=$rev --template "{files}")
    1.11  		do
    1.12 -			echo "$pkg" >> $cooklist
    1.13 +			echo "$pkg" | cut -d "/" -f 1 >> $cooklist
    1.14  		done
    1.15  		strip_blocked
    1.16  		cook_order | tee $LOGS/cookorder.log
    1.17 @@ -389,16 +388,15 @@
    1.18  		cd ${wok}-hg
    1.19  		cur=$(($cur + 1))
    1.20  		commits_summary | log_commits
    1.21 -		
    1.22  		rm -f $commits.tmp && touch $commits.tmp
    1.23 -		for rev in $(seq $cur $new); do
    1.24 -			#log=$(hg log --rev=$rev --template "{files}\t{desc}\n")
    1.25 -			log=$(hg log --rev=$rev --template "{files}\n" | cut -d "/" -f 1)
    1.26 -			
    1.27 -			for file in $log; do
    1.28 +		for rev in $(seq $cur $new)
    1.29 +		do
    1.30 +			for file in $(hg log --rev=$rev --template "{files}")
    1.31 +			do
    1.32 +				pkg=$(echo $file | cut -d "/" -f 1)
    1.33  				desc=$(hg log --rev=$rev --template "{desc}" $file)
    1.34 -				echo "Commited         : $file - $desc" | log_commits
    1.35 -				echo $file >> $commits.tmp
    1.36 +				echo "Commited         : $pkg - $desc" | log_commits
    1.37 +				echo $pkg >> $commits.tmp
    1.38  			done
    1.39  		done
    1.40