X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=check_left;h=20601c836db0ef3518af5f71d7574352b8bd6a7e;hb=HEAD;hp=553bd90da6da6650e1ba64bb3c160c0b46808359;hpb=55cad98cc37f0c47a0e5c5e3d19e607578168f6c;p=next-scripts diff --git a/check_left b/check_left index 553bd90..20601c8 100755 --- a/check_left +++ b/check_left @@ -2,31 +2,46 @@ LOG_FILE="../left_over.log" -cp /dev/null $LOG_FILE +cp /dev/null "$LOG_FILE" -log() -{ - echo "$@" | tee -a $LOG_FILE -} +heads=$(awk -F '\t' '/^#/ {next;} $2=="branch" {next;} { printf("%s/%s ", $3, $5); }' ../etc/control) +prev_heads="" -heads=$(grep -v '^#' ../real_control | awk -F ' ' '$2=="quilt" { printf("quilt/%s ", $3); } $2=="git" { printf("%s/%s ", $3, $5); }') +total=0 for h in $heads; do - echo $h - mb=$(git merge-base origin/master $h) - rh=$(git rev-parse $h) - [ "$mb" = "$rh" ] && + base=origin/master + case "$h" in + akpm/*) + base=akpm/master-base + ;; + esac +# echo "$h" +# mb=$(git merge-base origin/master "$h") +# rh=$(git rev-parse "$h") +# [ "$mb" = "$rh" ] && +# continue + +# c=$(git rev-list --pretty='format:%m%H' --no-merges --left-right --cherry-pick origin/master..."$h" | sed -n 's/^>//p') +# c=$(git rev-list --no-merges origin/master.."$h") +# [ -z "$c" ] && +# continue + count=$(git rev-list --count --no-merges $prev_heads "$base".."$h") + [ "$count" == 0 ] && continue - c=$(git rev-list --pretty='format:%m%H' --no-merges --left-right --cherry-pick origin/master...$h | sed -n 's/^>//p') - [ -z "$c" ] && - continue - - log $h "$(echo $c | wc -w)" | tee -a $LOG_FILE - git shortlog --no-walk $c 2>&1 | tee -a $LOG_FILE + total=$(( $total + $count )) + echo | tee -a "$LOG_FILE" + echo "${h%%/*}" "$count" | tee -a "$LOG_FILE" + echo | tee -a "$LOG_FILE" +# git shortlog --no-walk "$c" 2>&1 | tee -a "$LOG_FILE" + git log --oneline --no-merges $prev_heads "$base".."$h" | tee -a "$LOG_FILE" # gitk stable..$h - + prev_heads="$prev_heads ^$h" done +echo | tee -a "$LOG_FILE" +echo "Total $total" + exit 0