]> git.ozlabs.org Git - next-scripts/blobdiff - check_left
move some config into my .kuprc
[next-scripts] / check_left
index 9c1a27b2aecd18ba9021a3a7b73c8ec964e59fcb..1e1a7493bad88640cb982899d7aae2395673802b 100755 (executable)
@@ -2,29 +2,38 @@
 
 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;} { printf("%s/%s ", $3, $5); }' ../etc/control)
 
-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
-       mb=$(git merge-base origin/master $h)
-       rh=$(git rev-parse $h)
-       [ "$mb" = "$rh" ] &&
-               continue
+       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 --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 "$base".."$h")
+       [ "$count" == 0 ] &&
+               continue
 
-##     git shortlog --no-walk $c 2>&1 | tee -a $LOG_FILE
-#      log $h "$(echo $c | wc -w)"
+       echo "$h" "$count" | tee -a "$LOG_FILE"
+#      git shortlog --no-walk "$c" 2>&1 | tee -a "$LOG_FILE"
+       git log --oneline --no-merges "$base".."$h" | tee -a "$LOG_FILE"
 
-       gitk stable..$h
+#      gitk stable..$h
 
 done