CVSSourceCodeManager.st
changeset 1407 f8314a9474cf
parent 1406 725a5b2866f2
child 1408 762e5320c296
--- a/CVSSourceCodeManager.st	Tue Dec 14 15:59:50 2004 +0100
+++ b/CVSSourceCodeManager.st	Wed Dec 15 11:32:43 2004 +0100
@@ -87,7 +87,7 @@
     [class variables:]
         CVSTempDir      <String | nil>  where a directory tree is
                                         generated temporarily for checkin/checkout
-                                        (default is nil -> current dir)
+                                        (default is nil -> systems tmp-dir)
 
         CVSRoot         <String>        the CVS root. Imported from the
                                         CVSROOT shell variable.
@@ -201,24 +201,16 @@
 
     DisabledModules := nil.
 
-    "/ where a temporary directory hierarchy is
-    "/ created for checkin/checkout
-
-    CVSTempDir ifNil:[ 
-        CVSTempDir := Filename tempDirectory pathName 
-    ].
-
     "/
     "/ if CVSROOT is non-empty and both cvs and co are available
     "/ as commands, assume this system uses a cvs source code management.
     "/
     CVSRoot ifNil:[
-        CVSRoot := OperatingSystem getEnvironment:'CVSROOT'
-    ].
-
-    CVSRoot ifNil:[
-        "disabled since $CVSROOT is not set"
-        ^ self
+        CVSRoot := OperatingSystem getEnvironment:'CVSROOT'.
+        CVSRoot ifNil:[
+            "disabled since $CVSROOT is not set"
+            ^ self
+        ].
     ].
 
     OperatingSystem isMSDOSlike ifTrue:[
@@ -384,6 +376,26 @@
     ].
 !
 
+cvsTmpDirectory
+    "return the name of the tmp repository.
+     Thats the directory, where temporary files are created for checkin/checkout.
+     If nil, the systems default tempDirectory is used."
+
+    ^ (CVSTempDir ? Filename tempDirectory pathName)
+
+    "
+     CVSTempDir := nil   
+    "
+!
+
+cvsTmpDirectory:aPathNameString
+    "set the name of the tmp repository.
+     Thats the directory, where temporary files are created for checkin/checkout.
+     If nil, the systems default tempDirectory is used."
+
+    CVSTempDir := aPathNameString
+!
+
 repositoryName
     "return the name of the global repository.
      This is used, if no per-module repository is defined."
@@ -740,7 +752,7 @@
     |tempdir dir|
 
     "/ if CVSTempDir isNil, use current.
-    tempdir := Filename newTemporaryIn:CVSTempDir.
+    tempdir := Filename newTemporaryIn:(self cvsTmpDirectory).
     tempdir exists ifTrue:[
         tempdir recursiveRemove.
     ].
@@ -4465,7 +4477,7 @@
 !CVSSourceCodeManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.288 2004-12-14 14:59:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.289 2004-12-15 10:32:43 penk Exp $'
 ! !
 
 CVSSourceCodeManager initialize!