]> git.ozlabs.org Git - patchwork/commitdiff
tools: add simple patchwork-update-commits script
authorJeremy Kerr <jk@ozlabs.org>
Tue, 10 Aug 2010 03:33:35 +0000 (11:33 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 10 Aug 2010 03:49:36 +0000 (11:49 +0800)
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
tools/patchwork-update-commits [new file with mode: 0755]

diff --git a/tools/patchwork-update-commits b/tools/patchwork-update-commits
new file mode 100755 (executable)
index 0000000..245a66a
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+pwpath=apps/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 -s Accepted -c "$commit" -h "$hash"
+done