diff options
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | mailimport | 20 | ||||
-rwxr-xr-x | v4l/scripts/hghead.pl | 3 |
3 files changed, 20 insertions, 5 deletions
@@ -27,7 +27,7 @@ commit cvscommit hgcommit change changes changelog:: whitespace echo "$$CHECKSUM" | md5sum -c --status && \ echo "*** commit message not changed. Aborting. ***" \ && exit 13 || exit 0 - grep -v '^#' $(TMP)/v4l_hg_commit.msg | hg commit -l - + $(BUILD_DIR)/scripts/hghead.pl $(TMP)/v4l_hg_commit.msg | grep -v '^#' | hg commit -l - @echo "*** PLEASE CHECK IF LOG IS OK:" @hg log -v -r -1 @echo "*** If not ok, do \"hg rollback\" and \"make commit\" again" diff --git a/mailimport b/mailimport index 76364aeea..bd6d36c2e 100755 --- a/mailimport +++ b/mailimport @@ -34,7 +34,7 @@ edit_patch() mv $tmp/$newfile $next; fi echo Editing $next - $EDITOR $next + $ED $next } #################################################################### @@ -80,7 +80,7 @@ apply_patch () { if [ "`grep '^Bad:' $TMP2`" != "" ]; then echo "*** ERROR: Patch bad formed. Please fix." sleep 1 - $EDITOR $next + $ED $next cont=1 fi done @@ -214,8 +214,20 @@ if [ "$TMPDIR" == "" ]; then TMPDIR=/tmp fi -if [ "$EDITOR" == "" ]; then - EDITOR="nano -w" +if [ "`which editdiff`" != "" ]; then + ED="editdiff" +else + ED=$EDITOR +fi + +if [ "$ED" == "" ]; then + if [ "`which nano`" != "" ]; then + ED="nano -w" + elif [ "`which pico`" != "" ]; then + ED="pico -w" + else + ED="vi" + fi fi if [ "$CHECKPATCH" == "" ]; then diff --git a/v4l/scripts/hghead.pl b/v4l/scripts/hghead.pl index 7eacd7019..02295bcef 100755 --- a/v4l/scripts/hghead.pl +++ b/v4l/scripts/hghead.pl @@ -188,6 +188,9 @@ $from=~s/[\n\s]+$//; $subject=~s/^[\n\s]+//; $subject=~s/[\n\s]+$//; +$body=~s/^[\n\s]+//; +$body=~s/[\n\s]+$//; + $body="$body\n\n$signed"; $body=~s/^[\n\s]+//; |