Class.st
changeset 685 626b477e5be3
parent 671 53de87163ad5
child 686 5cde213f9093
--- a/Class.st	Wed Dec 06 15:19:34 1995 +0100
+++ b/Class.st	Thu Dec 07 11:15:13 1995 +0100
@@ -787,31 +787,54 @@
     "Created: 29.10.1995 / 19:42:15 / cg"
 !
 
+binaryRevision
+    "return the revision-ID from which the class was stc-compiled;
+     nil if its an autoloaded or filedIn class.
+     If a classes binary is up-to-date w.r.t. the source repository,
+     the returned string is the same as the one returned by #revision."
+
+    ^ revision
+
+    "
+     Object binaryRevision
+    "
+
+    "
+     to find all classes which are not up-to-date:
+
+     |classes|
+
+     classes := Smalltalk allClasses 
+		    select:[:cls | cls binaryRevision notNil and:[cls binaryRevision ~= cls revision]].
+     SystemBrowser browseClasses:classes title:'classes which are not up-to-date'
+    "
+
+    "Created: 7.12.1995 / 10:58:47 / cg"
+!
+
 revision
     "return the revision-ID of the class which corresponds to the
-     rcs-id of the source from which this class was compiled.
-     This is always valid for stc-compiled classes which include a version method,
-     since stc extracts this info and places it into an instance variable.
-     Alternatively, the code below tries to extract it from the revisionString directly,
-     this is used with filed-In classes (non stc-compiled).
+     rcs-id of the source to which this class is equivalent.
+     Initially, this is the same as #binaryRevision; however, once changes have
+     been checked into a source repository, the binary continues to remain based upon
+     the old revision, while logically, the class has the new (checked-in) revision.
      To check if a source corresponds to a compiled binary, compare this 
-     ID with the one found in the version-methods comment."
+     ID with the one returned by #binaryRevision."
 
     |info|
 
-    revision notNil ifTrue:[ ^ revision].
     info := self revisionInfo.
     info notNil ifTrue:[
 	^ info at:#revision
     ].
-    ^ nil
+    ^ revision
 
     "
      Object revision 
     "
 
     "Created: 11.11.1995 / 14:27:20 / cg"
-    "Modified: 15.11.1995 / 14:41:43 / cg"
+    "Modified: 7.12.1995 / 10:54:53 / cg"
 !
 
 revision:aString
@@ -3360,5 +3383,5 @@
 !Class class methodsFor:'documentation'!
 
 version
-^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.94 1995-12-04 10:21:00 cg Exp $'! !
+^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.95 1995-12-07 10:15:13 cg Exp $'! !
 Class initialize!