2028
|
1 |
"{ Package: 'stx:libbasic3' }"
|
|
2 |
|
|
3 |
Object subclass:#VersionInfo
|
|
4 |
instanceVariableNames:'revision binaryRevision user date time fileName'
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'System-SourceCodeManagement'
|
|
8 |
!
|
|
9 |
|
|
10 |
!VersionInfo class methodsFor:'documentation'!
|
|
11 |
|
|
12 |
documentation
|
|
13 |
"
|
|
14 |
Class used to return a Dictionary when asked for versionInfo.
|
|
15 |
This has been replaced by instances of this class and subclasses.
|
|
16 |
Notice, that subclasses may add more info for specific source repositories,
|
|
17 |
(CVSVersionInfo, MonticelloVersionInfo etc.)
|
|
18 |
|
|
19 |
[author:]
|
|
20 |
cg (cg@AQUA-DUO)
|
|
21 |
"
|
|
22 |
! !
|
|
23 |
|
|
24 |
!VersionInfo methodsFor:'accessing'!
|
|
25 |
|
|
26 |
at:aKey
|
|
27 |
"backward compatible dictionary-like accessing"
|
|
28 |
|
|
29 |
(self respondsTo:aKey) ifTrue:[
|
|
30 |
^ self perform:aKey
|
|
31 |
].
|
|
32 |
^ self errorKeyNotFound:aKey
|
|
33 |
|
|
34 |
"
|
|
35 |
self new at:#binaryRevision
|
|
36 |
self new at:#foo
|
|
37 |
"
|
|
38 |
|
|
39 |
"Modified: / 22-10-2008 / 20:23:31 / cg"
|
|
40 |
!
|
|
41 |
|
|
42 |
at:aKey ifAbsent:replacement
|
|
43 |
"backward compatible dictionary-like accessing"
|
|
44 |
|
|
45 |
(self respondsTo:aKey) ifTrue:[
|
|
46 |
^ (self perform:aKey) ? replacement
|
|
47 |
].
|
|
48 |
^ replacement
|
|
49 |
|
|
50 |
"
|
|
51 |
self new at:#binaryRevision
|
|
52 |
self new at:#foo ifAbsent:#bar
|
|
53 |
"
|
|
54 |
|
|
55 |
"Created: / 22-10-2008 / 20:19:42 / cg"
|
|
56 |
!
|
|
57 |
|
|
58 |
at:aKey put:value
|
|
59 |
"backward compatible dictionary-like accessing"
|
|
60 |
|
|
61 |
(self respondsTo:aKey) ifTrue:[
|
|
62 |
self perform:(aKey,':') asSymbol with:value.
|
|
63 |
^ value "/ sigh
|
|
64 |
].
|
|
65 |
^ self errorKeyNotFound:aKey
|
|
66 |
|
|
67 |
"
|
|
68 |
self new at:#binaryRevision put:#bar
|
|
69 |
self new at:#foo put:#bar
|
|
70 |
"
|
|
71 |
|
|
72 |
"Created: / 22-10-2008 / 20:20:54 / cg"
|
|
73 |
!
|
|
74 |
|
|
75 |
binaryRevision
|
|
76 |
^ binaryRevision
|
|
77 |
!
|
|
78 |
|
|
79 |
binaryRevision:something
|
|
80 |
binaryRevision := something.
|
|
81 |
!
|
|
82 |
|
|
83 |
date
|
|
84 |
^ date
|
|
85 |
!
|
|
86 |
|
|
87 |
date:something
|
|
88 |
date := something.
|
|
89 |
!
|
|
90 |
|
|
91 |
fileName
|
|
92 |
^ fileName
|
|
93 |
!
|
|
94 |
|
|
95 |
fileName:something
|
|
96 |
fileName := something.
|
|
97 |
!
|
|
98 |
|
|
99 |
keysAndValuesDo:aBlock
|
|
100 |
self class instVarNames do:[:nm |
|
|
101 |
aBlock value:(nm asSymbol) value:(self perform:nm asSymbol)
|
|
102 |
].
|
|
103 |
|
|
104 |
"Created: / 22-10-2008 / 20:48:08 / cg"
|
|
105 |
!
|
|
106 |
|
|
107 |
revision
|
|
108 |
^ revision
|
|
109 |
!
|
|
110 |
|
|
111 |
revision:something
|
|
112 |
revision := something.
|
|
113 |
!
|
|
114 |
|
|
115 |
time
|
|
116 |
^ time
|
|
117 |
!
|
|
118 |
|
|
119 |
time:something
|
|
120 |
time := something.
|
|
121 |
!
|
|
122 |
|
|
123 |
user
|
|
124 |
^ user
|
|
125 |
!
|
|
126 |
|
|
127 |
user:something
|
|
128 |
user := something.
|
|
129 |
! !
|
|
130 |
|
|
131 |
!VersionInfo class methodsFor:'documentation'!
|
|
132 |
|
|
133 |
version
|
|
134 |
^ '$Header: /cvs/stx/stx/libbasic3/VersionInfo.st,v 1.1 2008-10-22 18:54:32 cg Exp $'
|
|
135 |
! !
|