AbstractSourceCodeManager.st
changeset 4288 abe0dbd3fb66
parent 4284 74759f312989
child 4291 3abd839e1b7c
--- a/AbstractSourceCodeManager.st	Wed Dec 06 12:32:01 2017 +0100
+++ b/AbstractSourceCodeManager.st	Wed Dec 06 12:32:44 2017 +0100
@@ -2861,7 +2861,7 @@
 
     |log|
 
-    log := self revisionLogOf:nil numberOfRevisions:2 fileName:fileName directory:packageDir module:moduleDir.
+    log := self revisionLogOf:nil numberOfRevisions:1 fileName:fileName directory:packageDir module:moduleDir.
     log isNil ifTrue:[
         SourceCodeManagerError 
             raiseRequestWith:fileName
@@ -2875,7 +2875,7 @@
     "
 
     "Created: / 05-12-2017 / 01:16:09 / cg"
-    "Modified: / 05-12-2017 / 19:22:10 / cg"
+    "Modified: / 06-12-2017 / 11:47:02 / cg"
 !
 
 knownTagsFor:aClass
@@ -3036,6 +3036,41 @@
     "Modified (comment): / 23-12-2011 / 19:03:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+revisionForSymbolicName:tag class:cls fileName:classFileName directory:packageDir module:moduleDir
+    "given a tag, return the corresponding revision"
+
+    |partialLog symbolicNames|
+
+    partialLog := self
+        revisionLogOf:cls
+        numberOfRevisions:1
+        fileName:classFileName
+        directory:packageDir 
+        module:moduleDir.
+
+    partialLog notNil ifTrue:[
+        symbolicNames := partialLog at:#symbolicNames ifAbsent:[].
+        symbolicNames notNil ifTrue:[
+            ^ symbolicNames at:tag ifAbsent:nil
+        ].
+    ].
+    ^ nil.
+
+    "
+     CVSSourceCodeManager  
+        revisionForSymbolicName:'stable' 
+        class:Array fileName:'Array.st' 
+        directory:'libbasic' module:'stx' 
+
+     CVSSourceCodeManager  
+        revisionForSymbolicName:'stable' 
+        class:Array fileName:nil 
+        directory:'libbasic' module:'stx' 
+    "
+
+    "Created: / 06-12-2017 / 11:44:39 / cg"
+!
+
 revisionForTag:tagName inClass:aClass
     "retrieve the revision number associated to a particular tag/symbolic version.
      Nil if unknown"