Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/rcsparser.tcl part of check-in [1527954d87] - Added more checks to the RCS parser to detect bogus symbol names and problematic log messages. Added ability to rewind back to the beginning of the last recognized token for a nicer positioned error message. by aku on 2007-10-23 04:32:06. [view]

To:

File tools/cvs2fossil/lib/rcsparser.tcl part of check-in [38b967dcf5] - Merge aku's CVS import changes into the main line. Fix a small bug in diff.c. by drh on 2007-11-17 00:29:42. Also file tools/cvs2fossil/lib/rcsparser.tcl part of check-in [fa643aa91d] - Disabled check for control characters in the log message. Allowing this for the moment, lets see if we run into trouble later on. Further reworked the check of symbol names, disallow forward slashs only at end. Found legal tags containing forward slashs in the middle. by aku on 2007-10-24 07:54:01. [view]

@@ -77,9 +77,12 @@
 
     proc Symbols {} {
 	RequiredLiteral symbols
 	while {[Ident -> symbol]} {
-	    if {![regexp {^\d*[^/,.:;@$]([^/,.:;@$]*\d*)*$} $symbol]} {
+	    if {
+		![regexp {^\d*[^,.:;@$]([^,.:;@$]*\d*)*$} $symbol] ||
+		[string match */ $symbol]
+	    } {
 		Rewind
 		Bad {symbol name}
 	    }
 	    RequiredNumber -> rev
@@ -221,10 +224,10 @@
 	while {[OptionalNumber -> rev]} {
 	    RequiredLiteral log
 	    RequiredString      -> cmsg
 	    if {[regexp {[\000-\010\013\014\016-\037]} $cmsg]} {
-		Rewind
-		Bad "log message for $rev contains at least one control character"
+		#Rewind
+		#Bad "log message for $rev contains at least one control character"
 	    }
 
 	    RequiredLiteral text
 	    RequiredStringRange -> delta