Class.st
changeset 740 b647ebdc25ad
parent 738 576a41a6ab28
child 741 c6b4e7f026be
equal deleted inserted replaced
739:63566c9b691a 740:b647ebdc25ad
   251 
   251 
   252 !Class class methodsFor:'helpers'!
   252 !Class class methodsFor:'helpers'!
   253 
   253 
   254 revisionInfoFromString:aString
   254 revisionInfoFromString:aString
   255     "return a dictionary filled with revision info.
   255     "return a dictionary filled with revision info.
   256      This extracts the relevant info from aString."
   256      This extracts the relevant info from aString.
       
   257      For now, this is a bad design - should always ask the
       
   258      SCM to extract the parts (knowing about the details of RCS headers
       
   259      here is a bad design ...)"
   257 
   260 
   258     |words info nm mgr|
   261     |words info nm mgr|
   259 
   262 
   260     info := IdentityDictionary new.
   263     info := IdentityDictionary new.
   261     words := aString asCollectionOfWords.
   264     words := aString asCollectionOfWords.
   273 	info at:#repositoryPathName put:nm.
   276 	info at:#repositoryPathName put:nm.
   274 	(nm endsWith:',v') ifTrue:[
   277 	(nm endsWith:',v') ifTrue:[
   275 	    nm := nm copyWithoutLast:2
   278 	    nm := nm copyWithoutLast:2
   276 	].
   279 	].
   277 	info at:#fileName put:nm asFilename baseName.
   280 	info at:#fileName put:nm asFilename baseName.
   278 	info at:#revision put:(words at:3).
   281 	(words at:3) = '$' ifFalse:[
   279 	info at:#date put:(words at:4).
   282 	    info at:#revision put:(words at:3).
   280 	info at:#time put:(words at:5).
   283 	    info at:#date put:(words at:4).
   281 	info at:#user put:(words at:6).
   284 	    info at:#time put:(words at:5).
   282 	info at:#state put:(words at:7).
   285 	    info at:#user put:(words at:6).
       
   286 	    info at:#state put:(words at:7).
       
   287 	].
   283 	^ info
   288 	^ info
   284     ].
   289     ].
   285     ((words at:1) = '$Revision:') ifTrue:[
   290     ((words at:1) = '$Revision:') ifTrue:[
   286 	info at:#revision put:(words at:2).
   291 	info at:#revision put:(words at:2).
   287 	^ info
   292 	^ info
  3367 ! !
  3372 ! !
  3368 
  3373 
  3369 !Class class methodsFor:'documentation'!
  3374 !Class class methodsFor:'documentation'!
  3370 
  3375 
  3371 version
  3376 version
  3372     ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.106 1995-12-11 17:36:01 cg Exp $'
  3377     ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.107 1995-12-12 19:12:59 cg Exp $'
  3373 ! !
  3378 ! !
  3374 Class initialize!
  3379 Class initialize!