Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_pcollar.tcl part of check-in [e288af3995] - Fluff: Renamed state methods use/reading/writing to usedb/use/extend for clarity. Updated all callers. Extended state module with code to dump the SQL statements it receives to a file for analysis. Extended the 'use' declarations of several passes. by aku on 2007-12-02 23:47:45. [view]

To:

File tools/cvs2fossil/lib/c2f_pcollar.tcl part of check-in [7208c7ac4d] - Changes to cvs2fossil to import tcllib CVS into fossil on Win32

* using ::file instead of file in snit methods to get the core file command * taking care of files that only differ in case in the Attic and the repo on case insensitive FS * passing platform specific

by mjanssen on 2008-01-28 23:57:27. [view]

@@ -97,9 +97,9 @@
 	# functionality of the pass.
 
 	set rbase [repository base?]
 	foreach project [repository projects] {
-	    set base [file join $rbase [$project base]]
+	    set base [::file join $rbase [$project base]]
 	    log write 1 collar "Scan $base"
 
 	    set traverse [fileutil::traverse %AUTO% $base \
 			      -prefilter [myproc FilterAtticSubdir $base]]
@@ -113,11 +113,12 @@
 
 		set usr [UserPath $rcs isattic]
 		if {[IsSuperceded $base $rcs $usr $isattic]} continue
 
+		# XXX Checkme: not sure if this will still fail in the case where a directory does conflict with a file XXX
 		if {
-		    [file exists      $base/$usr] &&
-		    [file isdirectory $base/$usr]
+		    [lsearch [glob -tail -types f -directory $base *] $usr] != -1 &&
+		    [lsearch [glob -tail -types d -directory $base *] $usr] != -1
 		} {
 		    trouble fatal "Directory name conflicts with filename."
 		    trouble fatal "Please remove or rename one of the following:"
 		    trouble fatal "    $base/$usr"
@@ -219,9 +220,11 @@
     proc IsSuperceded {base rcs usr isattic} {
 	::variable myignore
 
 	if {!$isattic}                   {return 0}
-	if {![file exists $base/$usr,v]} {return 0}
+
+	# use glob to account for case insensitive file systems
+	if {[lsearch [glob -tail -directory $base *] $usr,v] == -1} {return 0}
 
 	# We have a regular archive and an Attic archive refering to
 	# the same user visible file. Ignore the file in the Attic.
 	#