libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: update commit and mailnotify scripts [libtool--release--2.0--patch-


From: Gary V. Vaughan
Subject: FYI: update commit and mailnotify scripts [libtool--release--2.0--patch-17]
Date: Fri, 8 Oct 2004 23:00:18 +0100 (BST)
User-agent: mailnotify/0.4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Applied to branch-2-0 and HEAD.

  * looking for address@hidden/libtool--devo--1.0--patch-248 to compare with
  * comparing to address@hidden/libtool--devo--1.0--patch-248
  A  
{arch}/libtool/libtool--release/libtool--release--2.0/address@hidden/patch-log/patch-17
  M  ChangeLog
  M  Makefile.maint
  M  bootstrap
  -- clcommit.m4sh
  M  clcommit.m4sh
  -- config/mailnotify.m4sh
  M  config/mailnotify.m4sh
  => .arch-ids/commit.id        .arch-ids/clcommit.m4sh.id
  => commit     clcommit.m4sh
  => config/.arch-ids/mailnotify.id     config/.arch-ids/mailnotify.m4sh.id
  => config/mailnotify  config/mailnotify.m4sh
  
  * file metadata changed
  
      ./clcommit.m4sh
          --permissions 755
          => --permissions 644
      ./config/mailnotify.m4sh
          --permissions 755
          => --permissions 644
  
  * modified files
  
  Index: Changelog
  from  Gary V. Vaughan  <address@hidden>
        Update to the latest commit and mailnotify scripts from
        address@hidden/cvs-utils--tla--1.0:
  
        * commit, config/mailnotify: Removed.  Now built from...
        * clcommit.m4sh, config/mailnotify.m4sh: ...these new sources.
        * Makefile.maint (commit, config/mailnotify): How to build them.
        * bootstrap: If we have a checked out tree (i.e. clcommit.m4sh
        is present), then build them.
  
  2004-10-08  Gary V. Vaughan  <address@hidden>
  
  --- orig/Makefile.maint
  +++ mod/Makefile.maint
  @@ -31,6 +31,31 @@
   
   TEXI2HTML = texi2html
   
  +$(top_srcdir)/commit: config/mailnotify clcommit.m4sh
  +     $(timestamp); \
  +     cd $(top_srcdir); \
  +     rm -f commit commit.in commit.tmp; \
  +     $(M4SH) -B ./config clcommit.m4sh > commit.in; \
  +     input="clcommit.m4sh"; \
  +     $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" commit.in > commit.tmp; \
  +     chmod a+x commit.tmp; \
  +     chmod a-w commit.tmp; \
  +     mv -f commit.tmp commit; \
  +     rm -f commit.in
  +
  +$(top_srcdir)/config/mailnotify: config/mailnotify.m4sh
  +     $(timestamp); \
  +     cd $(top_srcdir)/config; \
  +     rm -f mailnotify mailnotify.in mailnotify.tmp; \
  +     $(M4SH) -B . mailnotify.m4sh > mailnotify.in; \
  +     input="mailnotify.m4sh"; \
  +     $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
  +             mailnotify.in > mailnotify.tmp; \
  +     chmod a+x mailnotify.tmp; \
  +     chmod a-w mailnotify.tmp; \
  +     mv -f mailnotify.tmp mailnotify; \
  +     rm -f mailnotify.in
  +
   .PHONY: cvs-release
   cvs-release: version-check prev-tarball cvs-news fetch cvs-commit cvs-dist 
deltas web-manual
        @tarname="$(PACKAGE)-$(VERSION).tar.gz"; \
  
  
  --- orig/bootstrap
  +++ mod/bootstrap
  @@ -60,10 +60,15 @@
   test -f Makefile || { makefile=Makefile; cp Makefile.am $makefile; }
   make ./config/ltmain.sh ./m4/ltversion.m4 ./libtoolize.in ./tests/defs.in \
       top_srcdir=. PACKAGE="$2" VERSION="$3" M4SH="autom4te -l m4sh"
  +
  +test -f clcommit.m4sh && make -f Makefile.maint commit \
  +    top_srcdir=. PACKAGE="$2" VERSION="$3" M4SH="autom4te -l m4sh" \
  +    SED=sed GREP=grep FGREP=fgrep EGREP=egrep LN_S="ln -s"
  +
   test -z "$makefile" || rm -f "$makefile"
   
   # Make a dummy libtoolize script for autoreconf:
  -cat > ./config/libtoolize <<'EOF'
  +test -f clcommit.m4sh && cat > ./config/libtoolize <<'EOF'
   #! /bin/sh
   # This is a dummy file for bootstrapping CVS libtool.
   echo "$0: Bootstrap detected, no files installed." | sed 's,^.*/,,g'
  @@ -90,5 +95,14 @@
   # and earlier, but has a new enough timestamp to not be updated.  Force it
   # to be regenerated at make-time with proper substitutions in place:
   touch config/ltmain.in
  +
  +# Commit script caveat:
  +cat <<'EOF'
  +WARNING: You might want to regenerate `commit' and `config/mailnotify'
  +WARNING: after you have run `configure' to discover the real whereabouts
  +WARNING: of `sed', `grep' etc. like this:
  +WARNING:
  +WARNING:      rm -f config/mailnotify; make -f Makefile.maint commit
  +EOF
   
   exit 0
  
  
  --- orig/commit
  +++ mod/clcommit.m4sh
  @@ -1,6 +1,8 @@
  -#! /bin/sh
  +m4_define([_m4_divert(SCRIPT)], 100)
  +m4_divert_push([SCRIPT])#!/bin/sh
  +# @configure_input@
   
  -# clcommit (GNU cvs-utils) version 0.11
  +# clcommit (GNU @PACKAGE@) version 0.12
   # Written by Gary V. Vaughan <address@hidden>
   # and Alexandre Oliva <address@hidden>
   
  @@ -24,11 +26,11 @@
   # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
   # MA 02111-1307, USA.
   
  -# Usage: $progname [-v] [-h] [-f] [-l] [-n] [-q] [-z N] [-C ChangeLog_file]
  -#          [-m msg|-F msg_file|-1] [-s addr [--from addr]] [--] [file|dir 
...]
  +# Usage: $progname [OPTION]... [--] [file|dir ...]
   
   # -C file --changelog=file   extract commit message from specified ChangeLog
   # -zN     --compress=N       set compression level (0-9, 0=none, 9=max)
  +#         --debug            enable verbose shell tracing
   # -n      --dry-run          don't commit anything
   #         --fast             same as --force --first
   # -F file --file=file        read commit message from file
  @@ -42,7 +44,10 @@
   # -q      --quiet            run cvs in quiet mode
   # -s addr --sendmail=addr    send a commit email of the differences to ADDR
   #         --signature[=file] add FILE to the end of the email (~/.signature)
  -# -v      --version          print version information
  +# -S TEXT --summary=TEXT     specify a TEXT summary for the commit (tla only)
  +# -t      --tla              use tla as the scm (instead of cvs)
  +# -v      --verbose          run in verbose mode
  +#         --version          print version information
   # -h,-?   --help             print short or long help message
   
   # This script eases checking in changes to CVS-maintained projects
  @@ -67,145 +72,51 @@
   # Report bugs to <address@hidden>
   
   : ${CVS="cvs"}
  -: ${MAILNOTIFY="./config/mailnotify"}
  -: ${MKSTAMP="./config/mkstamp"}
  -: ${MV="mv -f"}
  -: ${RM="rm -f"}
  -: ${SED="sed"}
  -
  -SHELL="/bin/sh"
  -dirname="s,/[^/]*$,,"
  -basename="s,^.*/,,g"
  -
  -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
  -# is ksh but when the shell is invoked as "sh" and the current value of
  -# the _XPG environment variable is not equal to 1 (one), the special
  -# positional parameter $0, within a function call, is the name of the
  -# function.
  -progpath="$0"
  +: ${TLA="tla"}
  +: ${MAILNOTIFY="mailnotify"}
  +: ${MKSTAMP="mkstamp"}
  +
  +test -f "config/$MAILNOTIFY" && MAILNOTIFY="config/MAILNOTIFY"
  +test -f "config/$MKSTAMP" && MKSTAMP="config/$MKSTAMP"
   
  -# The name of this program:
  -progname=`echo "$progpath" | $SED "$basename"`
   PROGRAM=clcommit
   
  -# Global variables:
  -EXIT_SUCCESS=0
  -EXIT_FAILURE=1
  +AS_SHELL_SANITIZE
  +$as_unset CDPATH
  +
  +m4_include([getopt.m4sh])
   
  +# Global variables:
   cvs_flags=
   update_flags=
   commit_flags=
   opt_commit=:
   opt_update=:
  +opt_verbose=false
   opt_first=false
  +opt_tla=false
   
  -sendmail_to="Libtool Commit <address@hidden>"
  -sendmail_from=
  +mailnotify_flags=
  +sendmail_to=
   exit_cmd=:
   
   # Locations for important files
   signature_file=
  -log_file="${TMPDIR-/tmp}/commitlog.$$"
  +log_file="${TMPDIR-/tmp}/$progname-$$"
   
  -$RM "${log_file}*"
  -trap '$RM "${log_file}*"; exit $EXIT_FAILURE' 1 2 15
  +$RM "${TMPDIR-/tmp}/$progname"*
  +trap '$RM "${log_file}"*; exit $EXIT_FAILURE' 1 2 15
   
   set -e
   
  -
  -# func_echo arg...
  -# Echo program name prefixed message.
  -func_echo ()
  -{
  -    echo $progname: ${1+"$@"}
  -}
  -
  -# func_error arg...
  -# Echo program name prefixed message to standard error.
  -func_error ()
  -{
  -    echo $progname: ${1+"$@"} 1>&2
  -}
  -
  -# func_fatal_error arg...
  -# Echo program name prefixed message to standard error, and exit.
  -func_fatal_error ()
  -{
  -    func_error ${1+"$@"}
  -    exit $EXIT_FAILURE
  -}
  -
  -# func_verbose arg...
  -# Echo program name prefixed message in verbose mode only.
  -func_verbose ()
  -{
  -    $opt_verbose && func_error ${1+"$@"}
  -}
  -
  -# func_fatal_help arg...
  -# Echo program name prefixed message to standard error, followed by
  -# a help hint, and exit.
  -func_fatal_help ()
  -{
  -    func_error ${1+"$@"}
  -    func_fatal_error "Try \`$progname --help' for more information."
  -}
  -
  -# func_missing_arg argname
  -# Echo program name prefixed message to standard error and set global
  -# exit_cmd.
  -func_missing_arg ()
  -{
  -   func_error "missing argument for $1"
  -   exit_cmd=exit
  -}
  -
  -# func_usage
  -# Echo short help message to standard output and exit.
  -func_usage ()
  -{
  -    $SED '/^# Usage:/,/# -h/ {
  -        s/^# //; s/^# *$//;
  -     s/\$progname/'$progname'/;
  -     p;
  -    }; d' < "$progpath"
  -    echo
  -    echo "run \`$progname --help | more' for full usage"
  -    exit $EXIT_SUCCESS
  -}
  -
  -# func_help
  -# Echo long help message to standard output and exit.
  -func_help ()
  -{
  -    $SED '/^# Usage:/,/# Report bugs to/ {
  -        s/^# //; s/^# *$//;
  -     s/\$progname/'$progname'/;
  -     p;
  -     }; d' < "$progpath"
  -    exit $EXIT_SUCCESS
  -}
  -
  -# func_version
  -# Echo version message to standard output and exit.
  -func_version ()
  -{
  -    $SED '/^# '$PROGRAM' (GNU /,/# warranty; / {
  -        s/^# //; s/^# *$//;
  -        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/;
  -        p;
  -     }; d' < "$progpath"
  -     exit $EXIT_SUCCESS
  -}
  -
   # Parse options once, thoroughly.  This comes as soon as possible in
  -# the script to make things like `libtoolize --version' happen quickly.
  +# the script to make things like `clcommit --version' happen quickly.
   {
     # sed scripts:
     my_sed_single_opt='1s/^\(..\).*$/\1/;q'
     my_sed_single_rest='1s/^..\(.*\)$/\1/;q'
  -  my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
  -  my_sed_long_arg='1s/^--[^=]*=//'
  +  my_sed_long_opt='1s/^\(--[[^=]]*\)=.*/\1/;q'
  +  my_sed_long_arg='1s/^--[[^=]]*=//'
   
     # this just eases exit handling
     while test $# -gt 0; do
  @@ -213,12 +124,17 @@
       shift
       case $opt in
   
  +      --debug)               func_echo "enabling shell trace mode"
  +                     mailnotify_flags="$mailnotify_flags --debug"
  +                     set -x
  +                     ;;
  +
         --fast)                set -- --force --first ${1+"$@"}        ;;
   
         -f|--force)    opt_update=false; PAGER=cat             ;;
   
         --from)                test $# = 0 && func_missing_arg $opt && break
  -                     sendmail_from="$1"
  +                     mailnotify_flags="$mailnotify_flags --from '"$1"'"
                        shift
                        ;;
   
  @@ -254,7 +170,7 @@
                        opt_first=:
                        ;;
   
  -      -C|--[cC]hange[lL]og)
  +      -C|--[[cC]]hange[[lL]]og)
                        test $# = 0 && func_missing_arg $opt && break
                        if test -f "$1"; then :; else
                          func_error "ChangeLog file \`$1' does not exist"
  @@ -273,7 +189,7 @@
                        shift
                        ;;
   
  -    --signature)     test $# = 0 && func_missing_arg $opt && break
  +      --signature)   test $# = 0 && func_missing_arg $opt && break
                        signature_file="$HOME/.signature"
                        case $1 in
                          -*) ;;
  @@ -285,10 +201,19 @@
                        fi
                        ;;
   
  +      -S|--summary)  test $# = 0 && func_missing_arg $opt && break
  +                     summary="$1"
  +                     shift
  +                     ;;
  +
  +      -t|--tla)              opt_tla=:                               ;;
  +
  +      -v|--verbose)  opt_verbose=:                           ;;
  +
         -z|--compress)
                        test $# = 0 && func_missing_arg $opt && break
                        case "$1" in
  -                       [0-9]) :;;
  +                       [[0-9]]) :;;
                          *)  func_error "invalid argument for $opt"
                              break
                              ;;
  @@ -298,14 +223,14 @@
                        ;;
   
         # Separate optargs to long options:
  -      
--message=*|--msg=*|--from=*|--file=*|--[Cc]hange[Ll]og=*|--compress=*|--sendmail=*|--signature=*)
  +      
--message=*|--msg=*|--from=*|--file=*|--[[Cc]]hange[[Ll]]og=*|--compress=*|--summary=*|--sendmail=*|--signature=*)
                        arg=`echo "$opt" | $SED "$my_sed_long_arg"`
                        opt=`echo "$opt" | $SED "$my_sed_long_opt"`
                        set -- "$opt" "$arg" ${1+"$@"}
                        ;;
   
         # Separate optargs to short options:
  -      -m*|-F*|-C*|-s*|-z*)
  +      -m*|-F*|-C*|-S*|-s*|-z*)
                        arg=`echo "$opt" |$SED "$my_sed_single_rest"`
                        opt=`echo "$opt" |$SED "$my_sed_single_opt"`
                        set -- "$opt" "$arg" ${1+"$@"}
  @@ -342,123 +267,207 @@
     $exit_cmd $EXIT_FAILURE
   }
   
  +# func_check_conflicts
  +func_check_conflicts ()
  +{
  +    func_verbose "$progname: checking for conflicts..."
  +    if $opt_tla; then
  +      if ( $TLA changes |
  +         while read line; do
  +           echo "$line"
  +           echo "$line" >&3
  +         done | grep '^C'
  +       ) 3>&1 >/dev/null; then
  +        func_fatal_error "some conflicts were found with arch archive, 
aborting..."
  +      fi
  +    fi
  +
  +    if test -f CVS/Entries; then
  +      if ( $CVS $cvs_flags -q -n update $update_flags ${1+"$@"} |
  +            while read line; do
  +           echo "$line"
  +           echo "$line" >&3
  +            done | grep '^C'
  +          ) 3>&1 >/dev/null; then
  +        func_fatal_error "some conflicts were found with CVS repository, 
aborting..."
  +      fi
  +    fi
  +}
   
  -$opt_update && {
  -   func_error "$progname: checking for conflicts..."
  -   if ( $CVS $cvs_flags -q -n update $update_flags ${1+"$@"} |
  -          while read line; do
  -         echo "$line"
  -         echo "$line" >&3
  -          done | grep '^C'
  -      ) 3>&1 >/dev/null; then
  -    func_fatal_error "some conflicts were found, aborting..."
  -  fi
  +
  +# func_check_commit_msg
  +func_check_commit_msg ()
  +{
  +    if test -z "$ChangeLog"; then
  +      for f in ${1+"$@"}; do
  +        case "$f" in
  +          ChangeLog* | */ChangeLog*)
  +            if test -z "$ChangeLog"; then
  +           ChangeLog="$f"
  +         else
  +           func_fatal_error "multiple ChangeLog files: $ChangeLog and $f"
  +         fi
  +       ;;
  +        esac
  +      done
  +    fi
  +
  +    func_verbose "$progname: checking commit message..."
  +    if $opt_first; then
  +      skipping=:
  +      $SED 's,^,+,' < ${ChangeLog-ChangeLog} |
  +        while read line; do
  +          case "$line" in
  +            "+") if $skipping; then skipping=false; else break; fi;;
  +            "+ "*)
  +           func_error "*** Warning: lines should start with tabs, not 
spaces; ignoring line:"
  +           echo "$line" | $SED 's/^.//' >&2;;
  +            "+       "*)
  +              $skipping || echo "$line" ;;
  +          esac
  +        done |
  +          $SED 's,^\+        ,,' > "$log_file" || exit $EXIT_FAILURE
  +    else
  +      if $opt_tla; then
  +        cmd="$TLA file-diffs"
  +      else
  +        cmd="$CVS $cvs_flags diff -u"
  +      fi
  +      $cmd ${ChangeLog-ChangeLog} |
  +        while read line; do
  +          case $line in
  +            "--- "*) :;;
  +            "-"*)
  +           func_error "*** Warning: the following line in ChangeLog diff is 
suspicious:"
  +           echo "$line" | $SED 's/^.//' >&2;;
  +            "+ "*)
  +           func_error "*** Warning: lines should start with tabs, not 
spaces; ignoring line:"
  +           echo "$line" | $SED 's/^.//' >&2;;
  +            "+") echo ;;
  +            "+       "*) echo "$line";;
  +          esac
  +        done |
  +          $SED -e 's,\+      ,,' -e '/./p' -e '/./d' -e '1d' -e '$d' > 
"$log_file" \
  +      || exit $EXIT_FAILURE
  +    fi
  +    # The sed script above removes "+TAB" from the beginning of a line, then
  +    # deletes the first and/or the last line, when they happen to be empty
  +}
  +
  +
  +# func_commit
  +func_commit ()
  +{
  +    if $opt_tla; then
  +      tla_log=`$TLA make-log`
  +      test -n "$summary" || summary=`$SED -e '1{s/^Summary: *//;q;}'`
  +      echo "Summary: $summary" > "$tla_log$$T" &&
  +        $SED 1d "$tla_log" >> "$tla_log$$T" &&
  +        cat < "$log_file" >> "$tla_log$$T" &&
  +        mv "$tla_log$$T" "$tla_log"
  +      ${PAGER-more} "$tla_log" || exit $EXIT_FAILURE
  +
  +      sleep 1 # give the user some time for a ^C
  +
  +      # Propagate any user edits back to the cvs log message
  +      $SED -e '/^[[A-Z]][[-a-zA-Z]]*:/d' -e '1d' < $tla_log > $log_file
  +
  +    else
  +      ${PAGER-more} "$log_file" || exit $EXIT_FAILURE
  +
  +      sleep 1 # give the user some time for a ^C
  +
  +      subject=`cvs -nq up 2>/dev/null | grep '^[[MAD]] ' | $SED 's/^. //'`
  +      test $# -gt 0 && subject="$@"
  +    fi
  +
  +    if test -f CVS/Entries; then
  +      func_verbose "$CVS $cvs_flags commit $commit_flags -F $log_file 
address@hidden"
  +      $CVS $cvs_flags commit $commit_flags -F $log_file ${1+"$@"} || exit 
$EXIT_FAILURE
  +    fi
  +
  +    # Need to do the tla commit *after* cvs commit to make sure the
  +    # ChangeLog timestamps stay in synch.
  +    $opt_tla && $TLA commit
   }
   
  -if test -f "$log_file"; then :; else
  -  if test -z "$ChangeLog"; then
  -    for f in ${1+"$@"}; do
  -      case "$f" in
  -        ChangeLog* | */ChangeLog*)
  -          if test -z "$ChangeLog"; then
  -         ChangeLog="$f"
  -       else
  -         func_fatal_error "multiple ChangeLog files: $ChangeLog and $f"
  -       fi
  -     ;;
  -      esac
  -    done
  +
  +# func_mailnotify
  +func_mailnotify ()
  +{
  +    notify_file="${log_file}.2"
  +    func_verbose "Mailing commit notification to $sendmail_to"
  +
  +    {
  +      echo Subject: $subject
  +      test -f '{arch}/=tagging-method' &&
  +          echo "Tree version:        `$TLA tree-version`"
  +      test -f CVS/Root &&
  +          echo "CVSROOT:     `$SED -e 's,.*:,,g' CVS/Root`"
  +      test -f $MKSTAMP &&
  +          echo "TIMESTAMP:   `$SHELL $MKSTAMP < ./ChangeLog`"
  +      test -f CVS/Repository &&
  +          echo "Module name: `cat CVS/Repository`"
  +      test -f CVS/Tag &&
  +          echo "Branch:              `$SED -e 's,^T,,;1q' CVS/Tag`"
  +      test -f CVS/Root &&
  +          echo "Changes by:  `$SED -e 's,^:[[a-z]]*:,,;s,:.*$,,g' CVS/Root`"
  +      echo ""
  +      echo "Log Message:"
  +      $SED -e 's,^,  ,' "$log_file"
  +      test -f "$signature_file" && cat "$signature_file"
  +    } > "$notify_file"
  +
  +    ${PAGER-more} "$notify_file" || break
  +
  +    # Break out the subject line again
  +    my_mail_subject=`$SED -e '1{s/^Subject: *//;q;}' "$notify_file"`
  +    my_mail_body=`$SED -e '2,$p;d' "$notify_file"`
  +    echo "$my_mail_body" > "$notify_file"
  +
  +    func_verbose "mailing commit notification to \"$sendmail_to\""
  +    eval func_verbose_eval $MAILNOTIFY $mailnotify_flags -s 
"'$my_mail_subject'" \
  +        -m "text/plain" -f "$notify_file" -- "'$sendmail_to'"
  +}
  +
  +
  +
  +## ----- ##
  +## main. ##
  +## ----- ##
  +
  +{
  +  $opt_update && func_check_conflicts
  +
  +  test -f "$log_file" || func_check_commit_msg
  +
  +  grep '[[^  ]]' < "$log_file" > /dev/null ||
  +    func_fatal_error "empty commit message, aborting"
  +
  +  if grep '^$' < "$log_file" > /dev/null; then
  +    func_error "*** Warning: blank lines should not appear within commit 
messages."
  +    func_error "*** They should be used to separate distinct commits."
     fi
   
  -  func_error "$progname: checking commit message..."
  -  if $opt_first; then
  -    skipping=:
  -    sed 's,^,+,' < ${ChangeLog-ChangeLog} |
  -      while read line; do
  -        case "$line" in
  -          "+") if $skipping; then skipping=false; else break; fi;;
  -          "+ "*)
  -         func_error "*** Warning: lines should start with tabs, not spaces; 
ignoring line:"
  -         echo "$line" | sed 's/^.//' >&2;;
  -          "+ "*)
  -            $skipping || echo "$line" ;;
  -        esac
  -      done |
  -        sed 's,^\+   ,,' > "$log_file" || exit $EXIT_FAILURE
  -  else
  -    $CVS $cvs_flags diff -u ${ChangeLog-ChangeLog} |
  -      while read line; do
  -        case $line in
  -          "--- "*) :;;
  -          "-"*)
  -         func_error "*** Warning: the following line in ChangeLog diff is 
suspicious:"
  -         echo "$line" | sed 's/^.//' >&2;;
  -          "+ "*)
  -         func_error "*** Warning: lines should start with tabs, not spaces; 
ignoring line:"
  -         echo "$line" | sed 's/^.//' >&2;;
  -          "+") echo ;;
  -          "+ "*) echo "$line";;
  -        esac
  -      done |
  -        sed -e 's,\+ ,,' -e '/./p' -e '/./d' -e '1d' -e '$d' > "$log_file" \
  -    || exit $EXIT_FAILURE
  +  # Do not check for empty $log_file again, even though the user might have
  +  # zeroed it out.  If s/he did, it was probably intentional.
  +  if $opt_commit; then
  +    func_commit
     fi
  -  # The sed script above removes "+TAB" from the beginning of a line, then
  -  # deletes the first and/or the last line, when they happen to be empty
  -fi
  -
  -grep '[^     ]' < "$log_file" > /dev/null ||
  -  func_fatal_error "empty commit message, aborting"
  -
  -if grep '^$' < "$log_file" > /dev/null; then
  -  func_error "*** Warning: blank lines should not appear within commit 
messages."
  -  func_error "*** They should be used to separate distinct commits."
  -fi
  -
  -${PAGER-more} "$log_file" || exit $EXIT_FAILURE
  -
  -sleep 1 # give the user some time for a ^C
  -
  -filelist=`cvs -nq up 2>/dev/null | grep '^[MAD] ' | sed 's/^. //'`
  -
  -# Do not check for empty $log_file again, even though the user might have
  -# zeroed it out.  If s/he did, it was probably intentional.
  -
  -if $opt_commit; then
  -  $CVS $cvs_flags commit $commit_flags -F $log_file ${1+"$@"} || exit 
$EXIT_FAILURE
  -fi
  -
  -# Send a copy of the log_file if sendmail_to was set:
  -if test -n "$sendmail_to"; then
  -  notify_file="${log_file}.2"
  -  func_error "Mailing commit notification to $sendmail_to"
  -  test $# -gt 0 && filelist="$@"
  -
  -  {
  -    test -f CVS/Root &&
  -        echo "CVSROOT:       `sed -e 's,.*:,,g' CVS/Root`"
  -    test -f $MKSTAMP &&
  -        echo "TIMESTAMP:     `$SHELL $MKSTAMP < ./ChangeLog`"
  -    test -f CVS/Repository &&
  -        echo "Module name:   `cat CVS/Repository`"
  -    test -f CVS/Tag &&
  -        echo "Branch:                `sed -e 's,^T,,;1q' CVS/Tag`"
  -    test -f CVS/Root &&
  -        echo "Changes by:    `sed -e 's,:.*$,,g;s,^.*:,,' CVS/Root`"
  -    echo ""
  -    echo "Log Message:"
  -    sed -e 's,^,     ,' "$log_file"
  -    test -f "$signature_file" && cat "$signature_file"
  -  } > "$notify_file"
  -
  -  if test -n "$sendmail_from"; then
  -    $SHELL $MAILNOTIFY -F "$sendmail_from" -s "`echo $filelist`" -f 
"$notify_file" -m "text/plain" "$sendmail_to"
  -  else
  -    $SHELL $MAILNOTIFY -s "`echo $filelist`" -f "$notify_file" -m 
"text/plain" "$sendmail_to"
  +
  +  # Need to set the subject line *after* tla commit, or the
  +  # patch revision changes underneath us!
  +  subject="$summary"
  +  $opt_tla && \
  +    subject="$subject [["`$TLA tree-version|$SED $basename`--`$TLA 
revisions|$SED -e '$p;d'`"]]"
  +
  +  # Send a copy of the log_file if sendmail_to was set:
  +  if test -n "$sendmail_to"; then
  +    func_mailnotify
     fi
  -fi
   
  -$RM "${log_file}*"
  +  $RM "${log_file}"*
  +}
   
   exit $EXIT_SUCCESS
   
  
  
  --- orig/config/mailnotify
  +++ mod/config/mailnotify.m4sh
  @@ -1,6 +1,8 @@
  -#!/bin/sh
  -#
  -# mailnotify (GNU cvs-utils) version 0.2
  +m4_define([_m4_divert(SCRIPT)], 100)
  +m4_divert_push([SCRIPT])#!/bin/sh
  +# @configure_input@
  +
  +# mailnotify (GNU @PACKAGE@) version 0.4
   # Written by Gary V. Vaughan <address@hidden>
   
   # Copyright (C) 2004 Free Software Foundation, Inc.
  @@ -25,6 +27,7 @@
   
   # Usage: $progname [OPTION]... [--] to-address...
   #
  +#           --debug             enable verbose shell tracing
   # -C ADDR   --carbon-copy=ADDR  send a carbon-copy to ADDR
   # -F ADDR   --from=ADDR         override default from address with ADDR
   # -f FILE   --filename=FILE     content of this part
  @@ -57,132 +60,37 @@
   
   : ${TMPDIR=/tmp}
   : ${HOST=`hostname`}
  -: ${MV="mv -f"}
  -: ${RM="rm -f"}
  -: ${SED="sed"}
  -
  -dirname="s,/[^/]*$,,"
  -basename="s,^.*/,,g"
  -
  -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
  -# is ksh but when the shell is invoked as "sh" and the current value of
  -# the _XPG environment variable is not equal to 1 (one), the special
  -# positional parameter $0, within a function call, is the name of the
  -# function.
  -progpath="$0"
   
  -# The name of this program:
  -progname=`echo "$progpath" | $SED "$basename"`
   PROGRAM=mailnotify
   
  -# Global variables:
  -EXIT_SUCCESS=0
  -EXIT_FAILURE=1
  +AS_SHELL_SANITIZE
  +$as_unset CDPATH
   
  +m4_include([getopt.m4sh])
  +
  +# Global variables:
   multipart=1
   outputfile=""
   
  -exit_cmd=:
  -
   sed_mail_address='s,^.*<\(.*\)>.*$,\1,'
   
  -# func_echo arg...
  -# Echo program name prefixed message.
  -func_echo ()
  -{
  -    echo $progname: ${1+"$@"}
  -}
  -
  -# func_error arg...
  -# Echo program name prefixed message to standard error.
  -func_error ()
  -{
  -    echo $progname: ${1+"$@"} 1>&2
  -}
  -
  -# func_fatal_error arg...
  -# Echo program name prefixed message to standard error, and exit.
  -func_fatal_error ()
  -{
  -    func_error ${1+"$@"}
  -    exit $EXIT_FAILURE
  -}
  -
  -# func_verbose arg...
  -# Echo program name prefixed message in verbose mode only.
  -func_verbose ()
  -{
  -    $opt_verbose && func_error ${1+"$@"}
  -}
  -
  -# func_fatal_help arg...
  -# Echo program name prefixed message to standard error, followed by
  -# a help hint, and exit.
  -func_fatal_help ()
  -{
  -    func_error ${1+"$@"}
  -    func_fatal_error "Try \`$progname --help' for more information."
  -}
  -
  -# func_missing_arg argname
  -# Echo program name prefixed message to standard error and set global
  -# exit_cmd.
  -func_missing_arg ()
  -{
  -    func_error "missing argument for $1"
  -    exit_cmd=exit
  -}
  -
  -# Echo short help message to standard output and exit.
  -func_usage ()
  -{
  -    $SED '/^# Usage:/,/# -h/ {
  -        s/^# //; s/^# *$//;
  -     s/\$progname/'$progname'/;
  -     p;
  -    }; d' < "$progpath"
  -    echo
  -    echo "run \`$progname --help | more' for full usage"
  -    exit $EXIT_SUCCESS
  -}
  -
  -# func_help
  -# Echo long help message to standard output and exit.
  -func_help ()
  -{
  -    $SED '/^# Usage:/,/# Report bugs to/ {
  -        s/^# //; s/^# *$//;
  -     s/\$progname/'$progname'/;
  -     p;
  -     }; d' < "$progpath"
  -    exit $EXIT_SUCCESS
  -}
  -
  -# func_version
  -# Echo version message to standard output and exit.
  -func_version ()
  -{
  -    $SED '/^# '$PROGRAM' (GNU /,/# warranty; / {
  -        s/^# //; s/^# *$//;
  -        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/;
  -        p;
  -     }; d' < "$progpath"
  -     exit $EXIT_SUCCESS
  -}
  -
   # Parse options once, thoroughly.  This comes as soon as possible in
   # the script to make things like `mailnotify --version' happen quickly.
   {
     # sed scripts:
     my_sed_single_opt='1s/^\(..\).*$/\1/;q'
     my_sed_single_rest='1s/^..\(.*\)$/\1/;q'
  -  my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
  -  my_sed_long_arg='1s/^--[^=]*=//'
  +  my_sed_long_opt='1s/^\(--[[^=]]*\)=.*/\1/;q'
  +  my_sed_long_arg='1s/^--[[^=]]*=//'
   
     while test $# -gt 0; do
       opt="$1"
       shift
       case $opt in
  +      --debug)               func_echo "enabling shell trace mode"
  +                     set -x
  +                     ;;
  +
         -C|--carbon-copy) test $# -eq 0 && func_missing_arg "$opt" && break
                        cc="$1"
                        shift
  @@ -312,7 +220,7 @@
       my_outfile="$1"
   
       cat >> "$my_outfile" <<EOF
  -Content-Type: $ctype1
  +Content-Type: $ctype1;
   Content-Transfer-Encoding: 7bit
   
   `cat $datafile1`
  @@ -325,9 +233,9 @@
   func_multipart_content ()
   {
       my_outfile="$1"
  -    boundary="Boundary-${HOST}-$$-`date | tr ' :' -`"
  +    boundary="boundary-${HOST}-$$-`date | tr ' :' -`"
       cat <<EOF >> "$my_outfile"
  -Content-Type: Multipart/Mixed;
  +Content-Type: multipart/mixed;
        boundary="$boundary"
   
   This is a multimedia message in MIME format.  If you are reading
  @@ -338,13 +246,20 @@
       while test $i -lt $multipart
       do
         i=`expr 1 + $i`
  +      eval file=\"\$datafile$i\"
  +      name=`echo "$file" | $SED $basename`
         {
        echo ""
        echo "--$boundary"
  -     eval echo \"Content-Type: \$ctype$i\"
  +     if test $i -gt 1; then
  +         eval echo \"Content-Type: \$ctype$i\;\"
  +         echo "        name=\"$name\""
  +     else
  +         eval echo \"Content-Type: \$ctype$i\"
  +     fi
        echo "Content-Transfer-Encoding: 7bit"
        echo ""
  -     eval cat \"\$datafile$i\"
  +     cat "$file"
         } >> "$my_outfile"
       done
       {
  @@ -372,7 +287,7 @@
   
       SENDMAIL=sendmail
       for try_sendmail in sendmail /usr/lib/sendmail /usr/sbin/sendmail; do
  -     if which $try_sendmail >/dev/null; then
  +     if which $try_sendmail >/dev/null 2>&1; then
            SENDMAIL=$try_sendmail
            break
        fi
  @@ -388,7 +303,7 @@
       fi
       if test $? -eq 0; then
           func_verbose "...succeeded."
  -        rm $my_infile
  +        $RM $my_infile
       else
           func_fatal_error "Mail delivery failed, draft mail is in $my_infile"
       fi
  
  
  
  * added files
  
  --- /dev/null
  +++ 
/Users/gary/devel/savannah/libtool--devo--1.0/,,address@hidden/new-files-archive/./{arch}/libtool/libtool--release/libtool--release--2.0/address@hidden/patch-log/patch-17
  @@ -0,0 +1,23 @@
  +Revision: libtool--release--2.0--patch-17
  +Archive: address@hidden
  +Creator: Gary V. Vaughan <address@hidden>
  +Date: Fri Oct  8 22:47:53 BST 2004
  +Standard-date: 2004-10-08 21:47:53 GMT
  +Renamed-files: .arch-ids/commit.id .arch-ids/clcommit.m4sh.id
  +    commit clcommit.m4sh
  +    config/.arch-ids/mailnotify.id config/.arch-ids/mailnotify.m4sh.id
  +    config/mailnotify config/mailnotify.m4sh
  +Modified-files: ChangeLog Makefile.maint bootstrap
  +    clcommit.m4sh config/mailnotify.m4sh
  +New-patches: address@hidden/libtool--release--2.0--patch-17
  +Summary: update commit and mailnotify scripts
  +Keywords: 
  +
  +Update to the latest commit and mailnotify scripts from
  address@hidden/cvs-utils--tla--1.0:
  +
  +* commit, config/mailnotify: Removed.  Now built from...
  +* clcommit.m4sh, config/mailnotify.m4sh: ...these new sources.
  +* Makefile.maint (commit, config/mailnotify): How to build them.
  +* bootstrap: If we have a checked out tree (i.e. clcommit.m4sh
  +is present), then build them.
  
- -- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.7
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFBZw3xFRMICSmD1gYRAn/dAKDQcwq76qAiMkI+JFgiibhuZGXLgACdEobc
ERP9G/T3IIu+Nlc8mhukJBU=
=RWim
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]