Mercurial > cds
changeset 36:b5730de1f18d
commit: Allow -m to specify the commit message on the command line
author | Josef "Jeff" Sipek <jsipek@cs.sunysb.edu> |
---|---|
date | Thu, 19 Apr 2007 15:15:17 -0400 |
parents | eaa1438adb09 |
children | d8f4fe903a01 |
files | cds-commit |
diffstat | 1 files changed, 22 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/cds-commit Thu Apr 19 15:14:47 2007 -0400 +++ b/cds-commit Thu Apr 19 15:15:17 2007 -0400 @@ -1,5 +1,26 @@ #!/bin/bash +msg="" + +while [ $# -gt 0 ]; do + case "$1" in + -m) + msg="$2" + shift + shift + ;; + *) + break + ;; + esac +done + +if [ ! -z "$msg" ]; then + # -m supplied, just use that instead of doing anything fancy + cvs commit -m "$msg" "$@" + exit $? +fi + if [ -z "$CDSEDITOR" ] ; then # no CDSEDITOR set, fall back to old behavior cvs commit "$@" @@ -35,4 +56,4 @@ cvs commit -F $CDSTMP/msg "$@" -exit +exit $?