[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Debian JP master SVN www commits (rev.946)
=======================================================
Repository: /org/svn.debian.or.jp/repos
Revision: 946
Commiter: kmuto
Date: 2009-10-14 09:11:58 +0900 (水, 14 10月 2009)
=======================================================
Log:
check for lastcommit value
=======================================================
Changed:
U webwml-sync/trunk/webwml-patch-commit
Modified: webwml-sync/trunk/webwml-patch-commit
===================================================================
--- webwml-sync/trunk/webwml-patch-commit 2009-10-13 12:21:42 UTC (rev 945)
+++ webwml-sync/trunk/webwml-patch-commit 2009-10-14 00:11:58 UTC (rev 946)
@@ -1,5 +1,7 @@
#!/bin/bash
# Copyright 2009 Kenshi Muto <kmuto@debian.org>
+#
+# Usage: webwml-patch-commit [last-revision]
skipauthor="webwml sync agent"
lastcommitfile=$(pwd)/lastcommit
@@ -10,9 +12,15 @@
patchedprefix=$(date +'%Y%m%d')-
+if [ "$1" ]; then
+ lastrev=$1
+else
+ lastrev=$(cat $lastcommitfile)
+fi
+
cd $gitdir
git pull
-git format-patch -o $patchesdir $(cat $lastcommitfile)
+git format-patch -o $patchesdir $lastrev
cd $cvsdir
cvs -q update -d -P english japanese
@@ -32,7 +40,7 @@
patch --dry-run -p1 -f < ${patchesdir}/$pf
if [ $? != 0 ]; then
while true; do
- echo -n "[ERROR] $pf failed to apply! Exit now? [y/n]"
+ echo -n "[ERROR] $pf failed to apply! Exit now? [y/n] "
read yn
if [ "$yn" = "y" ]; then
exit
@@ -43,7 +51,7 @@
else
logmsg=$(head -n 4 $patchesdir/$pf | grep Subject: | sed -e "s/Subject: \[PATCH\] //")
while true; do
- echo -n "[COMMIT] $pf as '$logmsg'. Apply? [y/n/p/s]"
+ echo -n "[COMMIT] $pf as '$logmsg'. Apply? [y/n/p/s] "
read yn
if [ "$yn" = "y" ]; then # apply
patch -p1 -f < ${patchesdir}/$pf