(none) jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 03 Oct 2011 17:31:27 +0100
branchjv
changeset 17878 dc6fef4c42b1
parent 17877 55e81c704074
child 17879 4ed4eb60a67e
(none)
Class.st
Metaclass.st
--- a/Class.st	Mon Oct 03 11:58:18 2011 +0100
+++ b/Class.st	Mon Oct 03 17:31:27 2011 +0100
@@ -1725,10 +1725,11 @@
      as this class has been likely compiled from a source checked out
      using returned source code manager"
 
+    | revisionFromMethod |
+
     revision ifNil:[^self sourceCodeManager].
 
     AbstractSourceCodeManager availableManagers do:[:mgr|
-        | revisionFromMethod |
 
         revisionFromMethod := self 
             perform: mgr nameOfVersionMethodInClasses
@@ -1739,15 +1740,25 @@
         ]
     ].
 
+    "Compatibility: try #version"
+    revisionFromMethod := self perform:#version ifNotUnderstood:[nil].
+    revision = revisionFromMethod ifTrue:[
+        ^CVSSourceCodeManager
+    ].
+
     "binary revision is not nil and we haven't found source code manager.
      This may happen when (i) given source code manager is not available
      or (ii) source version methods are somehow corrupted.
 
      Let's be strict about it for now and throw and error. More relaxed
-     version may return nil or configured source code manager"
-
-    self error:'Cannot find source code manager for source access ' ,
-               ' (manager yer not loaded or version methods corrupted)'
+     version may simply return nil"
+
+"/    self error:'Cannot find source code manager for source access ' ,
+"/               '(manager yer not loaded or version methods corrupted)'
+"/         mayProceed: true.
+
+    ^nil
+
 
     "
         Object sourceCodeManager
@@ -5439,5 +5450,5 @@
 !
 
 version_SVN
-    ^ '$Id: Class.st 10703 2011-10-01 12:52:14Z vranyj1 $'
+    ^ '$Id: Class.st 10710 2011-10-03 16:31:27Z vranyj1 $'
 ! !
--- a/Metaclass.st	Mon Oct 03 11:58:18 2011 +0100
+++ b/Metaclass.st	Mon Oct 03 17:31:27 2011 +0100
@@ -877,6 +877,14 @@
     "Created: / 01-07-2011 / 10:55:39 / cg"
 !
 
+sourceCodeManagerForSourceAccess
+
+    ^ myClass sourceCodeManagerForSourceAccess
+
+    "Modified: / 01-04-1997 / 14:36:31 / stefan"
+    "Created: / 03-10-2011 / 15:37:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 sourceFileSuffix
     ^ self programmingLanguage sourceFileSuffix
 
@@ -907,7 +915,7 @@
 !
 
 version_SVN
-    ^ '$Id: Metaclass.st 10700 2011-09-29 15:44:37Z vranyj1 $'
+    ^ '$Id: Metaclass.st 10710 2011-10-03 16:31:27Z vranyj1 $'
 ! !
 
 Metaclass initialize!