cvs-cvs
[Top][All Lists]
Advanced

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

[Cvs-cvs] ccvs ChangeLog NEWS src/ChangeLog src/import.c ...


From: Derek Robert Price
Subject: [Cvs-cvs] ccvs ChangeLog NEWS src/ChangeLog src/import.c ...
Date: Fri, 15 Jun 2007 21:04:59 +0000

CVSROOT:        /cvsroot/cvs
Module name:    ccvs
Changes by:     Derek Robert Price <dprice>     07/06/15 21:04:59

Modified files:
        .              : ChangeLog NEWS 
        src            : ChangeLog import.c sanity.sh 

Log message:
        Merge changes from 1.11.x.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/ChangeLog?cvsroot=cvs&r1=1.1351&r2=1.1352
http://cvs.savannah.gnu.org/viewcvs/ccvs/NEWS?cvsroot=cvs&r1=1.370&r2=1.371
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3514&r2=1.3515
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/import.c?cvsroot=cvs&r1=1.180&r2=1.181
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/sanity.sh?cvsroot=cvs&r1=1.1179&r2=1.1180

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/ChangeLog,v
retrieving revision 1.1351
retrieving revision 1.1352
diff -u -b -r1.1351 -r1.1352
--- ChangeLog   13 Jun 2007 01:23:37 -0000      1.1351
+++ ChangeLog   15 Jun 2007 21:04:58 -0000      1.1352
@@ -1,3 +1,7 @@
+2007-06-15  Derek Price  <address@hidden>
+
+       * NEWS: Note `cvs import CVS-/CVS' fix.
+
 2007-06-12  Mark D. Baushke  <address@hidden>
 
        [bug #17083]

Index: NEWS
===================================================================
RCS file: /cvsroot/cvs/ccvs/NEWS,v
retrieving revision 1.370
retrieving revision 1.371
diff -u -b -r1.370 -r1.371
--- NEWS        13 Jun 2007 01:23:37 -0000      1.370
+++ NEWS        15 Jun 2007 21:04:58 -0000      1.371
@@ -35,6 +35,9 @@
 
 BUG FIXES
 
+* `cvs import' makes more of an effort not to import paths containing files
+  and directories named "CVS".
+
 * The CVS server will no longer allow clients to run `cvs init'.
 
 * Applying diffs when checking out very old revisions has been reduced from an

Index: src/ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3514
retrieving revision 1.3515
diff -u -b -r1.3514 -r1.3515
--- src/ChangeLog       14 Jun 2007 00:18:42 -0000      1.3514
+++ src/ChangeLog       15 Jun 2007 21:04:58 -0000      1.3515
@@ -1,3 +1,9 @@
+2007-06-15  Derek Price  <address@hidden>
+
+       * import.c (import): Check more carefully for files and directories
+       named "CVS".
+       * sanity.sh (import-1b): Test for same.
+
 2007-06-13  Mark D. Baushke  <address@hidden>
 
        * parseinfo.c (free_config): Avoid double free of

Index: src/import.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/import.c,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -b -r1.180 -r1.181
--- src/import.c        30 May 2007 23:20:43 -0000      1.180
+++ src/import.c        15 Jun 2007 21:04:59 -0000      1.181
@@ -195,15 +195,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]) || ISSLASH (*(cp-1))) && /* /^CVS/ OR m#/CVS# AND ... 
*/
-        ((*(cp+3) == '\0') || ISSLASH (*(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] || ISSLASH (*(cp-1)))
+           /* ...AND /CVS$/ OR m#CVS/# */
+           && (*(cp+3) == '\0' || ISSLASH (*(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: src/sanity.sh
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/sanity.sh,v
retrieving revision 1.1179
retrieving revision 1.1180
diff -u -b -r1.1179 -r1.1180
--- src/sanity.sh       14 Jun 2007 00:18:43 -0000      1.1179
+++ src/sanity.sh       15 Jun 2007 21:04:59 -0000      1.1180
@@ -10538,7 +10538,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" \
+"$CPROG import: The word \`CVS' is reserved by CVS and may not be used
+$CPROG \[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" \
 "$CPROG import: The word \`CVS' is reserved by CVS and may not be used
 $CPROG \[import aborted\]: as a directory in a path or as a file name\."
          mkdir sdir




reply via email to

[Prev in Thread] Current Thread [Next in Thread]