handle partially corrupted version strings
(i.e. : fileName $)
--- a/Class.st Wed Dec 11 16:01:21 1996 +0100
+++ b/Class.st Thu Dec 12 14:39:08 1996 +0100
@@ -424,55 +424,57 @@
words := aString asCollectionOfWords.
words notEmpty ifTrue:[
- "/
- "/ supported formats:
- "/
- "/ $-Header: pathName rev date time user state $
- "/ $-Revision: rev $
- "/ $-Id: fileName rev date time user state $
- "/
-
- ((words at:1) = '$Header:') ifTrue:[
- nm := words at:2.
- info at:#repositoryPathName put:nm.
- (nm endsWith:',v') ifTrue:[
- nm := nm copyWithoutLast:2
- ].
- info at:#fileName put:nm asFilename baseName.
- (words at:3) = '$' ifFalse:[
- info at:#revision put:(words at:3).
- info at:#date put:(words at:4).
- info at:#time put:(words at:5).
- info at:#user put:(words at:6).
- info at:#state put:(words at:7).
- ].
- ^ info
- ].
- ((words at:1) = '$Revision:') ifTrue:[
- info at:#revision put:(words at:2).
- ^ info
- ].
- ((words at:1) = '$Id:') ifTrue:[
- info at:#fileName put:(words at:2).
- info at:#revision put:(words at:3).
- info at:#date put:(words at:4).
- info at:#time put:(words at:5).
- info at:#user put:(words at:6).
- info at:#state put:(words at:7).
- ^ info
- ].
+ "/
+ "/ supported formats:
+ "/
+ "/ $-Header: pathName rev date time user state $
+ "/ $-Revision: rev $
+ "/ $-Id: fileName rev date time user state $
+ "/
+
+ ((words at:1) = '$Header:') ifTrue:[
+ nm := words at:2.
+ info at:#repositoryPathName put:nm.
+ (nm endsWith:',v') ifTrue:[
+ nm := nm copyWithoutLast:2
+ ].
+ info at:#fileName put:nm asFilename baseName.
+ words size > 2 ifTrue:[
+ (words at:3) = '$' ifFalse:[
+ info at:#revision put:(words at:3).
+ info at:#date put:(words at:4).
+ info at:#time put:(words at:5).
+ info at:#user put:(words at:6).
+ info at:#state put:(words at:7).
+ ].
+ ].
+ ^ info
+ ].
+ ((words at:1) = '$Revision:') ifTrue:[
+ info at:#revision put:(words at:2).
+ ^ info
+ ].
+ ((words at:1) = '$Id:') ifTrue:[
+ info at:#fileName put:(words at:2).
+ info at:#revision put:(words at:3).
+ info at:#date put:(words at:4).
+ info at:#time put:(words at:5).
+ info at:#user put:(words at:6).
+ info at:#state put:(words at:7).
+ ^ info
+ ].
].
"/
"/ mhmh - maybe its some other source code system
"/
(mgr := Smalltalk at:SourceCodeManager) notNil ifTrue:[
- ^ mgr revisionInfoFromString:aString
+ ^ mgr revisionInfoFromString:aString
].
^ nil
"Created: 15.11.1995 / 14:58:35 / cg"
- "Modified: 13.12.1995 / 17:11:28 / cg"
+ "Modified: 10.12.1996 / 18:10:15 / cg"
!
revisionStringFromSource:aMethodSourceString
@@ -4497,6 +4499,6 @@
!Class class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.218 1996-11-15 10:34:26 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.219 1996-12-12 13:39:08 cg Exp $'
! !
Class initialize!