CVSSourceCodeManager.st
changeset 3820 f4d986c2fa4b
parent 3817 fce0d1006c04
child 3821 b2b15311c3cf
--- a/CVSSourceCodeManager.st	Sun Mar 01 14:29:17 2015 +0100
+++ b/CVSSourceCodeManager.st	Sun Mar 01 23:07:15 2015 +0100
@@ -827,6 +827,19 @@
         createLocalDirectory:packageDir 
         inModule:moduleDir 
         with:'.cvsignore'
+        andDefaultContents:
+'makefile
+*.STH
+*.@@@
+ntLibInit.c
+*.res
+*.RES
+*.sc
+*.c
+objbc
+objvc
+objmingw
+'.
 
     "
      self createLocalDirectory:'libbasic' inModule:'stx'
@@ -842,6 +855,26 @@
      given file there.
      Return the name of a temporary directory containing the package, or nil"
 
+    self 
+        createLocalDirectory:packageDir 
+        inModule:moduleDir 
+        with:fileToCheckout 
+        andDefaultContents:nil
+
+    "
+     self createLocalDirectory:'libbasic' inModule:'stx'
+    "
+
+    "Modified: / 26-07-1999 / 17:43:35 / stefan"
+    "Created: / 18-01-2000 / 20:55:52 / cg"
+    "Modified: / 16-07-2013 / 19:49:26 / cg"
+!
+
+createLocalDirectory:packageDir inModule:moduleDir with:fileToCheckout andDefaultContents:defaultContents
+    "create a local working directory for module/package, and checkout the
+     given file there.
+     Return the name of a temporary directory containing the package, or nil"
+
     |path absolutePath tempdir unixPath|
 
     path := (moduleDir asFilename construct:packageDir) construct:fileToCheckout.
@@ -867,11 +900,12 @@
 
             absolutePath := tempdir construct:path.
             absolutePath directory recursiveMakeDirectory.
+
             "now create the file"
-            (absolutePath writeStream close) isNil ifTrue:[
-                ('CVSSourceCodeManager [error]: cannot create dummy') errorPrintCR.
-                tempdir recursiveRemove.
-                ^ nil.
+            absolutePath writingFileDo:[:s |
+                defaultContents notNil ifTrue:[
+                    s nextPutAll:s.
+                ].
             ].
 
             "now create the dummy file in the repository"
@@ -1496,7 +1530,7 @@
     rightPart := rightPart copyFrom:idx+1.
 
     "/ originalVersionString:
-    "/      '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.501 2015-03-01 01:10:03 cg Exp $'
+    "/      '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.502 2015-03-01 22:07:15 cg Exp $'
     "/ leftPart:
     "/      '$Header: /cvs/stx/stx/goodies/refactoryBrowser/lint/RBLiteralArrayContainsCommaRule.st,v'
     "/ dateAndTimePart:
@@ -5573,11 +5607,11 @@
 !CVSSourceCodeManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.501 2015-03-01 01:10:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.502 2015-03-01 22:07:15 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.501 2015-03-01 01:10:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.502 2015-03-01 22:07:15 cg Exp $'
 ! !