incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Lemings" <Eric.Lemi...@roguewave.com>
Subject RE: svn commit: r643630 - /stdcxx/trunk/etc/config/src/float_defs.h
Date Tue, 01 Apr 2008 23:32:58 GMT
 
Doh!  Yeah, thought I had it tested out pretty good.  That's what
thinkin' gets me.

Save the following script and set SVN_EDITOR environment variable
to use it during check-ins:

-----
#!/bin/sh

# Generate custom template for Subversion log messages.

[ $# -eq 1 ] || {
    echo "Usage: $0 FILE"
    exit 1
}

FILE=$1
TEXT=`cat ${FILE}`
TODAY=`date +%F`
# This will have to be tailored by the end user.  Can't think of a way
# to determine this automaticallly.
EMAIL="Eric Lemings <eric.lemings@roguewave.com>"

# Save original file and revert back to it later if necessary.
TMPFILE=`mktemp -t svn.XXXXXXXXXX`
if [ $? -ne 0 ]; then
  echo "$0: error: could not create temporary file"
  exit 1
fi

# Create a new template using GNU ChangeLog format.
cat <<END >${TMPFILE}
${TODAY} ${EMAIL}

        ISSUE-ID
        * file1 (func1), file2: Summary of 1st change.
        * file2: Summary of 2nd change.
${TEXT}
END

# Try to determine user's preferred editor.
[ -z ${EDITOR} ] && EDITOR=${SVN_EDITOR}
[ -z ${EDITOR} ] && EDITOR=${VISUAL}
[ -z ${EDITOR} ] && [ -f ${HOME}/.emacs ] && EDITOR=emacs
[ -z ${EDITOR} ] && EDITOR=vi

# Compare checksums to determine if file actually changed.
OLDCRC=`cksum ${TMPFILE}`
if ${EDITOR} ${TMPFILE}; then
  NEWCRC=`cksum ${TMPFILE}`
  if [ "${OLDCRC}" != "${NEWCRC}" ]; then
    rm -f ${FILE}
    mv ${TMPFILE} ${FILE}
  else
    rm -f ${TMPFILE}
  fi
else
    echo "$0: error: editor failed: \"${EDITOR}\""
    exit 1
fi
-----

Brad.

> -----Original Message-----
> From: Travis Vitek [mailto:Travis.Vitek@roguewave.com] 
> Sent: Tuesday, April 01, 2008 4:48 PM
> To: dev@stdcxx.apache.org
> Subject: RE: svn commit: r643630 - 
> /stdcxx/trunk/etc/config/src/float_defs.h
> 
> 
> Brad,
> 
> I think your changelog template is great, but it might be a 
> good idea to
> fill it in. :) BTW, there are two spaces between the date and 
> your name,
> and then another two between your name and your e-mail address.
> 
> Travis
> 
> >-----Original Message-----
> >From: elemings@apache.org [mailto:elemings@apache.org] 
> >Sent: Tuesday, April 01, 2008 3:35 PM
> >To: commits@stdcxx.apache.org
> >Subject: svn commit: r643630 - 
> >/stdcxx/trunk/etc/config/src/float_defs.h
> >
> >Author: elemings
> >Date: Tue Apr  1 15:35:11 2008
> >New Revision: 643630
> >
> >URL: http://svn.apache.org/viewvc?rev=643630&view=rev
> >Log:
> >2008-04-01 Eric Lemings <eric.lemings@roguewave.com>
> >
> >	STDCXX-###
> >	* file (function), ...: Summary of change.
> >
> >
> >Modified:
> >    stdcxx/trunk/etc/config/src/float_defs.h
> >
> 

Mime
View raw message