#!/bin/bash toolsdir="$(dirname "$0")" pwpath="${toolsdir}"/../apps/patchwork if [ "$#" -lt 1 ] then echo "usage: $0 " >&2 exit 1 fi git rev-list --reverse "$@" | while read commit do hash=$(git show "$commit" | python $pwpath/parser.py -#) $pwpath/bin/pwclient update -s Accepted -c "$commit" -h "$hash" done