summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-03-20 03:22:04 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-20 03:22:04 -0300
commit17aa9f4a88596f3041a955baf37e559aa88a7ec2 (patch)
treedb84a0df0db027a2c2bd00d13a54d500d934c6f8
parentd9370ed5272b04be0231d576c77a21b402105b49 (diff)
downloadmediapointer-dvb-s2-17aa9f4a88596f3041a955baf37e559aa88a7ec2.tar.gz
mediapointer-dvb-s2-17aa9f4a88596f3041a955baf37e559aa88a7ec2.tar.bz2
mailimport: Fix script when CARDLIST.foo is touched
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rwxr-xr-xmailimport12
1 files changed, 9 insertions, 3 deletions
diff --git a/mailimport b/mailimport
index 94f0d53c4..0050a1ded 100755
--- a/mailimport
+++ b/mailimport
@@ -131,27 +131,33 @@ apply_patch () {
if [ "$?" != "0" ]; then
echo "*** ERROR at hg addremove"
echo hg addremove `diffstat -p1 -l $next`
+ patch -s -t -p1 -l -R -d $pdir -i $next
exit -1
fi
# Commit the changed files
CARDLIST="`hg status -n -m|grep CARDLIST.`"
FILES=""
+ for i in $CARDLIST; do
+ FILES="$FILES $cur/$i"
+ done
for i in `diffstat -p1 -l $next`; do
FILES="$FILES `pwd`/$i"
done
if [ "$FILES" == "" ]; then
echo "*** ERROR nothing to commit"
+ patch -s -t -p1 -l -R -d $pdir -i $next
cd $cur
- exit
+ exit -1
fi
- hg commit -d "$date" -u "$committer" -m "`cat $TMP2|grep -v "^#"`" $CARDLIST $FILES
+ hg commit -d "$date" -u "$committer" -m "`cat $TMP2|grep -v "^#"`" $FILES
if [ "$?" != "0" ]; then
echo "*** ERROR at hg commit"
- echo hg commit -d \"$date\" -u \"$committer\" -m "<msg>" $CARDLIST $FILES
+ echo hg commit -d \"$date\" -u \"$committer\" -m "<msg>" $FILES
+ patch -s -t -p1 -l -R -d $pdir -i $next
cd $cur
exit -1
fi