diff options
-rwxr-xr-x | mailimport | 12 |
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 |