summaryrefslogtreecommitdiffstats
path: root/tools/patchwork-update-commits
blob: 820fd1cabf9b1dfdb2ff4f9b0b945c5db3803885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

toolsdir="$(dirname "$0")"
pwpath="${toolsdir}"/../patchwork

if [ "$#" -lt 1 ]
then
	echo "usage: $0 <revspec>" >&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