[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/src ChangeLog import.c sanity.sh [cvs1-11-x-branch]
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/src ChangeLog import.c sanity.sh [cvs1-11-x-branch] |
Date: |
Fri, 15 Jun 2007 20:55:07 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Branch: cvs1-11-x-branch
Changes by: Derek Robert Price <dprice> 07/06/15 20:55:05
Modified files:
src : ChangeLog import.c sanity.sh
Log message:
* import.c (import): Check more carefully for files and directories
named "CVS".
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&only_with_tag=cvs1-11-x-branch&r1=1.2336.2.482&r2=1.2336.2.483
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/import.c?cvsroot=cvs&only_with_tag=cvs1-11-x-branch&r1=1.133.4.18&r2=1.133.4.19
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/sanity.sh?cvsroot=cvs&only_with_tag=cvs1-11-x-branch&r1=1.752.2.209&r2=1.752.2.210
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.2336.2.482
retrieving revision 1.2336.2.483
diff -u -b -r1.2336.2.482 -r1.2336.2.483
--- ChangeLog 23 May 2007 18:53:19 -0000 1.2336.2.482
+++ ChangeLog 15 Jun 2007 20:55:02 -0000 1.2336.2.483
@@ -1,3 +1,8 @@
+2007-06-15 Derek Price <address@hidden>
+
+ * import.c (import): Check more carefully for files and directories
+ named "CVS".
+
2007-05-22 Larry Jones <address@hidden>
* rcs.c (RCS_fully_parse): Include revision in error message.
Index: import.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/import.c,v
retrieving revision 1.133.4.18
retrieving revision 1.133.4.19
diff -u -b -r1.133.4.18 -r1.133.4.19
--- import.c 1 Mar 2007 21:00:50 -0000 1.133.4.18
+++ import.c 15 Jun 2007 20:55:03 -0000 1.133.4.19
@@ -162,15 +162,22 @@
* Could abstract this to valid_module_path, but I don't think we'll need
* to call it from anywhere else.
*/
- if ((cp = strstr(argv[0], "CVS")) && /* path contains "CVS" AND ... */
- ((cp == argv[0]) || ISDIRSEP(*(cp-1))) && /* /^CVS/ OR m#/CVS# AND ...
*/
- ((*(cp+3) == '\0') || ISDIRSEP(*(cp+3))) /* /CVS$/ OR m#CVS/# */
+ /* for each "CVS" in path... */
+ cp = argv[0];
+ while (cp = strstr(cp, "CVS"))
+ {
+ if ( /* /^CVS/ OR m#/CVS#... */
+ (cp == argv[0] || ISDIRSEP(*(cp-1)))
+ /* ...AND /CVS$/ OR m#CVS/# */
+ && (*(cp+3) == '\0' || ISDIRSEP(*(cp+3)))
)
{
error (0, 0,
"The word `CVS' is reserved by CVS and may not be used");
error (1, 0, "as a directory in a path or as a file name.");
}
+ cp += 3;
+ }
for (i = 1; i < argc; i++) /* check the tags for validity */
{
Index: sanity.sh
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/sanity.sh,v
retrieving revision 1.752.2.209
retrieving revision 1.752.2.210
diff -u -b -r1.752.2.209 -r1.752.2.210
--- sanity.sh 7 May 2007 13:14:28 -0000 1.752.2.209
+++ sanity.sh 15 Jun 2007 20:55:03 -0000 1.752.2.210
@@ -8657,7 +8657,11 @@
mkdir import-CVS
cd import-CVS
touch file1 file2 file3
- dotest_fail import-CVS-1 "$testcvs import CVS vtag rtag" \
+ dotest_fail import-CVS-1 "$testcvs import -mimport CVS vtag rtag" \
+"$PROG import: The word \`CVS' is reserved by CVS and may not be used
+$PROG \[import aborted\]: as a directory in a path or as a file name\."
+ dotest_fail import-CVS-1b \
+"$testcvs import -mimport CVS-/CVS vtag rtag" \
"$PROG import: The word \`CVS' is reserved by CVS and may not be used
$PROG \[import aborted\]: as a directory in a path or as a file name\."
mkdir sdir
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Cvs-cvs] ccvs/src ChangeLog import.c sanity.sh [cvs1-11-x-branch],
Derek Robert Price <=