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

cvs-import: allow extra commit message



I think it'd be useful to be able to add a "real" commit message along
with the auto-import one generated by cvs-import.sh.  I tested this when
importing perl-HTML-Tree a few minutes ago.

Any objections against applying the attached patch?
Index: cvs-import.sh
===================================================================
RCS file: /cvs/extras/common/cvs-import.sh,v
retrieving revision 1.5
diff -u -r1.5 cvs-import.sh
--- cvs-import.sh	3 Feb 2005 00:30:33 -0000	1.5
+++ cvs-import.sh	13 Feb 2005 20:01:21 -0000
@@ -28,7 +28,7 @@
     cat <<EOF
 Usage:
 
-    $0 [-b <branch>] <package>
+    $0 [-b <branch>] [-m <message>] <package>
 
 Imports a package into the cvs repository. Will use the following defaults:
 CVSROOT    = $CVSROOT
@@ -42,6 +42,7 @@
 
 # Parse arguments
 BRANCH=
+MESSAGE=
 while [ -n "$1" ] ; do
     case "$1" in 
 	# import the package on the given branch. If the branch does
@@ -61,6 +62,11 @@
 	    fi
 	    ;;
 
+	-m | --message )
+	    shift
+	    MESSAGE="$1"
+	    ;;
+
 	# the always helpful help message
 	-h | --help )
 	    Usage
@@ -344,7 +350,8 @@
 echo "$LOG_ENTRY:$(date +%s)" >> ./import.log
 
 # prepare the commit message
-MESSAGE="auto-import $NAME-$VERSION-$RELEASE ${BRANCH:+on branch $BRANCH} from $(basename $PACKAGE)"
+MESSAGE="auto-import $NAME-$VERSION-$RELEASE ${BRANCH:+on branch $BRANCH} from $(basename $PACKAGE)
+$MESSAGE"
 cvs -Q update && \
     echo "cvs commit..." && \
     cvs -Q commit -m "$MESSAGE" >/dev/null && echo "Commit Complete" && \

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