[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/src ChangeLog logmsg.c parseinfo.c parsein...
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/src ChangeLog logmsg.c parseinfo.c parsein... |
Date: |
Tue, 28 Aug 2007 17:33:15 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Changes by: Derek Robert Price <dprice> 07/08/28 17:33:14
Modified files:
src : ChangeLog logmsg.c parseinfo.c parseinfo.h
sanity.sh
Log message:
* logmsg.c (do_editor): Improve header block comment. Honor new
FirstVerifyLogErrorFatal option.
* parseinfo.c (new_config): Initialize new FirstVerifyLogErrorFatal
option.
(parse_config): Parse new FirstVerifyLogErrorFatal option.
* parseinfo.h (struct config): Declare storage for new option.
* sanity.sh (info-v*): Compensate for and test changes.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3527&r2=1.3528
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/logmsg.c?cvsroot=cvs&r1=1.108&r2=1.109
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/parseinfo.c?cvsroot=cvs&r1=1.90&r2=1.91
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/parseinfo.h?cvsroot=cvs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/sanity.sh?cvsroot=cvs&r1=1.1186&r2=1.1187
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3527
retrieving revision 1.3528
diff -u -b -r1.3527 -r1.3528
--- ChangeLog 28 Aug 2007 00:15:08 -0000 1.3527
+++ ChangeLog 28 Aug 2007 17:33:13 -0000 1.3528
@@ -1,3 +1,13 @@
+2007-08-28 Derek Price <address@hidden>
+
+ * logmsg.c (do_editor): Improve header block comment. Honor new
+ FirstVerifyLogErrorFatal option.
+ * parseinfo.c (new_config): Initialize new FirstVerifyLogErrorFatal
+ option.
+ (parse_config): Parse new FirstVerifyLogErrorFatal option.
+ * parseinfo.h (struct config): Declare storage for new option.
+ * sanity.sh (info-v*): Compensate for and test changes.
+
2007-08-27 Derek Price <address@hidden>
* commit.c (commit_fileproc): Move the do_editor & do_verify calls...
Index: logmsg.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/logmsg.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -b -r1.108 -r1.109
--- logmsg.c 28 Aug 2007 00:15:09 -0000 1.108
+++ logmsg.c 28 Aug 2007 17:33:13 -0000 1.109
@@ -407,6 +407,22 @@
process. This verification is meant to be run whether or not the user
included the -m attribute. unlike the do_editor function, this is
independant of the running of an editor for getting a message.
+
+ INPUTS
+ MESSAGEP A pointer to the string to be verified.
+ REPOSITORY The path to the CVS repository.
+ CHANGES The list of changed files in this directory.
+
+ GLOBALS
+ config->FirstVerifyLogErrorFatal
+
+ RETURNS
+ 0 for success.
+ 1 for non-system errors when CONFIG->FirstVerifyLogErrorFatal isn't set.
+
+ ERRORS
+ Exits with a fatal error on system errors and when
+ CONFIG->FirstVerifyLogErrorFatal is set.
*/
int
do_verify (char **messagep, const char *repository, List *changes)
@@ -438,7 +454,8 @@
free (data.fname);
errno = saved_errno;
- error (err == -1 ? 1: 0, err == -1 ? errno : 0,
+ error (err == -1 || config->FirstVerifyLogErrorFatal ? 1: 0,
+ err == -1 ? errno : 0,
"Message verification failed.");
return err;
}
Index: parseinfo.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/parseinfo.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -b -r1.90 -r1.91
--- parseinfo.c 28 Aug 2007 00:15:09 -0000 1.90
+++ parseinfo.c 28 Aug 2007 17:33:14 -0000 1.91
@@ -319,6 +319,7 @@
new->logHistory = xstrdup (ALL_HISTORY_REC_TYPES);
new->RereadLogAfterVerify = LOGMSG_REREAD_ALWAYS;
+ new->FirstVerifyLogErrorFatal = true;
new->UserAdminOptions = xstrdup ("k");
new->MaxCommentLeaderLength = 20;
#ifdef SERVER_SUPPORT
@@ -688,6 +689,9 @@
}
}
}
+ else if (strcmp (line, "FirstVerifyLogErrorFatal") == 0)
+ readBool (infopath, "FirstVerifyLogErrorFatal", p,
+ &retval->FirstVerifyLogErrorFatal);
else if (strcmp (line, "TmpDir") == 0)
{
if (retval->TmpDir) free (retval->TmpDir);
Index: parseinfo.h
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/parseinfo.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- parseinfo.h 24 Apr 2006 18:50:27 -0000 1.8
+++ parseinfo.h 28 Aug 2007 17:33:14 -0000 1.9
@@ -40,6 +40,12 @@
*/
int RereadLogAfterVerify;
+ /* Should the verifymsg failures cause CVS to exit instantly or should
+ * the script be run in each directory before the application quits a la
+ * commitinfo.
+ */
+ bool FirstVerifyLogErrorFatal;
+
char *UserAdminOptions;
/* Control default behavior of 'cvs import' (-X option on or off) in
Index: sanity.sh
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/sanity.sh,v
retrieving revision 1.1186
retrieving revision 1.1187
diff -u -b -r1.1186 -r1.1187
--- sanity.sh 28 Aug 2007 00:15:10 -0000 1.1186
+++ sanity.sh 28 Aug 2007 17:33:14 -0000 1.1187
@@ -20429,11 +20429,9 @@
echo "^first-dir\\(/\\|\$\\) ${TESTDIR}/vscript %l %{sV}" >>verifymsg
echo "^missing-script\$ ${TESTDIR}/bogus %l" >>verifymsg
echo "^missing-var\$ ${TESTDIR}/vscript %l \${=Bogus}" >>verifymsg
+ echo FirstVerifyLogErrorFatal=false >>config
# first test the directory independant verifymsg
- dotest info-v1 "${testcvs} -q ci -m add-verification" \
-"$CVSROOT_DIRNAME/CVSROOT/verifymsg,v <-- verifymsg
-new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
-$SPROG commit: Rebuilding administrative file database"
+ dotest info-v1 "$testcvs -Q ci -m add-verification"
cd ../first-dir
echo line2 >>file1
@@ -20449,6 +20447,17 @@
$SPROG commit: Message verification failed\.
$SPROG \[commit aborted\]: correct above errors first!"
+ cd ../CVSROOT
+ echo FirstVerifyLogErrorFatal=true >>config
+ dotest info-v2c-init "$testcvs -Q ci -mreconfigure"
+
+ cd ../first-dir
+ echo line3 >>file1
+ dotest_fail info-v2c "$testcvs -q ci -m bogus" \
+"vscript $tempname file1 1\.5
+No BugId found\.
+$SPROG \[commit aborted\]: Message verification failed\."
+
cat >${TESTDIR}/comment.tmp <<EOF
BugId: 42
and many more lines after it
@@ -20467,8 +20476,7 @@
"${testcvs} import -m bogus first-dir/another x y" \
"vscript $tempname - Imported sources NONE
No BugId found\.
-$SPROG import: Message verification failed\.
-$SPROG \[import aborted\]: correct above errors first!"
+$SPROG \[import aborted\]: Message verification failed\."
# now verify that directory dependent verifymsgs work
dotest info-v5 \
@@ -20499,8 +20507,7 @@
"${testcvs} import -m bogus first-dir/yet-another/and-another x
y" \
"vscript2 $tempname - Imported sources NONE
$CVSROOT_DIRNAME/first-dir/yet-another/and-another
-$SPROG import: Message verification failed\.
-$SPROG \[import aborted\]: correct above errors first!"
+$SPROG \[import aborted\]: Message verification failed\."
else
dotest info-v6 \
"${testcvs} import -m bogus first-dir/yet-another/and-another x
y" \
@@ -20518,15 +20525,12 @@
# argument does not exist.
dotest_fail info-v7 "$testcvs import -m bogus missing-script x y" \
"$SPROG import: cannot exec $TESTDIR/bogus: No such file or directory
-$SPROG import: Message verification failed\.
-$SPROG \[import aborted\]: correct above errors first!" \
-"$SPROG import: Message verification failed\.
-$SPROG \[import aborted\]: correct above errors first!"
+$SPROG \[import aborted\]: Message verification failed\." \
+"$SPROG \[import aborted\]: Message verification failed\."
dotest_fail info-v8 "$testcvs import -m bogus missing-var x y" \
"$SPROG import: verifymsg:4: no such user variable \${=Bogus}
-$SPROG import: Message verification failed\.
-$SPROG \[import aborted\]: correct above errors first!"
+$SPROG \[import aborted\]: Message verification failed\."
rm file2
cd ..
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Cvs-cvs] ccvs/src ChangeLog logmsg.c parseinfo.c parsein...,
Derek Robert Price <=