#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Thu, 12 Jan 2017 23:03:02 +0100
changeset 4184 9827571f14a0
parent 4183 4963225764b6
child 4187 817351b466fd
child 4194 6fcb7a598b44
#BUGFIX by cg class: CVSSourceCodeManager changed: #checkForExistingContainer:inModule:directory: must catch CVS errors here
CVSSourceCodeManager.st
--- a/CVSSourceCodeManager.st	Tue Jan 03 14:40:33 2017 +0100
+++ b/CVSSourceCodeManager.st	Thu Jan 12 23:03:02 2017 +0100
@@ -3155,27 +3155,31 @@
         errorStream := '' writeStream.
         outputStream := '' writeStream.
         
-        ret := self 
-                    executeCVSCommand:cmd , fullName 
-                    module:moduleDir 
-                    "/ cg; cannot do it in current dir, in case it contains a CVS subDirectory,
-                    "/ with a different CVSRoot in its CVS/Root file ...
-                    "/ cvs would complain then.
-                    inDirectory:(tempDir pathName) 
-                    log:false
-                    outputTo:outputStream
-                    errorTo:errorStream.
-
-        "cannot check for exit status starting at cvs 1.11.5, because an exit status 0
-         is returned even if the file does not exist"
-
-        "But: if there is any output, the command failed and the container does not exist"
-        "/ cg: read comment above.
-        ret2 := errorStream size == 0.
-        ret2 ifFalse:[
-            ret2 := (errorStream contents asCollectionOfLines 
-                        reject:[:l | l isBlank or:[(l includesString:'WARNING:')] ]) size == 0 
-        ].
+        SourceCodeManagerError handle:[:ex |
+            ^ false.
+        ] do:[    
+            ret := self 
+                        executeCVSCommand:cmd , fullName 
+                        module:moduleDir 
+                        "/ cg; cannot do it in current dir, in case it contains a CVS subDirectory,
+                        "/ with a different CVSRoot in its CVS/Root file ...
+                        "/ cvs would complain then.
+                        inDirectory:(tempDir pathName) 
+                        log:false
+                        outputTo:outputStream
+                        errorTo:errorStream.
+    
+            "cannot check for exit status starting at cvs 1.11.5, because an exit status 0
+             is returned even if the file does not exist"
+
+            "But: if there is any output, the command failed and the container does not exist"
+            "/ cg: read comment above.
+            ret2 := errorStream size == 0.
+            ret2 ifFalse:[
+                ret2 := (errorStream contents asCollectionOfLines 
+                            reject:[:l | l isBlank or:[(l includesString:'WARNING:')] ]) size == 0 
+            ].
+        ]
     ] ensure:[
         tempDir recursiveRemove.
     ].