CVSSourceCodeManager.st
changeset 4467 982a87cfa97d
parent 4459 996c5e249b27
child 4485 11de50dd8c35
--- a/CVSSourceCodeManager.st	Tue Jul 30 11:49:20 2019 +0200
+++ b/CVSSourceCodeManager.st	Wed Jul 31 17:09:37 2019 +0200
@@ -1057,7 +1057,8 @@
     "execute command and prepend cvs command name and global options.
      execute command in the dirArg directory.
      The doLog argument, if false suppresses a logEntry to be added
-     in the cvs log file (used when reading / extracting history)"
+     in the cvs log file (used when reading / extracting history).
+     sigh: returns either a stream (if doPipe == true) or a boolean otherwise."
 
     ^ self
         executeCVSCommand:cvsCommand
@@ -1078,7 +1079,8 @@
     "execute command and prepend cvs command name and global options.
      execute command in the dirArg directory (or the current directory if dirArg is nil).
      The doLog argument, if false suppresses a logEntry to be added
-     in the cvs log file (used when reading / extracting history)"
+     in the cvs log file (used when reading / extracting history).
+     sigh: returns either a stream (if doPipe == true) or a boolean otherwise."
 
     |command cvsRoot rslt ok pathOfDir errorString osProcess|
 
@@ -1167,6 +1169,8 @@
             SourceCodeManagerError raiseRequestErrorString:(errorString ? 'CVS Error').
         ].
     ].
+    "/ sigh: is either a stream (if doPipe == true)
+    "/ or a boolean otherwise.
     ^ rslt
 
     "Modified: / 23-04-1996 / 15:24:00 / stefan"
@@ -4946,10 +4950,12 @@
         (inStream isNil or:[inStream atEnd]) ifTrue:[
             ('CVSSourceCodeManager [error]: cannot open pipe to "cvs log" ', fullName) errorPrintCR.
             SourceCodeManagerError raiseRequestWith:'failed to open pipe to "cvs log"'.
+            inStream notNil ifTrue:[ inStream close ].
             ^ nil
         ].
 
         info := self readRevisionLogFromStream:inStream headerOnly:headerOnly numRevisions:numRevisionsOrNil.
+        inStream close.
 
 "/        "/
 "/        "/ read the command's pipe output and extract the container info