Class.st
branchjv
changeset 18076 17106b5b6cee
parent 18075 bd252c0beac9
child 18084 ab5b38bd8f81
--- a/Class.st	Tue Jul 16 14:00:13 2013 +0100
+++ b/Class.st	Fri Jul 19 23:41:31 2013 +0100
@@ -21,7 +21,7 @@
 	category:'Kernel-Classes'
 !
 
-Array subclass:#ArrayWithSequenceNumberValidation
+Array variableSubclass:#ArrayWithSequenceNumberValidation
 	instanceVariableNames:'sequenceNumber'
 	classVariableNames:''
 	poolDictionaries:''
@@ -141,7 +141,6 @@
 "
 ! !
 
-
 !Class class methodsFor:'accessing-flags'!
 
 tryLocalSourceFirst
@@ -190,7 +189,6 @@
     ^ UpdatingChanges
 ! !
 
-
 !Class class methodsFor:'creating new classes'!
 
 name:newName
@@ -298,7 +296,6 @@
     "Created: / 08-11-2010 / 16:08:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-
 !Class class methodsFor:'helpers'!
 
 nameWithoutPrefix:name
@@ -367,28 +364,32 @@
 
     lines := aMethodSourceString asCollectionOfLines.
     lines do:[:l |
-	|i|
-
-	i := l indexOfSubCollection:'$Header: '.
-	"JV @ 2009-12-13: Also search for '$Id: ' (because of SVN-only classes)"
-	i == 0 ifTrue:[
-	i := l indexOfSubCollection:'$Id: '].
-	i ~~ 0 ifTrue:[
-	    line := l copyFrom:i.
-	    i := line lastIndexOf:$$.
-	    i > 1 ifTrue:[
-		line := line copyTo:i.
-	    ].
-	    ^ line
-	]
+        |i|
+
+        i := l indexOfSubCollection:'$Header: '.
+        "JV @ 2009-12-13: Also search for '$Id: ' (because of SVN-only classes)"
+        i == 0 ifTrue:[
+        i := l indexOfSubCollection:'$Id: '].
+        "JV @ 2013-07-18: Also search for '$Changeset: ' (because of Mercurial-only classes)"
+        i == 0 ifTrue:[
+        i := l indexOfSubCollection:'$Changeset: '].
+
+        i ~~ 0 ifTrue:[
+            line := l copyFrom:i.
+            i := line lastIndexOf:$$.
+            i > 1 ifTrue:[
+                line := line copyTo:i.
+            ].
+            ^ line
+        ]
     ].
     ^ nil
 
     "Created: / 15-10-1996 / 18:57:57 / cg"
     "Modified: / 22-10-2008 / 20:29:50 / cg"
+    "Modified: / 19-07-2013 / 23:32:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-
 !Class class methodsFor:'misc'!
 
 template:aCategoryString
@@ -403,7 +404,6 @@
     "Created: / 19.6.1998 / 02:09:06 / cg"
 ! !
 
-
 !Class class methodsFor:'private'!
 
 flushSubclassInfo
@@ -440,7 +440,6 @@
     "Modified: / 06-12-2011 / 16:20:49 / cg"
 ! !
 
-
 !Class class methodsFor:'queries'!
 
 isBuiltInClass
@@ -454,6 +453,8 @@
 ! !
 
 
+
+
 !Class methodsFor:'Compatibility-Dolphin'!
 
 defaultCategoryForDolphinClasses
@@ -508,7 +509,6 @@
     "Modified: / 18.3.1999 / 18:16:11 / stefan"
 ! !
 
-
 !Class methodsFor:'Compatibility-ST/V and V''Age'!
 
 defaultCategoryForSTVorVAGEClasses
@@ -619,7 +619,6 @@
 	   category:(self defaultCategoryForSTVorVAGEClasses)
 ! !
 
-
 !Class methodsFor:'Compatibility-ST80'!
 
 classPool
@@ -2275,7 +2274,6 @@
     "Modified: / 18.3.1999 / 18:15:30 / stefan"
 ! !
 
-
 !Class methodsFor:'enumerating'!
 
 allPrivateClassesDo:aBlock
@@ -2315,7 +2313,6 @@
     self allPrivateClasses do:aBlock
 ! !
 
-
 !Class methodsFor:'fileIn interface'!
 
 primitiveDefinitions
@@ -2357,7 +2354,6 @@
     "Modified: 10.2.1996 / 12:47:28 / cg"
 ! !
 
-
 !Class methodsFor:'fileOut'!
 
 basicFileOutDefinitionOn:aStream withNameSpace:forceNameSpace
@@ -2908,7 +2904,6 @@
     "Modified: 8.1.1997 / 17:45:51 / cg"
 ! !
 
-
 !Class methodsFor:'fileOut-binary'!
 
 binaryFileOut
@@ -3008,7 +3003,6 @@
     "Created: / 29.12.1998 / 21:38:38 / cg"
 ! !
 
-
 !Class methodsFor:'fileOut-xml'!
 
 fileOutXML
@@ -3498,7 +3492,6 @@
     aStream nextPutAll:self name
 ! !
 
-
 !Class methodsFor:'private-accessing'!
 
 attributes
@@ -3669,7 +3662,6 @@
     "Created: / 28-04-2010 / 08:47:20 / cg"
 ! !
 
-
 !Class methodsFor:'private-changes management'!
 
 addChangeRecordForChangeCategory:category to:aStream
@@ -3782,7 +3774,6 @@
     "Modified: 9.11.1996 / 00:10:10 / cg"
 ! !
 
-
 !Class methodsFor:'queries'!
 
 canHaveExtensions
@@ -4077,7 +4068,6 @@
     "
 ! !
 
-
 !Class methodsFor:'renaming'!
 
 makePrivateIn:newOwner
@@ -4205,7 +4195,6 @@
     "Modified: / 31.7.1998 / 15:21:34 / cg"
 ! !
 
-
 !Class methodsFor:'signature checking'!
 
 classinstSizeFromSignature:aSignature
@@ -4307,7 +4296,6 @@
     "Created: 1.4.1997 / 15:23:24 / stefan"
 ! !
 
-
 !Class methodsFor:'source management'!
 
 binaryRevision
@@ -4411,11 +4399,11 @@
     |owner|
 
     (owner := self owningClass) notNil ifTrue:[^ owner findVersionMethod].
-    ^ self findVersionMethodOfManager:self sourceCodeManager
+    ^ self findVersionMethodOfManager:self sourceCodeManagerFromBinaryRevision
 
     "
      Smalltalk allClassesDo:[:cls |
-	Transcript show:cls name; show:' -> '; showCR:cls findVersionMethod
+        Transcript show:cls name; show:' -> '; showCR:cls findVersionMethod
      ].
 
      Number findVersionMethod
@@ -4425,6 +4413,7 @@
     "
 
     "Modified: / 19-04-2011 / 13:30:42 / cg"
+    "Modified: / 19-07-2013 / 22:11:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 findVersionMethodOfManager:aSourceCodemanagerOrNil
@@ -5388,7 +5377,6 @@
     "Created: / 16-08-2009 / 12:57:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
 ! !
 
-
 !Class::ArrayWithSequenceNumberValidation methodsFor:'accessing'!
 
 sequenceNumber
@@ -5399,7 +5387,6 @@
     sequenceNumber := something.
 ! !
 
-
 !Class::ArrayWithSequenceNumberValidation methodsFor:'checking'!
 
 checkIfValidFor:aSequenceNumber
@@ -5408,7 +5395,6 @@
     "Created: / 06-12-2011 / 16:01:16 / cg"
 ! !
 
-
 !Class::ClassAttributes class methodsFor:'documentation'!
 
 documentation
@@ -5420,7 +5406,6 @@
 "
 ! !
 
-
 !Class::ClassAttributes methodsFor:'accessing'!
 
 fGuid
@@ -5509,7 +5494,6 @@
     "Created: / 23-09-2011 / 10:23:26 / cg"
 ! !
 
-
 !Class::ClassAttributes methodsFor:'conversion'!
 
 fromSTCPrimitiveArray:anArray
@@ -5525,7 +5509,6 @@
     ].
 ! !
 
-
 !Class::SimulatedClassPool class methodsFor:'documentation'!
 
 documentation
@@ -5559,7 +5542,6 @@
 
 ! !
 
-
 !Class::SimulatedClassPool methodsFor:'accessing'!
 
 associationAt:aName
@@ -5639,14 +5621,12 @@
     ].
 ! !
 
-
 !Class::SimulatedClassPool methodsFor:'accessing-private'!
 
 setClass:aClass
     class := aClass
 ! !
 
-
 !Class::SimulatedClassPool::SimulatedVariableBinding class methodsFor:'documentation'!
 
 documentation
@@ -5655,7 +5635,6 @@
 "
 ! !
 
-
 !Class::SimulatedClassPool::SimulatedVariableBinding methodsFor:'queries'!
 
 isVariableBinding
@@ -5664,7 +5643,6 @@
     "Created: / 4.2.2000 / 00:27:20 / cg"
 ! !
 
-
 !Class class methodsFor:'documentation'!
 
 version
@@ -5675,6 +5653,11 @@
     ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.628 2013-07-12 13:56:43 cg Exp $'
 !
 
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+!
+
 version_SVN
     ^ '$ Id: Class.st 10643 2011-06-08 21:53:07Z vranyj1  $'
 ! !