author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 30 Jan 2012 17:19:14 +0000 | |
branch | jv |
changeset 3012 | 4f40b8304d54 |
parent 3011 | 1997ff6e7e55 |
child 3042 | 48e76977cdc3 |
permissions | -rw-r--r-- |
2177 | 1 |
" |
2 |
COPYRIGHT (c) 2008 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
2028 | 12 |
"{ Package: 'stx:libbasic3' }" |
13 |
||
14 |
Object subclass:#VersionInfo |
|
15 |
instanceVariableNames:'revision binaryRevision user date time fileName' |
|
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'System-SourceCodeManagement' |
|
19 |
! |
|
20 |
||
21 |
!VersionInfo class methodsFor:'documentation'! |
|
22 |
||
2177 | 23 |
copyright |
24 |
" |
|
25 |
COPYRIGHT (c) 2008 by eXept Software AG |
|
26 |
All Rights Reserved |
|
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
2028 | 37 |
documentation |
38 |
" |
|
39 |
Class used to return a Dictionary when asked for versionInfo. |
|
40 |
This has been replaced by instances of this class and subclasses. |
|
41 |
Notice, that subclasses may add more info for specific source repositories, |
|
42 |
(CVSVersionInfo, MonticelloVersionInfo etc.) |
|
43 |
||
44 |
[author:] |
|
45 |
cg (cg@AQUA-DUO) |
|
46 |
" |
|
47 |
! ! |
|
48 |
||
49 |
!VersionInfo methodsFor:'accessing'! |
|
50 |
||
51 |
at:aKey |
|
52 |
"backward compatible dictionary-like accessing" |
|
53 |
||
54 |
(self respondsTo:aKey) ifTrue:[ |
|
55 |
^ self perform:aKey |
|
56 |
]. |
|
57 |
^ self errorKeyNotFound:aKey |
|
58 |
||
59 |
" |
|
60 |
self new at:#binaryRevision |
|
61 |
self new at:#foo |
|
62 |
" |
|
63 |
||
64 |
"Modified: / 22-10-2008 / 20:23:31 / cg" |
|
65 |
! |
|
66 |
||
67 |
at:aKey ifAbsent:replacement |
|
68 |
"backward compatible dictionary-like accessing" |
|
69 |
||
70 |
(self respondsTo:aKey) ifTrue:[ |
|
71 |
^ (self perform:aKey) ? replacement |
|
72 |
]. |
|
73 |
^ replacement |
|
74 |
||
75 |
" |
|
76 |
self new at:#binaryRevision |
|
77 |
self new at:#foo ifAbsent:#bar |
|
78 |
" |
|
79 |
||
80 |
"Created: / 22-10-2008 / 20:19:42 / cg" |
|
81 |
! |
|
82 |
||
83 |
at:aKey put:value |
|
84 |
"backward compatible dictionary-like accessing" |
|
85 |
||
86 |
(self respondsTo:aKey) ifTrue:[ |
|
87 |
self perform:(aKey,':') asSymbol with:value. |
|
88 |
^ value "/ sigh |
|
89 |
]. |
|
90 |
^ self errorKeyNotFound:aKey |
|
91 |
||
92 |
" |
|
93 |
self new at:#binaryRevision put:#bar |
|
94 |
self new at:#foo put:#bar |
|
95 |
" |
|
96 |
||
97 |
"Created: / 22-10-2008 / 20:20:54 / cg" |
|
98 |
! |
|
99 |
||
2667 | 100 |
author |
101 |
^ self user |
|
102 |
||
103 |
"Created: / 21-12-2011 / 23:09:54 / cg" |
|
104 |
! |
|
105 |
||
2028 | 106 |
binaryRevision |
107 |
^ binaryRevision |
|
108 |
! |
|
109 |
||
110 |
binaryRevision:something |
|
111 |
binaryRevision := something. |
|
112 |
! |
|
113 |
||
114 |
date |
|
115 |
^ date |
|
116 |
! |
|
117 |
||
118 |
date:something |
|
119 |
date := something. |
|
120 |
! |
|
121 |
||
122 |
fileName |
|
123 |
^ fileName |
|
124 |
! |
|
125 |
||
126 |
fileName:something |
|
127 |
fileName := something. |
|
128 |
! |
|
129 |
||
130 |
keysAndValuesDo:aBlock |
|
131 |
self class instVarNames do:[:nm | |
|
132 |
aBlock value:(nm asSymbol) value:(self perform:nm asSymbol) |
|
133 |
]. |
|
134 |
||
135 |
"Created: / 22-10-2008 / 20:48:08 / cg" |
|
136 |
! |
|
137 |
||
2608 | 138 |
repositoryPathName |
139 |
"raise an error: must be redefined in concrete subclass(es)" |
|
140 |
||
141 |
^ nil "Not known" |
|
142 |
||
143 |
"Modified: / 23-11-2011 / 23:33:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
144 |
! |
|
145 |
||
2028 | 146 |
revision |
147 |
^ revision |
|
148 |
! |
|
149 |
||
150 |
revision:something |
|
151 |
revision := something. |
|
152 |
! |
|
153 |
||
154 |
time |
|
155 |
^ time |
|
156 |
! |
|
157 |
||
158 |
time:something |
|
159 |
time := something. |
|
160 |
! |
|
161 |
||
2640 | 162 |
timeStamp:aTimestamp |
2667 | 163 |
date := aTimestamp asDate. |
164 |
time := aTimestamp asTime. |
|
2640 | 165 |
|
166 |
"Created: / 04-12-2011 / 10:06:02 / cg" |
|
167 |
! |
|
168 |
||
2608 | 169 |
timezone |
170 |
"raise an error: must be redefined in concrete subclass(es)" |
|
171 |
||
172 |
^ nil "Not known" |
|
173 |
||
174 |
"Modified: / 23-11-2011 / 13:54:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
175 |
! |
|
176 |
||
2028 | 177 |
user |
178 |
^ user |
|
179 |
! |
|
180 |
||
181 |
user:something |
|
182 |
user := something. |
|
183 |
! ! |
|
184 |
||
185 |
!VersionInfo class methodsFor:'documentation'! |
|
186 |
||
2177 | 187 |
version_CVS |
3011
1997ff6e7e55
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2667
diff
changeset
|
188 |
^ '§Header: /cvs/stx/stx/libbasic3/VersionInfo.st,v 1.6 2011/12/22 08:59:53 cg Exp §' |
3012 | 189 |
! |
190 |
||
191 |
version_SVN |
|
192 |
^ '$Id: VersionInfo.st 1872 2012-01-30 17:19:14Z vranyj1 $' |
|
193 |
! ! |