CVSSourceCodeManager.st
changeset 4454 fdd347565a6c
parent 4435 96b57ec6ddb9
child 4459 996c5e249b27
--- a/CVSSourceCodeManager.st	Sun Jul 07 23:42:57 2019 +0200
+++ b/CVSSourceCodeManager.st	Sun Jul 07 23:43:42 2019 +0200
@@ -4814,7 +4814,7 @@
 
 revisionLogOf:clsOrNil
     fromRevision:firstRevOrNil toRevision:lastRevOrNil numberOfRevisions:numRevisionsOrNil
-    fileName:classFileName directory:packageDirOrNil module:moduleDir
+    fileName:classFileName directory:packageDirOrNil module:moduleDirOrNil
 
     "return info about the repository container and
      (part of) the revisionlog as a collection of revision entries.
@@ -4855,11 +4855,11 @@
             Attention: if state = 'dead' that revision is no longer valid.
         "
 
-    |tempDir fullName modulePath inStream inHeaderInfo atEnd line idx
+    |tempDir tempDirToRemove fullName modulePath inStream inHeaderInfo atEnd line idx
      info record revisionRecords s headerOnly msg selectedRevisions|
 
     self use_rlog ifFalse:[
-        tempDir := self createTempDirectory:nil forModule:nil.
+        tempDir := tempDirToRemove := self createTempDirectory:nil forModule:nil.
         tempDir isNil ifTrue:[
             ('CVSSourceCodeManager [error]: no tempDir - cannot extract log') errorPrintCR.
             ^ nil.
@@ -4870,19 +4870,23 @@
         |cmd revArg|
 
         packageDirOrNil isEmptyOrNil ifTrue:[
-            modulePath := moduleDir
+            modulePath := moduleDirOrNil
         ] ifFalse:[
-            modulePath :=  moduleDir , '/' , packageDirOrNil.
+            modulePath := moduleDirOrNil , '/' , packageDirOrNil.
         ].
         classFileName isNil ifTrue:[
-            fullName :=  modulePath , '/' , (clsOrNil classFilename).
+            fullName := modulePath , '/' , (clsOrNil classFilename).
         ] ifFalse:[    
-            fullName :=  modulePath , '/' , classFileName.
+            modulePath isNil ifTrue:[
+                fullName := classFileName asFilename pathName.
+            ] ifFalse:[    
+                fullName := modulePath , '/' , classFileName.
+            ].
         ].
         
         self use_rlog ifFalse:[
             self createEntryFor:fullName
-                 module:moduleDir
+                 module:moduleDirOrNil
                  in:(tempDir construct:modulePath)
                  revision:'1.1'
                  date:'dummy'
@@ -4920,15 +4924,21 @@
         ].
         self activityNotification:msg,'...'.
 
-        self use_rlog ifTrue:[
+        (self use_rlog and:[moduleDirOrNil notNil]) ifTrue:[
             cmd := ('rlog ' , revArg , ' ' , fullName).
         ] ifFalse:[
-            cmd := ('log ' , revArg , ' ' , fullName).
+            fullName asFilename isAbsolute ifTrue:[
+                tempDir := fullName asFilename directory pathName.
+                tempDirToRemove := nil.
+                cmd := ('log ' , revArg , ' ' , fullName asFilename baseName).
+            ] ifFalse:[    
+                cmd := ('log ' , revArg , ' ' , fullName).
+            ].
         ].
 
         inStream := self
-                        executeCVSCommand:('rlog ' , revArg , ' ' , fullName)
-                        module:moduleDir
+                        executeCVSCommand:cmd
+                        module:moduleDirOrNil
                         inDirectory:tempDir
                         log:true
                         pipe:true.
@@ -5030,11 +5040,11 @@
     ] ensure:[
         inStream notNil ifTrue:[inStream close].
 
-        tempDir notNil ifTrue:[
+        tempDirToRemove notNil ifTrue:[
             OsError handle:[:ex |
-                ('CVSSourceCodeManager [warning]: could not remove tempDir ', tempDir pathName) infoPrintCR.
+                ('CVSSourceCodeManager [warning]: could not remove tempDir ', tempDirToRemove pathName) infoPrintCR.
             ] do:[
-                tempDir recursiveRemove
+                tempDirToRemove recursiveRemove
             ].
         ].
         self activityNotification:nil.
@@ -5053,12 +5063,13 @@
      SourceCodeManager revisionLogOf:Array fromRevision:nil toRevision:'1.3'
      SourceCodeManager revisionLogOf:Array fromRevision:nil toRevision:nil
      SourceCodeManager revisionLogOf:Array fromRevision:0 toRevision:0
+     SourceCodeManager revisionLogOfFile:'../../libbasic/Array.st' fromRevision:0 toRevision:0
     "
 
     "Created: / 16-11-1995 / 13:25:30 / cg"
     "Modified: / 29-01-1997 / 16:51:30 / stefan"
     "Modified: / 06-12-2017 / 11:46:41 / cg"
-    "Modified: / 28-05-2019 / 13:56:39 / Claus Gittinger"
+    "Modified: / 07-07-2019 / 23:38:57 / Claus Gittinger"
 !
 
 revisionLogOfPackageInDirectory:packageDir module:moduleDir
@@ -5265,7 +5276,6 @@
     |tempDir modulePath inStream info|
 
     tempDir := nil.         "use the current directory"
-
     self use_rlog ifFalse:[
          "/ Uses 'cvs status' - rlog seems not to work
         ^ nil.
@@ -5276,6 +5286,10 @@
     ] ifFalse:[
         modulePath :=  module , '/' , packageDir. 
     ].
+    self activityNotification:('CVS: Fetching revision infos for %1%2'
+                                    bindWith:modulePath
+                                    with:(' from ',(aDateOrNilForNewest ? 'newest'))).
+
     info := [
         |revisionUsed dateSelector searchFor|
 
@@ -5323,7 +5337,7 @@
 
     "Created: / 12-10-2006 / 10:12:59 / cg"
     "Modified: / 18-05-2018 / 12:50:53 / Stefan Vogel"
-    "Modified: / 02-07-2018 / 13:53:19 / Claus Gittinger"
+    "Modified: / 07-07-2019 / 20:19:08 / Claus Gittinger"
 !
 
 revisionsInModule:module directory:packageDir taggedAs:symbolicName