author | Claus Gittinger <cg@exept.de> |
Thu, 07 Dec 1995 22:53:40 +0100 | |
changeset 114 | bb18f2290ec6 |
parent 112 | e035bf8c3e00 |
child 121 | a23bb38554ee |
permissions | -rw-r--r-- |
56
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
1 |
" |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
3 |
All Rights Reserved |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
4 |
|
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
5 |
This software is furnished under a license and may be used |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
6 |
only in accordance with the terms of that license and with the |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
7 |
inclusion of the above copyright notice. This software may not |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
8 |
be provided or otherwise made available to, or used by, any |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
9 |
other person. No title to or ownership of the software is |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
10 |
hereby transferred. |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
11 |
" |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
12 |
|
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
13 |
Object subclass:#AbstractSourceCodeManager |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
14 |
instanceVariableNames:'' |
112 | 15 |
classVariableNames:'CacheDirectoryName DefaultManager' |
56
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
16 |
poolDictionaries:'' |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
17 |
category:'System-Support' |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
18 |
! |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
19 |
|
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
20 |
!AbstractSourceCodeManager class methodsFor:'documentation'! |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
21 |
|
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
22 |
copyright |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
23 |
" |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
24 |
COPYRIGHT (c) 1995 by Claus Gittinger |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
25 |
All Rights Reserved |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
26 |
|
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
27 |
This software is furnished under a license and may be used |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
28 |
only in accordance with the terms of that license and with the |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
29 |
inclusion of the above copyright notice. This software may not |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
30 |
be provided or otherwise made available to, or used by, any |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
31 |
other person. No title to or ownership of the software is |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
32 |
hereby transferred. |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
33 |
" |
71 | 34 |
! |
35 |
||
36 |
documentation |
|
37 |
" |
|
38 |
Abstract superclass for sourceCodeManagers. |
|
39 |
Concrete subclasses provide access to a source repository. |
|
40 |
All protocol here traps into subclassResponsbility errors. |
|
41 |
Please read more documentation in concrete subclasses |
|
42 |
(especially: CVSSourceCodeManager) for how to use this manager. |
|
43 |
" |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
44 |
! ! |
56
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
45 |
|
63 | 46 |
!AbstractSourceCodeManager class methodsFor:'initialization'! |
47 |
||
48 |
initCacheDirPath |
|
49 |
|path| |
|
50 |
||
65
098be8484211
dont cache classes of which the newest rev. has been checked out
Claus Gittinger <cg@exept.de>
parents:
64
diff
changeset
|
51 |
path := OperatingSystem getEnvironment:'STX_TMPPATH'. |
63 | 52 |
path isNil ifTrue:[ |
53 |
path := OperatingSystem getEnvironment:'TMPPATH'. |
|
54 |
path isNil ifTrue:[ |
|
55 |
path := '/tmp' |
|
56 |
] |
|
57 |
]. |
|
64 | 58 |
CacheDirectoryName := path , '/stx_sourceCache'. |
63 | 59 |
! ! |
60 |
||
112 | 61 |
!AbstractSourceCodeManager class methodsFor:'accessing'! |
62 |
||
63 |
defaultManager |
|
64 |
^ DefaultManager |
|
65 |
||
66 |
"Created: 7.12.1995 / 17:14:22 / cg" |
|
67 |
! ! |
|
68 |
||
71 | 69 |
!AbstractSourceCodeManager class methodsFor:'private'! |
70 |
||
71 |
cacheDirectoryName |
|
72 |
^ CacheDirectoryName |
|
73 |
! |
|
74 |
||
96 | 75 |
directoryFromContainerPath:containerPath |
76 |
|path idx| |
|
77 |
||
78 |
path := self pathInRepositoryFrom:containerPath. |
|
79 |
path notNil ifTrue:[ |
|
109 | 80 |
idx := path indexOf:(Filename separator). |
81 |
idx ~~ 0 ifTrue:[ |
|
82 |
path := path copyFrom:(idx + 1) |
|
83 |
]. |
|
84 |
^ path asFilename directoryName |
|
96 | 85 |
]. |
86 |
^ nil |
|
87 |
||
88 |
" |
|
89 |
SourceCodeManager directoryFromContainerPath:'/files/CVS/stx/libbasic/Array.st' |
|
90 |
" |
|
91 |
||
92 |
"Created: 25.11.1995 / 18:42:20 / cg" |
|
93 |
"Modified: 25.11.1995 / 18:48:46 / cg" |
|
94 |
! |
|
95 |
||
96 |
filenameFromContainerPath:containerPath |
|
97 |
|top rest| |
|
98 |
||
99 |
containerPath notNil ifTrue:[ |
|
109 | 100 |
top := self repositoryTopDirectory. |
101 |
top notNil ifTrue:[ |
|
102 |
(containerPath startsWith:(top , '/')) ifTrue:[ |
|
103 |
rest := containerPath copyFrom:(top size + 2). |
|
104 |
^ rest asFilename baseName |
|
105 |
] |
|
106 |
] |
|
96 | 107 |
]. |
108 |
||
109 |
"Created: 25.11.1995 / 18:42:34 / cg" |
|
110 |
! |
|
111 |
||
112 |
moduleFromContainerPath:containerPath |
|
113 |
|path idx| |
|
114 |
||
115 |
path := self pathInRepositoryFrom:containerPath. |
|
116 |
path notNil ifTrue:[ |
|
109 | 117 |
idx := path indexOf:(Filename separator). |
118 |
idx == 0 ifTrue:[^ path]. |
|
119 |
^ path copyTo:(idx - 1) |
|
96 | 120 |
]. |
121 |
^ nil |
|
122 |
||
123 |
" |
|
124 |
SourceCodeManager moduleFromContainerPath:'/files/CVS/stx/libbasic/Array.st' |
|
125 |
" |
|
126 |
||
127 |
"Created: 25.11.1995 / 18:42:20 / cg" |
|
128 |
"Modified: 25.11.1995 / 18:47:27 / cg" |
|
129 |
! |
|
130 |
||
131 |
pathInRepositoryFrom:containerPath |
|
132 |
|top rest lastTop idx| |
|
133 |
||
134 |
containerPath notNil ifTrue:[ |
|
109 | 135 |
top := self repositoryTopDirectory. |
136 |
top notNil ifTrue:[ |
|
137 |
(containerPath startsWith:(top , '/')) ifTrue:[ |
|
138 |
^ containerPath copyFrom:(top size + 2). |
|
139 |
]. |
|
140 |
"/ hardcase - the repository-filename in the versionInfo |
|
141 |
"/ does no match my repository top. |
|
142 |
"/ check for mangled prefix (happens with symbolic links) |
|
143 |
lastTop := '/' , top asFilename baseName, '/'. |
|
144 |
idx := containerPath indexOfSubCollection:lastTop. |
|
145 |
idx ~~ 0 ifTrue:[ |
|
146 |
('SOURCEMGR: warning: repository path mismatch: ' , (containerPath copyTo:idx-1) , lastTop , ' vs. ' , top , '/') infoPrintNL. |
|
147 |
'SOURCEMGR: warning: assuming that mismatch is ok.' infoPrintNL. |
|
148 |
^ containerPath copyFrom:(idx + lastTop size). |
|
149 |
] |
|
150 |
] |
|
96 | 151 |
]. |
152 |
^ rest |
|
153 |
||
154 |
" |
|
155 |
SourceCodeManager pathInRepositoryFrom:'/files/CVS/stx/libbasic/Array.st' |
|
156 |
SourceCodeManager pathInRepositoryFrom:'/phys/ibm/CVS/stx/libbasic/Array.st' |
|
157 |
" |
|
158 |
||
159 |
"Created: 25.11.1995 / 18:42:20 / cg" |
|
160 |
"Modified: 25.11.1995 / 18:59:26 / cg" |
|
161 |
! |
|
162 |
||
163 |
repositoryTopDirectory |
|
164 |
^ nil |
|
165 |
||
166 |
"Created: 25.11.1995 / 18:38:59 / cg" |
|
167 |
! |
|
168 |
||
87 | 169 |
revisionAfter:aRevisionString |
170 |
|idx s| |
|
171 |
||
172 |
idx := aRevisionString lastIndexOf:$.. |
|
173 |
idx == 0 ifTrue:[ |
|
174 |
^ ((Integer readFrom:aRevisionString) + 1) printString |
|
175 |
]. |
|
176 |
||
177 |
^ (aRevisionString copyTo:idx) , ((Integer readFrom:(aRevisionString copyFrom:(idx+1)))+1) printString |
|
178 |
||
179 |
" |
|
180 |
SourceCodeManager revisionAfter:'1.2.3.4' |
|
181 |
SourceCodeManager revisionAfter:'123' |
|
182 |
SourceCodeManager revisionAfter:'1.24' |
|
183 |
" |
|
184 |
||
185 |
"Created: 20.11.1995 / 12:54:05 / cg" |
|
186 |
! |
|
187 |
||
71 | 188 |
sourceCacheDirectory |
189 |
|dir nm| |
|
190 |
||
191 |
(nm := self cacheDirectoryName) isNil ifTrue:[^ nil]. |
|
69 | 192 |
|
71 | 193 |
(dir := nm asFilename) exists ifFalse:[ |
194 |
dir makeDirectory. |
|
195 |
dir asFilename exists ifFalse:[ |
|
196 |
'SOURCEMGR: could not create cache dir ''' , CacheDirectoryName , '''' infoPrintNL. |
|
197 |
^ nil |
|
198 |
]. |
|
199 |
]. |
|
200 |
^ dir |
|
201 |
! |
|
69 | 202 |
|
96 | 203 |
sourceInfoOfClass:aClass |
204 |
"helper: return a classes sourceCodeInfo" |
|
205 |
||
206 |
|cls sourceInfo revInfo actualSourceFileName classFileName |
|
207 |
newInfo revisionInfo container| |
|
208 |
||
209 |
cls := aClass. |
|
210 |
cls isMeta ifTrue:[ |
|
109 | 211 |
cls := cls soleInstance |
96 | 212 |
]. |
213 |
||
214 |
"/ |
|
215 |
"/ the info given by the classes source ... |
|
216 |
"/ |
|
217 |
revInfo := aClass revisionInfo. |
|
218 |
||
219 |
"/ |
|
220 |
"/ the info given by the classes binary ... |
|
221 |
"/ if present, we better trust that one. |
|
222 |
"/ |
|
223 |
sourceInfo := cls packageSourceCodeInfo. |
|
224 |
sourceInfo isNil ifTrue:[ |
|
109 | 225 |
revInfo isNil ifTrue:[ |
226 |
'SOURCEMGR: class has neither source nor compiled-in info' infoPrintNL. |
|
227 |
^ nil |
|
228 |
]. |
|
96 | 229 |
|
109 | 230 |
container := revInfo at:#repositoryPathName ifAbsent:nil. |
231 |
container notNil ifTrue:[ |
|
232 |
sourceInfo := revInfo. |
|
233 |
sourceInfo at:#directory put:(self directoryFromContainerPath:container). |
|
234 |
sourceInfo at:#module put:(self moduleFromContainerPath:container). |
|
235 |
] |
|
96 | 236 |
]. |
237 |
||
238 |
||
239 |
"/ |
|
240 |
"/ the filename I would expect from its name ... |
|
241 |
"/ |
|
242 |
classFileName := Smalltalk fileNameForClass:aClass. |
|
243 |
||
244 |
newInfo := IdentityDictionary new. |
|
245 |
sourceInfo keysAndValuesDo:[:key :value | |
|
109 | 246 |
newInfo at:key put:value |
96 | 247 |
]. |
248 |
||
249 |
"/ check .. |
|
250 |
revInfo notNil ifTrue:[ |
|
109 | 251 |
actualSourceFileName := revInfo at:#fileName ifAbsent:nil. |
252 |
actualSourceFileName notNil ifTrue:[ |
|
253 |
actualSourceFileName ~= (classFileName , '.st') ifTrue:[ |
|
254 |
('SOURCEMGR: source of class ' , aClass name , ' found in ' , actualSourceFileName , ' (expected: ' , classFileName , '.st); renamed ?') printNL. |
|
255 |
newInfo at:#expectedFileName put:(classFileName). |
|
256 |
newInfo at:#renamed put:true. |
|
257 |
classFileName := actualSourceFileName copyWithoutLast:3 |
|
258 |
] |
|
259 |
] |
|
96 | 260 |
]. |
261 |
||
262 |
newInfo at:#classFileName put:classFileName. |
|
263 |
^ newInfo |
|
264 |
||
265 |
"Created: 25.11.1995 / 12:40:19 / cg" |
|
266 |
"Modified: 25.11.1995 / 18:51:16 / cg" |
|
267 |
! |
|
268 |
||
71 | 269 |
streamForClass:cls fileName:classFileName revision:revision directory:packageDir module:moduleDir cache:cacheIt |
270 |
self subclassResponsibility. |
|
271 |
^ nil |
|
272 |
||
273 |
"Created: 4.11.1995 / 19:09:12 / cg" |
|
274 |
"Modified: 4.11.1995 / 19:15:43 / cg" |
|
95 | 275 |
! ! |
276 |
||
277 |
!AbstractSourceCodeManager class methodsFor:'source code access'! |
|
278 |
||
279 |
checkinClass:aClass logMessage:logMessage |
|
280 |
"checkin of a class into the source repository. |
|
281 |
Return true if ok, false if not." |
|
282 |
||
283 |
|sourceInfo tempDir packageDir moduleDir tempFile classFileName ok| |
|
284 |
||
285 |
sourceInfo := self sourceInfoOfClass:aClass. |
|
286 |
sourceInfo isNil ifTrue:[^ false]. |
|
71 | 287 |
|
288 |
packageDir := sourceInfo at:#directory. |
|
289 |
moduleDir := sourceInfo at:#module. "/ use the modules name as CVS module |
|
96 | 290 |
classFileName := sourceInfo at:#classFileName. |
291 |
"/ classFileName := Smalltalk fileNameForClass:aClass. |
|
71 | 292 |
|
293 |
tempDir := (Filename newTemporaryIn:nil) makeDirectory. |
|
294 |
[ |
|
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
295 |
|aStream| |
75 | 296 |
|
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
297 |
tempFile := tempDir construct:(classFileName,'.st'). |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
298 |
aStream := tempFile writeStream. |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
299 |
aStream isNil ifTrue:[ |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
300 |
'SOURCEMGR: temporary fileout failed' infoPrintNL. |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
301 |
^ false |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
302 |
]. |
71 | 303 |
|
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
304 |
Class fileOutErrorSignal handle:[:ex | |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
305 |
'SOURCEMGR: fileout failed' infoPrintNL. |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
306 |
aStream close. |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
307 |
^ false |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
308 |
] do:[ |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
309 |
aClass fileOutOn:aStream withTimeStamp:false. |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
310 |
]. |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
311 |
aStream close. |
71 | 312 |
|
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
313 |
(tempFile := tempDir construct:(classFileName,'.st')) exists ifFalse:[ |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
314 |
'SOURCEMGR: temporary fileout failed' infoPrintNL. |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
315 |
^ false |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
316 |
]. |
75 | 317 |
|
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
318 |
ok := self |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
319 |
checkinClass:aClass |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
320 |
fileName:classFileName |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
321 |
directory:packageDir |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
322 |
module:moduleDir |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
323 |
source:(tempFile name) |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
324 |
logMessage:logMessage. |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
325 |
|
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
326 |
^ ok |
71 | 327 |
] valueNowOrOnUnwindDo:[ |
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
328 |
tempDir recursiveRemove |
71 | 329 |
]. |
330 |
^ false |
|
331 |
||
332 |
" |
|
333 |
SourceCodeManager checkinClass:Array |
|
334 |
" |
|
335 |
||
336 |
"Created: 6.11.1995 / 18:56:00 / cg" |
|
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
337 |
"Modified: 7.12.1995 / 22:45:02 / cg" |
71 | 338 |
! |
339 |
||
340 |
mostRecentSourceStreamForClassNamed:aClassOrClassName |
|
341 |
|classFileName packageDir moduleDir| |
|
342 |
||
343 |
classFileName := Smalltalk fileNameForClass:aClassOrClassName. |
|
344 |
packageDir := Smalltalk sourceDirectoryNameOfClass:aClassOrClassName. |
|
345 |
moduleDir := 'stx'. |
|
346 |
packageDir isNil ifTrue:[^ nil]. |
|
347 |
||
348 |
^ self |
|
349 |
streamForClass:nil |
|
350 |
fileName:classFileName |
|
351 |
revision:#newest |
|
352 |
directory:packageDir |
|
353 |
module:moduleDir |
|
354 |
cache:false |
|
355 |
||
356 |
"Created: 6.11.1995 / 16:09:06 / cg" |
|
357 |
"Modified: 9.11.1995 / 14:34:15 / cg" |
|
358 |
! |
|
359 |
||
56
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
360 |
sourceStreamFor:aClass |
58 | 361 |
"extract a classes source code and return an open readStream on it. |
362 |
The classes source code is extracted using the revision and the sourceCodeInfo, |
|
363 |
which itself is extracted from the classes packageString." |
|
364 |
||
83
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
365 |
^ self sourceStreamFor:aClass revision:nil |
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
366 |
! |
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
367 |
|
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
368 |
sourceStreamFor:aClass revision:aRevisionStringOrNil |
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
369 |
"extract a classes source code and return an open readStream on it. |
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
370 |
A revision of nil selects the current (in image) revision. |
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
371 |
The classes source code is extracted using the revision and the sourceCodeInfo, |
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
372 |
which itself is extracted from the classes packageString." |
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
373 |
|
96 | 374 |
|classFileName revision |
375 |
packageDir moduleDir sourceInfo revInfo| |
|
58 | 376 |
|
83
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
377 |
aRevisionStringOrNil isNil ifTrue:[ |
109 | 378 |
revision := aClass binaryRevision. |
379 |
revision isNil ifTrue:[ |
|
380 |
'SOURCEMGR: class ' , aClass name , ' has no revision string' infoPrintNL. |
|
381 |
^ nil. |
|
382 |
] |
|
83
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
383 |
] ifFalse:[ |
109 | 384 |
revision := aRevisionStringOrNil |
58 | 385 |
]. |
386 |
||
95 | 387 |
sourceInfo := self sourceInfoOfClass:aClass. |
388 |
sourceInfo isNil ifTrue:[^ nil]. |
|
58 | 389 |
|
390 |
packageDir := sourceInfo at:#directory. |
|
391 |
moduleDir := sourceInfo at:#module. "/ use the modules name as CVS module |
|
96 | 392 |
classFileName := sourceInfo at:#classFileName. |
393 |
||
58 | 394 |
|
395 |
^ self |
|
109 | 396 |
streamForClass:aClass |
397 |
fileName:classFileName |
|
398 |
revision:revision |
|
399 |
directory:packageDir |
|
400 |
module:moduleDir |
|
401 |
cache:true |
|
65
098be8484211
dont cache classes of which the newest rev. has been checked out
Claus Gittinger <cg@exept.de>
parents:
64
diff
changeset
|
402 |
|
96 | 403 |
"Modified: 25.11.1995 / 17:04:38 / cg" |
58 | 404 |
! ! |
405 |
||
71 | 406 |
!AbstractSourceCodeManager class methodsFor:'source code administration'! |
59
3bb0b97dffa2
reorganized; shared methods into AbstractSCMMgr
Claus Gittinger <cg@exept.de>
parents:
58
diff
changeset
|
407 |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
408 |
revisionLogOf:aClass |
95 | 409 |
"return info about the repository container and |
410 |
the revisionlog as a collection of revision entries. |
|
411 |
Return nil on failure. |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
412 |
The returned information is a structure (IdentityDictionary) |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
413 |
filled with: |
95 | 414 |
#container -> the RCS container file name |
415 |
#filename -> the actual source file name |
|
416 |
#newestRevision -> the revisionString of the newest revision |
|
417 |
#numberOfRevisions -> the number of revisions in the container |
|
418 |
#revisions -> collection of per-revision info |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
419 |
|
95 | 420 |
per revision info consists of one record per revision: |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
421 |
|
95 | 422 |
#revision -> the revision string |
423 |
#author -> who checked that revision into the repository |
|
424 |
#date -> when was it checked in |
|
425 |
#state -> the RCS state |
|
426 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
427 |
|
95 | 428 |
revisions are ordered newest first |
429 |
(i.e. the last entry is for the initial revision; the first for the most recent one) |
|
430 |
" |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
431 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
432 |
^ self |
95 | 433 |
revisionLogOf:aClass fromRevision:nil toRevision:nil |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
434 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
435 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
436 |
SourceCodeManager revisionLogOf:Array |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
437 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
438 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
439 |
"Created: 25.11.1995 / 11:25:02 / cg" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
440 |
"Modified: 25.11.1995 / 11:56:16 / cg" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
441 |
! |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
442 |
|
110 | 443 |
revisionLogOf:aClass fromRevision:rev1 |
444 |
"return info about the repository container and |
|
445 |
(part of) the revisionlog as a collection of revision entries. |
|
446 |
Return nil on failure. |
|
447 |
||
448 |
The returned information is a structure (IdentityDictionary) |
|
449 |
filled with: |
|
112 | 450 |
#container -> the RCS container file name |
451 |
#filename -> the actual source file name |
|
452 |
#newestRevision -> the revisionString of the newest revision |
|
453 |
#numberOfRevisions -> the number of revisions in the container |
|
454 |
#revisions -> collection of per-revision info (see below) |
|
110 | 455 |
|
112 | 456 |
for some classes, additional info is returned: |
110 | 457 |
|
112 | 458 |
#renamed -> true if the class has been renamed or copied |
459 |
and the sourceInfo is from the previous one |
|
460 |
#expectedFileName -> the filename we would expect (i.e. for the new class) |
|
110 | 461 |
|
112 | 462 |
rev1 / rev2 specify from which revisions a logEntry is wanted: |
463 |
If rev1 is nil, the first revision is the initial revision |
|
464 |
otherwise, the log starts with that revision. |
|
465 |
If rev2 is nil, the last revision is the newest revision |
|
466 |
otherwise, the log ends with that revision. |
|
467 |
If both are nil, no logEntries are extracted (i.e. only the header). |
|
110 | 468 |
|
112 | 469 |
per revision info consists of one record per revision: |
110 | 470 |
|
112 | 471 |
#revision -> the revision string |
472 |
#author -> who checked that revision into the repository |
|
473 |
#date -> when was it checked in |
|
474 |
#state -> the RCS state |
|
475 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
|
110 | 476 |
|
112 | 477 |
revisions are ordered newest first |
478 |
(i.e. the last entry is for the initial revision; the first for the most recent one) |
|
479 |
" |
|
110 | 480 |
|
481 |
^ self revisionLogOf:aClass fromRevision:rev1 toRevision:nil |
|
482 |
||
483 |
" |
|
484 |
SourceCodeManager revisionLogOf:Array fromRevision:'1.40' |
|
485 |
" |
|
486 |
||
487 |
"Created: 6.11.1995 / 18:56:00 / cg" |
|
488 |
"Modified: 7.12.1995 / 11:51:15 / cg" |
|
489 |
! |
|
490 |
||
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
491 |
revisionLogOf:aClass fromRevision:rev1 toRevision:rev2 |
95 | 492 |
"return info about the repository container and |
493 |
(part of) the revisionlog as a collection of revision entries. |
|
494 |
Return nil on failure. |
|
495 |
||
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
496 |
The returned information is a structure (IdentityDictionary) |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
497 |
filled with: |
109 | 498 |
#container -> the RCS container file name |
499 |
#filename -> the actual source file name |
|
500 |
#newestRevision -> the revisionString of the newest revision |
|
501 |
#numberOfRevisions -> the number of revisions in the container |
|
502 |
#revisions -> collection of per-revision info (see below) |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
503 |
|
109 | 504 |
for some classes, additional info is returned: |
96 | 505 |
|
109 | 506 |
#renamed -> true if the class has been renamed or copied |
507 |
and the sourceInfo is from the previous one |
|
508 |
#expectedFileName -> the filename we would expect (i.e. for the new class) |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
509 |
|
109 | 510 |
rev1 / rev2 specify from which revisions a logEntry is wanted: |
511 |
If rev1 is nil, the first revision is the initial revision |
|
512 |
otherwise, the log starts with that revision. |
|
513 |
If rev2 is nil, the last revision is the newest revision |
|
514 |
otherwise, the log ends with that revision. |
|
515 |
If both are nil, no logEntries are extracted (i.e. only the header). |
|
96 | 516 |
|
109 | 517 |
per revision info consists of one record per revision: |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
518 |
|
109 | 519 |
#revision -> the revision string |
520 |
#author -> who checked that revision into the repository |
|
521 |
#date -> when was it checked in |
|
522 |
#state -> the RCS state |
|
523 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
524 |
|
109 | 525 |
revisions are ordered newest first |
526 |
(i.e. the last entry is for the initial revision; the first for the most recent one) |
|
527 |
" |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
528 |
|
96 | 529 |
|cls sourceInfo packageDir moduleDir classFileName info| |
95 | 530 |
|
531 |
sourceInfo := self sourceInfoOfClass:aClass. |
|
532 |
sourceInfo isNil ifTrue:[^ nil]. |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
533 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
534 |
packageDir := sourceInfo at:#directory. |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
535 |
moduleDir := sourceInfo at:#module. "/ use the modules name as CVS module |
96 | 536 |
"/ classFileName := Smalltalk fileNameForClass:aClass. |
537 |
classFileName := sourceInfo at:#classFileName. |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
538 |
|
96 | 539 |
info := self |
109 | 540 |
revisionLogOf:aClass |
541 |
fromRevision:rev1 |
|
542 |
toRevision:rev2 |
|
543 |
fileName:classFileName |
|
544 |
directory:packageDir |
|
545 |
module:moduleDir. |
|
96 | 546 |
|
547 |
info notNil ifTrue:[ |
|
109 | 548 |
(sourceInfo includesKey:#renamed) ifTrue:[ |
549 |
info at:#renamed put:(sourceInfo at:#renamed) |
|
550 |
]. |
|
551 |
(sourceInfo includesKey:#expectedFileName) ifTrue:[ |
|
552 |
info at:#expectedFileName put:(sourceInfo at:#expectedFileName) |
|
553 |
] |
|
96 | 554 |
]. |
555 |
^ info |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
556 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
557 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
558 |
SourceCodeManager revisionLogOf:Array fromRevision:'1.40' toRevision:'1.43' |
96 | 559 |
SourceCodeManager revisionLogOf:XtBoxNew |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
560 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
561 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
562 |
"Created: 6.11.1995 / 18:56:00 / cg" |
96 | 563 |
"Modified: 25.11.1995 / 17:25:29 / cg" |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
564 |
! |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
565 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
566 |
revisionLogOf:cls fromRevision:rev1 toRevision:rev2 fileName:classFileName directory:packageDir module:moduleDir |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
567 |
"this must be implemented by a concrete source-code manager" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
568 |
|
87 | 569 |
self subclassResponsibility. |
73 | 570 |
|
87 | 571 |
"Created: 15.11.1995 / 18:12:51 / cg" |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
572 |
"Modified: 25.11.1995 / 11:56:38 / cg" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
573 |
! |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
574 |
|
96 | 575 |
writeRevisionLogMessagesFrom:log to:aStream |
576 |
"helper; send the revisionlog to aStream" |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
577 |
|
96 | 578 |
(log at:#renamed ifAbsent:false) ifTrue:[ |
109 | 579 |
aStream nextPutAll:' Class was renamed; revision info is from original class.'. |
580 |
aStream cr; nextPutAll:' You have to create a new container for it.'. |
|
581 |
aStream cr; cr. |
|
96 | 582 |
]. |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
583 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
584 |
aStream nextPutAll:' Total revisions: '; nextPutAll:(log at:#numberOfRevisions) printString; cr. |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
585 |
aStream nextPutAll:' Newest revision: '; nextPutAll:(log at:#newestRevision) printString; cr. |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
586 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
587 |
(log at:#revisions) do:[:entry | |
109 | 588 |
|logMsg| |
96 | 589 |
|
109 | 590 |
aStream cr. |
591 |
aStream nextPutAll:' revision '; nextPutAll:(entry at:#revision); tab. |
|
592 |
aStream nextPutAll:' date: '; nextPutAll:(entry at:#date); tab. |
|
593 |
aStream nextPutAll:' author: '; nextPutAll:(entry at:#author); tab. |
|
594 |
aStream cr. |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
595 |
|
109 | 596 |
logMsg := entry at:#logMessage. |
597 |
(logMsg isEmpty or:[logMsg isBlank or:[logMsg withoutSeparators = '.']]) ifTrue:[ |
|
598 |
logMsg := '*** empty log message ***' |
|
599 |
]. |
|
600 |
aStream tab; nextPutAll:logMsg. |
|
601 |
aStream cr. |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
602 |
]. |
96 | 603 |
|
604 |
"Created: 16.11.1995 / 13:25:30 / cg" |
|
605 |
"Modified: 25.11.1995 / 17:27:31 / cg" |
|
606 |
! |
|
607 |
||
608 |
writeRevisionLogOf:aClass fromRevision:rev1 toRevision:rev2 fileName:classFileName directory:packageDir module:moduleDir to:aStream |
|
609 |
"send (part of) the revisionlog to aStream" |
|
610 |
||
611 |
|log | |
|
612 |
||
613 |
log := self revisionLogOf:aClass fromRevision:rev1 toRevision:rev2 fileName:classFileName directory:packageDir module:moduleDir. |
|
614 |
log isNil ifTrue:[^ false]. |
|
615 |
||
616 |
self writeRevisionLogMessagesFrom:log to:aStream. |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
617 |
^ true |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
618 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
619 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
620 |
SourceCodeManager writeRevisionLogOf:Array to:Transcript |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
621 |
SourceCodeManager writeRevisionLogOf:Array fromRevision:'1.40' toRevision:'1.43' to:Transcript |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
622 |
SourceCodeManager writeRevisionLogOf:Array fromRevision:'1.40' toRevision:nil to:Transcript |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
623 |
SourceCodeManager writeRevisionLogOf:Array fromRevision:nil toRevision:'1.3' to:Transcript |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
624 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
625 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
626 |
"Created: 16.11.1995 / 13:25:30 / cg" |
96 | 627 |
"Modified: 25.11.1995 / 17:25:04 / cg" |
73 | 628 |
! |
629 |
||
77 | 630 |
writeRevisionLogOf:aClass fromRevision:rev1 toRevision:rev2 to:aStream |
73 | 631 |
"extract a classes log and append it to aStream." |
632 |
||
96 | 633 |
|log | |
73 | 634 |
|
96 | 635 |
log := self revisionLogOf:aClass fromRevision:rev1 toRevision:rev2. |
636 |
log isNil ifTrue:[^ false]. |
|
637 |
||
638 |
self writeRevisionLogMessagesFrom:log to:aStream. |
|
639 |
^ true |
|
73 | 640 |
|
641 |
" |
|
77 | 642 |
SourceCodeManager writeRevisionLogOf:Array fromRevision:'1.40' toRevision:'1.43' to:Transcript |
73 | 643 |
" |
644 |
||
645 |
"Created: 6.11.1995 / 18:56:00 / cg" |
|
96 | 646 |
"Modified: 25.11.1995 / 17:24:55 / cg" |
77 | 647 |
! |
648 |
||
87 | 649 |
writeRevisionLogOf:aClass to:aStream |
650 |
"extract a classes log and append it to aStream." |
|
651 |
||
652 |
^ self |
|
653 |
writeRevisionLogOf:aClass fromRevision:nil toRevision:nil to:aStream |
|
77 | 654 |
|
87 | 655 |
" |
656 |
SourceCodeManager writeRevisionLogOf:Array to:Transcript |
|
657 |
" |
|
658 |
! ! |
|
77 | 659 |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
660 |
!AbstractSourceCodeManager class methodsFor:'documentation'! |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
661 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
662 |
version |
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
663 |
^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.28 1995-12-07 21:53:40 cg Exp $'! ! |