author | Claus Gittinger <cg@exept.de> |
Mon, 29 Mar 1999 13:57:38 +0200 | |
changeset 745 | a17a530bb089 |
parent 744 | eaf185681d85 |
child 751 | c39b6f348d06 |
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 |
147 | 14 |
instanceVariableNames:'' |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
15 |
classVariableNames:'DefaultManager CachingSources CacheDirectoryName UseWorkTree |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
16 |
WorkTreeDirectoryName' |
147 | 17 |
poolDictionaries:'' |
218 | 18 |
category:'System-SourceCodeManagement' |
56
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 |
|
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
21 |
!AbstractSourceCodeManager class methodsFor:'documentation'! |
56
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
22 |
|
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
23 |
copyright |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
24 |
" |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
25 |
COPYRIGHT (c) 1995 by Claus Gittinger |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
26 |
All Rights Reserved |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
27 |
|
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
28 |
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
|
29 |
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
|
30 |
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
|
31 |
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
|
32 |
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
|
33 |
hereby transferred. |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
34 |
" |
71 | 35 |
! |
36 |
||
37 |
documentation |
|
38 |
" |
|
39 |
Abstract superclass for sourceCodeManagers. |
|
40 |
Concrete subclasses provide access to a source repository. |
|
41 |
All protocol here traps into subclassResponsbility errors. |
|
42 |
Please read more documentation in concrete subclasses |
|
43 |
(especially: CVSSourceCodeManager) for how to use this manager. |
|
236 | 44 |
|
45 |
[author:] |
|
46 |
Claus Gittinger |
|
71 | 47 |
" |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
48 |
! ! |
56
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
49 |
|
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
50 |
!AbstractSourceCodeManager class methodsFor:'initialization'! |
63 | 51 |
|
52 |
initCacheDirPath |
|
472 | 53 |
"initialize the name of the cacheDirectory. |
54 |
This is one of: |
|
55 |
STX_TMPPATH/stx_sourceCache |
|
56 |
TMPPATH/stx_sourceCache |
|
57 |
TMPDIR/stx_sourceCache |
|
58 |
/tmp/stx_sourceCache. |
|
59 |
whichever variable is first found to be nonEmpty." |
|
60 |
||
63 | 61 |
|path| |
62 |
||
65
098be8484211
dont cache classes of which the newest rev. has been checked out
Claus Gittinger <cg@exept.de>
parents:
64
diff
changeset
|
63 |
path := OperatingSystem getEnvironment:'STX_TMPPATH'. |
63 | 64 |
path isNil ifTrue:[ |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
65 |
path := OperatingSystem getEnvironment:'TMPPATH'. |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
66 |
path isNil ifTrue:[ |
472 | 67 |
path := OperatingSystem getEnvironment:'TMPDIR'. |
68 |
path isNil ifTrue:[ |
|
69 |
path := '/tmp' |
|
70 |
] |
|
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
71 |
] |
63 | 72 |
]. |
64 | 73 |
CacheDirectoryName := path , '/stx_sourceCache'. |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
74 |
|
472 | 75 |
"Modified: 12.9.1996 / 02:27:48 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
76 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
77 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
78 |
initialize |
472 | 79 |
"setup for no caching and no workTree" |
80 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
81 |
CachingSources := UseWorkTree := false. |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
82 |
CacheDirectoryName := WorkTreeDirectoryName := ''. |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
83 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
84 |
"Created: 16.12.1995 / 15:41:00 / cg" |
472 | 85 |
"Modified: 12.9.1996 / 02:28:11 / cg" |
63 | 86 |
! ! |
87 |
||
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
88 |
!AbstractSourceCodeManager class methodsFor:'accessing'! |
112 | 89 |
|
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
90 |
cacheDirectoryName |
472 | 91 |
"return the name of the cache directory, where checked out class |
92 |
sources are kept for faster access. The default is '/tmp/stx_sourceCache'. |
|
93 |
This cache is shared among all ST/X users on a system." |
|
94 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
95 |
^ CacheDirectoryName |
472 | 96 |
|
97 |
"Modified: 12.9.1996 / 02:20:45 / cg" |
|
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
98 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
99 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
100 |
cacheDirectoryName:aStringOrFilename |
472 | 101 |
"set the name of the cache directory, where checked out class |
102 |
sources are kept for faster access. The default is '/tmp/stx_sourceCache'. |
|
103 |
This cache is shared among all ST/X users on a system. |
|
104 |
The directory is typically set via the launchers setting menu, or |
|
105 |
from a startup rc-file." |
|
106 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
107 |
CacheDirectoryName := aStringOrFilename |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
108 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
109 |
"Created: 16.12.1995 / 15:18:43 / cg" |
472 | 110 |
"Modified: 12.9.1996 / 02:21:35 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
111 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
112 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
113 |
cachingSources |
472 | 114 |
"return true, if source caching is enabled. |
115 |
(see cacheDirectoryName for what that means)" |
|
116 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
117 |
^ CachingSources |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
118 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
119 |
"Created: 16.12.1995 / 15:17:50 / cg" |
472 | 120 |
"Modified: 12.9.1996 / 02:22:19 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
121 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
122 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
123 |
cachingSources:aBoolean |
472 | 124 |
"enable/disable the caching of source files. |
125 |
(see cacheDirectoryName for what that means)" |
|
126 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
127 |
CachingSources := aBoolean |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
128 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
129 |
"Created: 16.12.1995 / 15:18:13 / cg" |
472 | 130 |
"Modified: 12.9.1996 / 02:22:42 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
131 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
132 |
|
112 | 133 |
defaultManager |
472 | 134 |
"return the default sourceCodeManager class" |
135 |
||
112 | 136 |
^ DefaultManager |
137 |
||
138 |
"Created: 7.12.1995 / 17:14:22 / cg" |
|
472 | 139 |
"Modified: 12.9.1996 / 02:22:56 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
140 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
141 |
|
482
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
142 |
repositoryName |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
143 |
"return the name of the repository. |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
144 |
Since this is an abstract class, return nil (i.e. none)" |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
145 |
|
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
146 |
^ nil |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
147 |
|
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
148 |
"Modified: 12.9.1996 / 02:20:45 / cg" |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
149 |
"Created: 14.9.1996 / 13:21:37 / cg" |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
150 |
! |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
151 |
|
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
152 |
useWorkTree |
472 | 153 |
"return the setting of useWorkTree, which (eventually) |
154 |
controls if an up-to-date view of a CVS working tree should be |
|
155 |
kept in sync. This is not yet implemented." |
|
156 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
157 |
^ UseWorkTree |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
158 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
159 |
"Created: 16.12.1995 / 15:36:48 / cg" |
472 | 160 |
"Modified: 12.9.1996 / 02:24:01 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
161 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
162 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
163 |
useWorkTree:aBoolean |
472 | 164 |
"enable/disable the useWorkTree feature, which (eventually) |
165 |
controls if an up-to-date view of a CVS working tree should be |
|
166 |
kept in sync. This is not yet implemented." |
|
167 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
168 |
UseWorkTree := aBoolean |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
169 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
170 |
"Created: 16.12.1995 / 15:37:29 / cg" |
472 | 171 |
"Modified: 12.9.1996 / 02:24:38 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
172 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
173 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
174 |
workTreeDirectoryName |
472 | 175 |
"return the name of the workTree, which is kept in sync |
176 |
with the current class versions. This is not yet implemented" |
|
177 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
178 |
^ WorkTreeDirectoryName |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
179 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
180 |
"Created: 16.12.1995 / 15:35:21 / cg" |
472 | 181 |
"Modified: 12.9.1996 / 02:25:13 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
182 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
183 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
184 |
workTreeDirectoryName:aStringOrFilename |
472 | 185 |
"set the name of the workTree, which is kept in sync |
186 |
with the current class versions. This is not yet implemented" |
|
187 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
188 |
WorkTreeDirectoryName := aStringOrFilename |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
189 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
190 |
"Created: 16.12.1995 / 15:35:34 / cg" |
472 | 191 |
"Modified: 12.9.1996 / 02:25:19 / cg" |
112 | 192 |
! ! |
193 |
||
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
194 |
!AbstractSourceCodeManager class methodsFor:'basic access'! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
195 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
196 |
checkinClass:aClass fileName:classFileName directory:packageDir module:moduleDir source:sourceFile logMessage:logMessage force:force |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
197 |
"checkin of a class into the source repository. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
198 |
Return true if ok, false if not." |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
199 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
200 |
^ self subclassResponsibility. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
201 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
202 |
"Created: 14.2.1997 / 21:17:33 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
203 |
"Modified: 14.2.1997 / 21:18:48 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
204 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
205 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
206 |
streamForClass:aClass fileName:classFileName revision:revision directory:packageDir module:moduleDir cache:doCache |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
207 |
"extract a classes source code and return an open readStream on it. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
208 |
A revision of nil selects the current (in image) revision. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
209 |
The classes source code is extracted using the revision and the sourceCodeInfo, |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
210 |
which itself is extracted from the classes packageString." |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
211 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
212 |
^ self subclassResponsibility |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
213 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
214 |
"Modified: 14.2.1997 / 21:18:35 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
215 |
! ! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
216 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
217 |
!AbstractSourceCodeManager class methodsFor:'basic administration'! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
218 |
|
674
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
219 |
checkForExistingContainerForClass:aClass |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
220 |
|sourceInfo packageDir moduleDir classFileName| |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
221 |
|
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
222 |
sourceInfo := self sourceInfoOfClass:aClass. |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
223 |
sourceInfo isNil ifTrue:[ |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
224 |
('SourceCodeManager [warning]: no sourceInfo for class: ' , aClass name) errorPrintCR. |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
225 |
^ false |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
226 |
]. |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
227 |
|
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
228 |
packageDir := self packageFromSourceInfo:sourceInfo. |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
229 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
230 |
classFileName := self containerFromSourceInfo:sourceInfo. |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
231 |
|
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
232 |
^ self checkForExistingContainerInModule:moduleDir package:packageDir container:classFileName |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
233 |
|
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
234 |
"Created: / 13.5.1998 / 22:35:50 / cg" |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
235 |
! |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
236 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
237 |
checkForExistingContainerInModule:moduleName package:dirName container:fileName |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
238 |
"check for a container to be present" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
239 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
240 |
^ self subclassResponsibility. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
241 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
242 |
"Created: 9.12.1995 / 19:02:23 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
243 |
"Modified: 14.2.1997 / 21:18:56 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
244 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
245 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
246 |
checkForExistingModule:moduleName |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
247 |
"check for a module directory to be present" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
248 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
249 |
^ self subclassResponsibility. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
250 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
251 |
"Created: 9.12.1995 / 19:02:23 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
252 |
"Modified: 14.2.1997 / 21:19:01 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
253 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
254 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
255 |
checkForExistingModule:moduleDir package:packageDir |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
256 |
"check for a package directory to be present" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
257 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
258 |
^ self subclassResponsibility. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
259 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
260 |
"Created: 9.12.1995 / 19:02:23 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
261 |
"Modified: 14.2.1997 / 21:19:06 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
262 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
263 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
264 |
createContainerFor:aClass inModule:moduleName directory:dirName container:fileName |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
265 |
"create a new container & check into it an initial version of aClass" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
266 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
267 |
^ self subclassResponsibility. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
268 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
269 |
"Created: 9.12.1995 / 19:02:47 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
270 |
"Modified: 14.2.1997 / 21:19:11 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
271 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
272 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
273 |
createModule:moduleName |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
274 |
"create a new module directory" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
275 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
276 |
^ self subclassResponsibility. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
277 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
278 |
"Created: 9.12.1995 / 19:02:23 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
279 |
"Modified: 14.2.1997 / 21:19:16 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
280 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
281 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
282 |
createModule:module package:package |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
283 |
"create a new package directory" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
284 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
285 |
^ self subclassResponsibility. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
286 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
287 |
"Created: 9.12.1995 / 19:02:23 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
288 |
"Modified: 14.2.1997 / 21:19:21 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
289 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
290 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
291 |
initialRevisionStringFor:aClass inModule:moduleDir package:packageDir container:fileName |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
292 |
"return a string usable as initial revision string" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
293 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
294 |
^ self subclassResponsibility |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
295 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
296 |
"Created: 14.2.1997 / 21:01:41 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
297 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
298 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
299 |
removeContainerFor:aClass inModule:moduleName directory:dirName container:fileName |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
300 |
"remove a container" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
301 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
302 |
^ self subclassResponsibility. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
303 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
304 |
"Created: 11.9.1996 / 13:18:33 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
305 |
"Modified: 14.2.1997 / 21:19:28 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
306 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
307 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
308 |
revisionLogOf:cls fromRevision:rev1 toRevision:rev2 fileName:classFileName directory:packageDir module:moduleDir |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
309 |
"actually do return a revisionLog. The main worker method. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
310 |
This must be implemented by a concrete source-code manager" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
311 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
312 |
^ self subclassResponsibility. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
313 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
314 |
"Created: 15.11.1995 / 18:12:51 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
315 |
"Modified: 14.2.1997 / 21:14:01 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
316 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
317 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
318 |
writeHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter to:aStream |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
319 |
"send a full historyLog to some stream. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
320 |
Must be implemented by a concrete subclass." |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
321 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
322 |
^ self subclassResponsibility |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
323 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
324 |
"Modified: 14.2.1997 / 21:13:51 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
325 |
! ! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
326 |
|
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
327 |
!AbstractSourceCodeManager class methodsFor:'private'! |
71 | 328 |
|
179 | 329 |
containerFromSourceInfo:info |
472 | 330 |
"given a sourceInfo, return the classes container" |
331 |
||
179 | 332 |
(info includesKey:#fileName) ifTrue:[ |
333 |
^ info at:#fileName |
|
334 |
]. |
|
335 |
(info includesKey:#expectedFileName) ifTrue:[ |
|
336 |
^ info at:#expectedFileName |
|
337 |
]. |
|
338 |
^ (info at:#classFileNameBase) , '.st' |
|
339 |
||
472 | 340 |
"Modified: 12.9.1996 / 02:31:52 / cg" |
179 | 341 |
! |
342 |
||
96 | 343 |
directoryFromContainerPath:containerPath |
721
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
344 |
"given a full path as in an RCS header, |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
345 |
extract the directory (i.e. package)." |
148 | 346 |
|
96 | 347 |
|path idx| |
348 |
||
349 |
path := self pathInRepositoryFrom:containerPath. |
|
704 | 350 |
path isNil ifTrue:[^ nil]. |
351 |
||
352 |
"/ these are always UNIX filenames ... |
|
353 |
idx := path indexOf:$/. |
|
354 |
idx ~~ 0 ifTrue:[ |
|
355 |
path := path copyFrom:(idx + 1) |
|
96 | 356 |
]. |
721
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
357 |
|
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
358 |
"/ the code below used to be: |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
359 |
"/ ^ path asFilename directoryName |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
360 |
"/ however, that only works under UNIX, since |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
361 |
"/ we MUST return a unix pathname here. |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
362 |
"/ therefore, do what unix would do here ... |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
363 |
|
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
364 |
idx := path lastIndexOf:$/. |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
365 |
idx == 0 ifTrue:[ |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
366 |
"/ huh ? |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
367 |
^ path |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
368 |
]. |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
369 |
^ path copyTo:(idx - 1) |
96 | 370 |
|
371 |
" |
|
721
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
372 |
CVSSourceCodeManager directoryFromContainerPath:'/files/CVS/stx/libbasic/Array.st' |
96 | 373 |
" |
374 |
||
721
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
375 |
"Created: / 25.9.1998 / 15:37:06 / cg" |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
376 |
"Modified: / 25.9.1998 / 15:38:59 / cg" |
96 | 377 |
! |
378 |
||
379 |
filenameFromContainerPath:containerPath |
|
148 | 380 |
"given some path as present in an RCS Header string, extract the containers |
381 |
name. |
|
382 |
OBSOLETE - this is no longer used." |
|
383 |
||
96 | 384 |
|top rest| |
385 |
||
386 |
containerPath notNil ifTrue:[ |
|
148 | 387 |
top := self repositoryTopDirectory. |
388 |
top notNil ifTrue:[ |
|
389 |
(containerPath startsWith:(top , '/')) ifTrue:[ |
|
390 |
rest := containerPath copyFrom:(top size + 2). |
|
391 |
^ rest asFilename baseName |
|
516
183dae704f70
oops - rcsTop may or may not include a trailing slash
Claus Gittinger <cg@exept.de>
parents:
515
diff
changeset
|
392 |
]. |
183dae704f70
oops - rcsTop may or may not include a trailing slash
Claus Gittinger <cg@exept.de>
parents:
515
diff
changeset
|
393 |
(containerPath startsWith:(top)) ifTrue:[ |
183dae704f70
oops - rcsTop may or may not include a trailing slash
Claus Gittinger <cg@exept.de>
parents:
515
diff
changeset
|
394 |
rest := containerPath copyFrom:(top size + 1). |
183dae704f70
oops - rcsTop may or may not include a trailing slash
Claus Gittinger <cg@exept.de>
parents:
515
diff
changeset
|
395 |
^ rest asFilename baseName |
148 | 396 |
] |
397 |
] |
|
96 | 398 |
]. |
185 | 399 |
^ containerPath |
96 | 400 |
|
401 |
"Created: 25.11.1995 / 18:42:34 / cg" |
|
516
183dae704f70
oops - rcsTop may or may not include a trailing slash
Claus Gittinger <cg@exept.de>
parents:
515
diff
changeset
|
402 |
"Modified: 11.11.1996 / 16:04:39 / cg" |
96 | 403 |
! |
404 |
||
405 |
moduleFromContainerPath:containerPath |
|
148 | 406 |
"given a full path as in an RCS header, extract the module." |
407 |
||
96 | 408 |
|path idx| |
409 |
||
410 |
path := self pathInRepositoryFrom:containerPath. |
|
704 | 411 |
path isNil ifTrue:[^ nil]. |
412 |
||
413 |
"/ these are always UNIX filenames |
|
414 |
idx := path indexOf:$/. |
|
415 |
idx == 0 ifTrue:[^ path]. |
|
416 |
^ path copyTo:(idx - 1) |
|
96 | 417 |
|
418 |
" |
|
419 |
SourceCodeManager moduleFromContainerPath:'/files/CVS/stx/libbasic/Array.st' |
|
420 |
" |
|
421 |
||
704 | 422 |
"Created: / 25.11.1995 / 18:42:20 / cg" |
423 |
"Modified: / 11.8.1998 / 23:01:24 / cg" |
|
96 | 424 |
! |
425 |
||
179 | 426 |
moduleFromSourceInfo:info |
472 | 427 |
"given a sourceInfo, return the classes module directory" |
428 |
||
179 | 429 |
^ info at:#module. "/ use the modules name as CVS module |
430 |
||
431 |
"Created: 6.2.1996 / 17:26:38 / cg" |
|
472 | 432 |
"Modified: 12.9.1996 / 02:32:23 / cg" |
179 | 433 |
! |
434 |
||
435 |
packageFromSourceInfo:info |
|
472 | 436 |
"given a sourceInfo, return the classes package directory" |
437 |
||
179 | 438 |
^ info at:#directory. |
439 |
||
440 |
"Created: 6.2.1996 / 17:26:23 / cg" |
|
472 | 441 |
"Modified: 12.9.1996 / 02:32:19 / cg" |
179 | 442 |
! |
443 |
||
96 | 444 |
pathInRepositoryFrom:containerPath |
148 | 445 |
"this tries to extract the path within a repository, given some path |
446 |
as present in an RCS Header string. |
|
447 |
Typically, this ought to be that string directly; |
|
448 |
however, if the repository directory is accessed via a symbolic link during |
|
449 |
ci/co, some systems extract different strings with co. |
|
450 |
One such system here had a symbolic link from /phys/ibm/CVS... to /file/CVS, |
|
451 |
and extracted sources had /phys/ibm/CVS in their header. |
|
452 |
Do not depend on the code below to work correctly all the time." |
|
453 |
||
501 | 454 |
|top lastTop idx| |
96 | 455 |
|
456 |
containerPath notNil ifTrue:[ |
|
148 | 457 |
top := self repositoryTopDirectory. |
458 |
top notNil ifTrue:[ |
|
459 |
(containerPath startsWith:(top , '/')) ifTrue:[ |
|
460 |
^ containerPath copyFrom:(top size + 2). |
|
461 |
]. |
|
515
74ee7c511219
oops - rcsTop may or may not include a trailing slash
Claus Gittinger <cg@exept.de>
parents:
514
diff
changeset
|
462 |
(containerPath startsWith:(top)) ifTrue:[ |
74ee7c511219
oops - rcsTop may or may not include a trailing slash
Claus Gittinger <cg@exept.de>
parents:
514
diff
changeset
|
463 |
^ containerPath copyFrom:(top size + 1). |
74ee7c511219
oops - rcsTop may or may not include a trailing slash
Claus Gittinger <cg@exept.de>
parents:
514
diff
changeset
|
464 |
]. |
148 | 465 |
|
466 |
"/ hardcase - the repository-filename in the versionInfo |
|
467 |
"/ does no match my repository top. |
|
468 |
"/ check for mangled prefix (happens with symbolic links) |
|
469 |
||
470 |
lastTop := '/' , top asFilename baseName, '/'. |
|
471 |
idx := containerPath indexOfSubCollection:lastTop. |
|
472 |
idx ~~ 0 ifTrue:[ |
|
535 | 473 |
('SourceCodeManager [warning]: warning: repository path mismatch: ' , (containerPath copyTo:idx-1) , lastTop , ' vs. ' , top , '/') infoPrintCR. |
474 |
'SourceCodeManager [info]: warning: assuming that mismatch is ok.' infoPrintCR. |
|
148 | 475 |
^ containerPath copyFrom:(idx + lastTop size). |
476 |
] |
|
477 |
] |
|
96 | 478 |
]. |
501 | 479 |
^ nil |
96 | 480 |
|
481 |
" |
|
482 |
SourceCodeManager pathInRepositoryFrom:'/files/CVS/stx/libbasic/Array.st' |
|
483 |
SourceCodeManager pathInRepositoryFrom:'/phys/ibm/CVS/stx/libbasic/Array.st' |
|
484 |
" |
|
485 |
||
486 |
"Created: 25.11.1995 / 18:42:20 / cg" |
|
535 | 487 |
"Modified: 10.1.1997 / 15:13:25 / cg" |
96 | 488 |
! |
489 |
||
490 |
repositoryTopDirectory |
|
472 | 491 |
"return the name of the repository" |
492 |
||
96 | 493 |
^ nil |
494 |
||
495 |
"Created: 25.11.1995 / 18:38:59 / cg" |
|
472 | 496 |
"Modified: 12.9.1996 / 02:32:40 / cg" |
96 | 497 |
! |
498 |
||
87 | 499 |
revisionAfter:aRevisionString |
472 | 500 |
"generate the next revision number after the given number" |
501 |
||
501 | 502 |
|idx| |
87 | 503 |
|
504 |
idx := aRevisionString lastIndexOf:$.. |
|
505 |
idx == 0 ifTrue:[ |
|
472 | 506 |
^ ((Integer readFrom:aRevisionString) + 1) printString |
87 | 507 |
]. |
508 |
||
509 |
^ (aRevisionString copyTo:idx) , ((Integer readFrom:(aRevisionString copyFrom:(idx+1)))+1) printString |
|
510 |
||
511 |
" |
|
512 |
SourceCodeManager revisionAfter:'1.2.3.4' |
|
513 |
SourceCodeManager revisionAfter:'123' |
|
514 |
SourceCodeManager revisionAfter:'1.24' |
|
515 |
" |
|
516 |
||
517 |
"Created: 20.11.1995 / 12:54:05 / cg" |
|
472 | 518 |
"Modified: 12.9.1996 / 02:33:03 / cg" |
87 | 519 |
! |
520 |
||
71 | 521 |
sourceCacheDirectory |
472 | 522 |
"return the sourceCache directories name" |
523 |
||
71 | 524 |
|dir nm| |
525 |
||
526 |
(nm := self cacheDirectoryName) isNil ifTrue:[^ nil]. |
|
69 | 527 |
|
71 | 528 |
(dir := nm asFilename) exists ifFalse:[ |
173
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
529 |
dir makeDirectory. |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
530 |
dir exists ifFalse:[ |
535 | 531 |
'SourceCodeManager [warning]: could not create cache dir ''' , CacheDirectoryName , '''' infoPrintCR. |
173
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
532 |
^ nil |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
533 |
]. |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
534 |
"/ |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
535 |
"/ make it read/writable for everyone |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
536 |
"/ |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
537 |
dir makeReadableForAll. |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
538 |
dir makeWritableForAll. |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
539 |
dir makeExecutableForAll. |
71 | 540 |
]. |
541 |
^ dir |
|
173
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
542 |
|
535 | 543 |
"Modified: 10.1.1997 / 15:13:20 / cg" |
71 | 544 |
! |
69 | 545 |
|
96 | 546 |
sourceInfoOfClass:aClass |
547 |
"helper: return a classes sourceCodeInfo" |
|
548 |
||
183 | 549 |
|cls binaryInfo revInfo actualSourceFileName classFileNameBase |
501 | 550 |
newInfo container expectedFileName |
179 | 551 |
directoryFromRev moduleFromRev fileNameFromRev directoryFromBin moduleFromBin| |
96 | 552 |
|
553 |
cls := aClass. |
|
554 |
cls isMeta ifTrue:[ |
|
160 | 555 |
cls := cls soleInstance |
96 | 556 |
]. |
557 |
||
179 | 558 |
newInfo := IdentityDictionary new. |
559 |
||
96 | 560 |
"/ |
561 |
"/ the info given by the classes source ... |
|
562 |
"/ |
|
563 |
revInfo := aClass revisionInfo. |
|
179 | 564 |
revInfo notNil ifTrue:[ |
565 |
revInfo keysAndValuesDo:[:key :value | |
|
566 |
newInfo at:key put:value |
|
567 |
] |
|
568 |
]. |
|
96 | 569 |
|
570 |
"/ |
|
571 |
"/ the info given by the classes binary ... |
|
572 |
"/ if present, we better trust that one. |
|
179 | 573 |
"/ however, it only contains partial information (directory & module). |
574 |
"/ (but is available even without a source) |
|
96 | 575 |
"/ |
179 | 576 |
binaryInfo := cls packageSourceCodeInfo. |
577 |
binaryInfo notNil ifTrue:[ |
|
578 |
binaryInfo keysAndValuesDo:[:key :value | |
|
579 |
newInfo at:key put:value |
|
160 | 580 |
] |
96 | 581 |
]. |
582 |
||
179 | 583 |
"/ |
584 |
"/ no information |
|
585 |
"/ |
|
586 |
(binaryInfo isNil and:[revInfo isNil]) ifTrue:[ |
|
535 | 587 |
('SourceCodeManager [warning]: class `' , aClass name , ''' has neither source nor compiled-in info') infoPrintCR. |
179 | 588 |
^ nil |
589 |
]. |
|
96 | 590 |
|
591 |
"/ |
|
179 | 592 |
"/ validate for conflicts |
593 |
"/ trust binary if in doubt |
|
594 |
"/ (in case some cheater edited the version string) |
|
595 |
||
596 |
revInfo notNil ifTrue:[ |
|
597 |
(revInfo includesKey:#repositoryPathName) ifTrue:[ |
|
598 |
container := revInfo at:#repositoryPathName ifAbsent:nil. |
|
704 | 599 |
directoryFromRev := self directoryFromContainerPath:container. |
600 |
directoryFromRev notNil ifTrue:[ |
|
601 |
newInfo at:#directory put:directoryFromRev. |
|
602 |
]. |
|
603 |
moduleFromRev := self moduleFromContainerPath:container. |
|
604 |
moduleFromRev notNil ifTrue:[ |
|
605 |
newInfo at:#module put:moduleFromRev. |
|
606 |
]. |
|
185 | 607 |
fileNameFromRev := container asFilename baseName. |
704 | 608 |
(fileNameFromRev endsWith:',v') ifTrue:[ |
609 |
fileNameFromRev := fileNameFromRev copyWithoutLast:2. |
|
610 |
]. |
|
611 |
newInfo at:#fileName put:fileNameFromRev. |
|
179 | 612 |
|
613 |
binaryInfo notNil ifTrue:[ |
|
614 |
(binaryInfo includesKey:#directory) ifTrue:[ |
|
615 |
directoryFromBin := binaryInfo at:#directory. |
|
616 |
moduleFromBin := binaryInfo at:#module. |
|
96 | 617 |
|
179 | 618 |
(directoryFromBin ~= directoryFromRev |
619 |
or:[moduleFromBin ~= moduleFromRev]) ifTrue:[ |
|
187
fdda79120bbb
in sourceInfoOfClass: be prepared for binInfo present, but no sourceInfo
Claus Gittinger <cg@exept.de>
parents:
185
diff
changeset
|
620 |
(directoryFromRev isNil or:[moduleFromRev isNil]) ifTrue:[ |
583
aeb05843bd69
suppress annoying warning message about binary vs. source info,
Claus Gittinger <cg@exept.de>
parents:
582
diff
changeset
|
621 |
directoryFromBin ~= 'no package' ifTrue:[ |
aeb05843bd69
suppress annoying warning message about binary vs. source info,
Claus Gittinger <cg@exept.de>
parents:
582
diff
changeset
|
622 |
('SourceCodeManager [info]: using binary info: ' |
aeb05843bd69
suppress annoying warning message about binary vs. source info,
Claus Gittinger <cg@exept.de>
parents:
582
diff
changeset
|
623 |
, moduleFromBin , '/' , directoryFromBin |
aeb05843bd69
suppress annoying warning message about binary vs. source info,
Claus Gittinger <cg@exept.de>
parents:
582
diff
changeset
|
624 |
) infoPrintCR. |
aeb05843bd69
suppress annoying warning message about binary vs. source info,
Claus Gittinger <cg@exept.de>
parents:
582
diff
changeset
|
625 |
newInfo at:#directory put:directoryFromBin. |
aeb05843bd69
suppress annoying warning message about binary vs. source info,
Claus Gittinger <cg@exept.de>
parents:
582
diff
changeset
|
626 |
newInfo at:#module put:moduleFromBin. |
aeb05843bd69
suppress annoying warning message about binary vs. source info,
Claus Gittinger <cg@exept.de>
parents:
582
diff
changeset
|
627 |
] |
187
fdda79120bbb
in sourceInfoOfClass: be prepared for binInfo present, but no sourceInfo
Claus Gittinger <cg@exept.de>
parents:
185
diff
changeset
|
628 |
] ifFalse:[ |
581
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
629 |
directoryFromBin ~= 'no package' ifTrue:[ |
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
630 |
('SourceCodeManager [warning]: conflicting source infos (binary: ' |
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
631 |
, moduleFromBin , '/' , directoryFromBin |
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
632 |
, ' vs. source:' |
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
633 |
, moduleFromRev , '/' , directoryFromRev |
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
634 |
, ')') infoPrintCR. |
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
635 |
] |
583
aeb05843bd69
suppress annoying warning message about binary vs. source info,
Claus Gittinger <cg@exept.de>
parents:
582
diff
changeset
|
636 |
] |
179 | 637 |
] |
638 |
] |
|
639 |
]. |
|
640 |
] |
|
641 |
]. |
|
642 |
||
643 |
"/ |
|
644 |
"/ the filename I'd expect from its name ... |
|
645 |
"/ |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
646 |
aClass owningClass notNil ifTrue:[ |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
647 |
classFileNameBase := Smalltalk fileNameForClass:aClass topOwningClass |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
648 |
] ifFalse:[ |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
649 |
classFileNameBase := Smalltalk fileNameForClass:aClass. |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
650 |
]. |
179 | 651 |
|
652 |
(newInfo includesKey:#fileName) ifFalse:[ |
|
653 |
newInfo at:#fileName put:(classFileNameBase , '.st') |
|
654 |
]. |
|
655 |
||
656 |
"/ guess on the container |
|
657 |
container isNil ifTrue:[ |
|
183 | 658 |
(newInfo includesKey:#directory) ifTrue:[ |
659 |
(newInfo includesKey:#module) ifTrue:[ |
|
705 | 660 |
container := (newInfo at:#module) |
661 |
, '/' |
|
662 |
, (newInfo at:#directory) |
|
663 |
, '/' |
|
664 |
, classFileNameBase , '.st,v'. |
|
179 | 665 |
] |
666 |
] |
|
667 |
]. |
|
668 |
||
669 |
container notNil ifTrue:[ |
|
670 |
newInfo at:#repositoryPathName put:container. |
|
96 | 671 |
]. |
672 |
||
673 |
"/ check .. |
|
674 |
revInfo notNil ifTrue:[ |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
675 |
|
160 | 676 |
actualSourceFileName := revInfo at:#fileName ifAbsent:nil. |
677 |
actualSourceFileName notNil ifTrue:[ |
|
179 | 678 |
expectedFileName := classFileNameBase , '.st'. |
679 |
actualSourceFileName ~= expectedFileName ifTrue:[ |
|
535 | 680 |
('SourceCodeManager [warning]: source of class ' , aClass name , ' in ' , actualSourceFileName , ';') infoPrintCR. |
681 |
('SourceCodeManager [info]: (expected: ' , expectedFileName , '); renamed or missing abbreviation ?') infoPrintCR. |
|
682 |
('SourceCodeManager [info]: This may fail to autoload later if left unchanged.') infoPrintCR. |
|
179 | 683 |
newInfo at:#expectedFileName put:expectedFileName. |
160 | 684 |
newInfo at:#renamed put:true. |
179 | 685 |
classFileNameBase := actualSourceFileName copyWithoutLast:3 |
160 | 686 |
] |
687 |
] |
|
96 | 688 |
]. |
689 |
||
179 | 690 |
newInfo at:#classFileNameBase put:classFileNameBase. |
96 | 691 |
^ newInfo |
692 |
||
704 | 693 |
" |
694 |
self sourceInfoOfClass:Array |
|
695 |
" |
|
696 |
||
705 | 697 |
"Modified: / 11.8.1998 / 23:05:05 / cg" |
95 | 698 |
! ! |
699 |
||
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
700 |
!AbstractSourceCodeManager class methodsFor:'source code access'! |
95 | 701 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
702 |
checkinClass:aClass fileName:classFileName directory:packageDir module:moduleDir logMessage:logMessage |
95 | 703 |
"checkin of a class into the source repository. |
704 |
Return true if ok, false if not." |
|
705 |
||
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
706 |
^ self |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
707 |
checkinClass:aClass |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
708 |
fileName:classFileName |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
709 |
directory:packageDir |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
710 |
module:moduleDir |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
711 |
logMessage:logMessage |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
712 |
force:false |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
713 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
714 |
"Modified: 11.9.1996 / 16:15:43 / cg" |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
715 |
! |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
716 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
717 |
checkinClass:aClass fileName:classFileName directory:packageDir module:moduleDir logMessage:logMessage force:force |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
718 |
"checkin of a class into the source repository. |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
719 |
Return true if ok, false if not." |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
720 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
721 |
|tempDir tempFile ok| |
71 | 722 |
|
619
16b4d6ffaa0e
Fix checkinClass:fileName:directory:module... (makeDirectory returns
Stefan Vogel <sv@exept.de>
parents:
616
diff
changeset
|
723 |
tempDir := (Filename newTemporaryIn:nil) makeDirectory; yourself. |
71 | 724 |
[ |
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
725 |
|aStream| |
75 | 726 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
727 |
tempFile := tempDir construct:classFileName. |
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
728 |
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
|
729 |
aStream isNil ifTrue:[ |
375
476a8a705f0d
show reason why fileOut failed (on stderr)
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
730 |
'SOURCEMGR: temporary fileout failed' errorPrintCR. |
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
731 |
^ false |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
732 |
]. |
71 | 733 |
|
184
e682441f91cb
flush methods fileCache before filingOut
Claus Gittinger <cg@exept.de>
parents:
183
diff
changeset
|
734 |
Method flushSourceStreamCache. |
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
735 |
Class fileOutErrorSignal handle:[:ex | |
375
476a8a705f0d
show reason why fileOut failed (on stderr)
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
736 |
'SOURCEMGR: fileout failed.' errorPrintCR. |
476a8a705f0d
show reason why fileOut failed (on stderr)
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
737 |
'SOURCEMGR: reason: ' errorPrint. ex errorString printCR. |
476a8a705f0d
show reason why fileOut failed (on stderr)
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
738 |
|
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
739 |
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
|
740 |
^ false |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
741 |
] do:[ |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
742 |
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
|
743 |
]. |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
744 |
aStream close. |
71 | 745 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
746 |
tempFile exists ifFalse:[ |
375
476a8a705f0d
show reason why fileOut failed (on stderr)
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
747 |
'SOURCEMGR: temporary fileout failed' errorPrintCR. |
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
748 |
^ false |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
749 |
]. |
75 | 750 |
|
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
751 |
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
|
752 |
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
|
753 |
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
|
754 |
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
|
755 |
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
|
756 |
source:(tempFile name) |
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
757 |
logMessage:logMessage |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
758 |
force:force. |
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
759 |
|
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
760 |
^ ok |
71 | 761 |
] 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
|
762 |
tempDir recursiveRemove |
71 | 763 |
]. |
764 |
^ false |
|
765 |
||
766 |
" |
|
767 |
SourceCodeManager checkinClass:Array |
|
768 |
" |
|
769 |
||
375
476a8a705f0d
show reason why fileOut failed (on stderr)
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
770 |
"Modified: 12.7.1996 / 23:38:36 / cg" |
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
771 |
"Created: 11.9.1996 / 16:15:17 / cg" |
619
16b4d6ffaa0e
Fix checkinClass:fileName:directory:module... (makeDirectory returns
Stefan Vogel <sv@exept.de>
parents:
616
diff
changeset
|
772 |
"Modified: 25.9.1997 / 12:16:00 / stefan" |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
773 |
! |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
774 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
775 |
checkinClass:aClass logMessage:logMessage |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
776 |
"checkin of a class into the source repository. |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
777 |
Return true if ok, false if not." |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
778 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
779 |
|sourceInfo packageDir moduleDir classFileName| |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
780 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
781 |
sourceInfo := self sourceInfoOfClass:aClass. |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
782 |
sourceInfo isNil ifTrue:[ |
537 | 783 |
('SourceCodeManager [warning]: no sourceInfo for class: ' , aClass name) errorPrintCR. |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
784 |
^ false |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
785 |
]. |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
786 |
|
179 | 787 |
packageDir := self packageFromSourceInfo:sourceInfo. |
788 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
|
789 |
classFileName := self containerFromSourceInfo:sourceInfo. |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
790 |
|
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
791 |
^ self |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
792 |
checkinClass:aClass |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
793 |
fileName:classFileName |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
794 |
directory:packageDir |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
795 |
module:moduleDir |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
796 |
logMessage:logMessage |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
797 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
798 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
799 |
" |
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
800 |
SourceCodeManager checkinClass:Array logMessage:'foo' |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
801 |
" |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
802 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
803 |
"Created: 6.11.1995 / 18:56:00 / cg" |
537 | 804 |
"Modified: 10.1.1997 / 17:26:48 / cg" |
71 | 805 |
! |
806 |
||
493
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
807 |
getMostRecentSourceStreamForClassNamed:aClassName |
472 | 808 |
"given a class, return an open stream to its most recent source |
809 |
(not knowing anything about its version). |
|
810 |
Used when autoloading classes." |
|
811 |
||
745
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
812 |
^ self |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
813 |
getMostRecentSourceStreamForClassNamed:aClassName |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
814 |
inPackage:nil |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
815 |
! |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
816 |
|
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
817 |
getMostRecentSourceStreamForClassNamed:aClassName inPackage:forcedPackage |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
818 |
"given a class, return an open stream to its most recent source |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
819 |
(not knowing anything about its version). |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
820 |
Used when autoloading classes or to compare a classes source with the most |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
821 |
recent found in the repostitory. |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
822 |
The forcePackage argument passes the classes package information |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
823 |
and is only required when autoloading or when the class is not already |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
824 |
present (i.e. there is no way to extract the package info). |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
825 |
If nil, the package is extracted from the class - which must exist." |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
826 |
|
557
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
827 |
|cls sourceInfo classFileName packageDir moduleDir s m components| |
71 | 828 |
|
133 | 829 |
cls := Smalltalk classNamed:aClassName. |
830 |
cls notNil ifTrue:[ |
|
831 |
sourceInfo := self sourceInfoOfClass:cls. |
|
832 |
]. |
|
833 |
sourceInfo notNil ifTrue:[ |
|
179 | 834 |
packageDir := self packageFromSourceInfo:sourceInfo. |
835 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
|
836 |
classFileName := self containerFromSourceInfo:sourceInfo. |
|
133 | 837 |
] ifFalse:[ |
179 | 838 |
classFileName := (Smalltalk fileNameForClass:aClassName) , '.st'. |
133 | 839 |
packageDir := Smalltalk sourceDirectoryNameOfClass:aClassName. |
745
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
840 |
(packageDir notNil and:[packageDir startsWith:'stx/']) ifTrue:[ |
744 | 841 |
packageDir := packageDir copyFrom:5. |
842 |
]. |
|
133 | 843 |
moduleDir := 'stx'. |
844 |
]. |
|
845 |
||
846 |
packageDir isNil ifTrue:[ |
|
745
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
847 |
forcedPackage isNil ifTrue:[ |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
848 |
'SourceCodeManager [warning]: could not extract packageDir' errorPrintCR. |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
849 |
^ nil |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
850 |
]. |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
851 |
packageDir := forcedPackage copyFrom:(forcedPackage indexOf:$/) + 1. |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
852 |
moduleDir := forcedPackage copyTo:(forcedPackage indexOf:$/) - 1. |
133 | 853 |
]. |
71 | 854 |
|
557
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
855 |
s := self |
133 | 856 |
streamForClass:nil |
857 |
fileName:classFileName |
|
858 |
revision:#newest |
|
859 |
directory:packageDir |
|
860 |
module:moduleDir |
|
557
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
861 |
cache:false. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
862 |
|
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
863 |
s isNil ifTrue:[ |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
864 |
"/ guessed moduleDir ? |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
865 |
|
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
866 |
sourceInfo isNil ifTrue:[ |
611 | 867 |
components := Filename concreteClass components:packageDir. |
557
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
868 |
moduleDir := components first. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
869 |
packageDir := (Filename fromComponents:(components copyFrom:2)) asString. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
870 |
s := self |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
871 |
streamForClass:nil |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
872 |
fileName:classFileName |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
873 |
revision:#newest |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
874 |
directory:packageDir |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
875 |
module:moduleDir |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
876 |
cache:false. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
877 |
] |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
878 |
]. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
879 |
^ s. |
71 | 880 |
|
493
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
881 |
"Created: 12.10.1996 / 17:22:54 / cg" |
611 | 882 |
"Modified: 8.9.1997 / 00:21:27 / cg" |
71 | 883 |
! |
884 |
||
493
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
885 |
getSourceStreamFor:aClass |
58 | 886 |
"extract a classes source code and return an open readStream on it. |
887 |
The classes source code is extracted using the revision and the sourceCodeInfo, |
|
888 |
which itself is extracted from the classes packageString." |
|
889 |
||
493
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
890 |
^ self getSourceStreamFor:aClass revision:nil |
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
891 |
|
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
892 |
"Created: 12.10.1996 / 17:21:03 / cg" |
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
893 |
"Modified: 12.10.1996 / 17:22:02 / cg" |
83
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
894 |
! |
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
895 |
|
493
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
896 |
getSourceStreamFor:aClass revision:aRevisionStringOrNil |
83
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
897 |
"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
|
898 |
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
|
899 |
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
|
900 |
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
|
901 |
|
96 | 902 |
|classFileName revision |
501 | 903 |
packageDir moduleDir sourceInfo| |
58 | 904 |
|
83
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
905 |
aRevisionStringOrNil isNil ifTrue:[ |
179 | 906 |
revision := aClass binaryRevision. |
907 |
revision isNil ifTrue:[ |
|
191
ebdb455a26ce
take revision if no binaryRevision is available (in sourceStream for ...)
ca
parents:
187
diff
changeset
|
908 |
revision := aClass revision. |
ebdb455a26ce
take revision if no binaryRevision is available (in sourceStream for ...)
ca
parents:
187
diff
changeset
|
909 |
revision isNil ifTrue:[ |
535 | 910 |
('SourceCodeManager [warning]: class `' , aClass name , ''' has no revision string') infoPrintCR. |
191
ebdb455a26ce
take revision if no binaryRevision is available (in sourceStream for ...)
ca
parents:
187
diff
changeset
|
911 |
^ nil. |
ebdb455a26ce
take revision if no binaryRevision is available (in sourceStream for ...)
ca
parents:
187
diff
changeset
|
912 |
]. |
535 | 913 |
('SourceCodeManager [info]: trusting classes revision ...') infoPrintCR. |
179 | 914 |
] |
83
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
915 |
] ifFalse:[ |
179 | 916 |
revision := aRevisionStringOrNil |
58 | 917 |
]. |
918 |
||
95 | 919 |
sourceInfo := self sourceInfoOfClass:aClass. |
920 |
sourceInfo isNil ifTrue:[^ nil]. |
|
58 | 921 |
|
179 | 922 |
packageDir := self packageFromSourceInfo:sourceInfo. |
923 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
|
924 |
classFileName := self containerFromSourceInfo:sourceInfo. |
|
58 | 925 |
^ self |
179 | 926 |
streamForClass:aClass |
927 |
fileName:classFileName |
|
928 |
revision:revision |
|
929 |
directory:packageDir |
|
930 |
module:moduleDir |
|
931 |
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
|
932 |
|
704 | 933 |
"Created: / 12.10.1996 / 17:21:52 / cg" |
934 |
"Modified: / 11.8.1998 / 22:33:41 / cg" |
|
58 | 935 |
! ! |
936 |
||
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
937 |
!AbstractSourceCodeManager class methodsFor:'source code administration'! |
59
3bb0b97dffa2
reorganized; shared methods into AbstractSCMMgr
Claus Gittinger <cg@exept.de>
parents:
58
diff
changeset
|
938 |
|
677 | 939 |
getExistingContainersInModule:aModule package:aPackage |
940 |
"{ Pragma: +optSpace }" |
|
941 |
||
942 |
"return a collection containing the names of existing containers" |
|
943 |
||
944 |
^ self subclassResponsibility |
|
945 |
||
946 |
"Modified: / 29.1.1997 / 18:57:29 / cg" |
|
947 |
"Created: / 20.5.1998 / 19:49:12 / cg" |
|
948 |
! |
|
949 |
||
676 | 950 |
getExistingModules |
951 |
"{ Pragma: +optSpace }" |
|
952 |
||
953 |
"return a collection containing the names of existing modules" |
|
954 |
||
955 |
^ self subclassResponsibility |
|
956 |
||
957 |
"Modified: / 29.1.1997 / 18:57:29 / cg" |
|
958 |
"Created: / 20.5.1998 / 19:38:23 / cg" |
|
959 |
! |
|
960 |
||
961 |
getExistingPackagesInModule:aModule |
|
962 |
"{ Pragma: +optSpace }" |
|
963 |
||
964 |
"return a collection containing the names of existing packages" |
|
965 |
||
966 |
^ self subclassResponsibility |
|
967 |
||
968 |
"Modified: / 29.1.1997 / 18:57:29 / cg" |
|
969 |
"Created: / 20.5.1998 / 19:38:34 / cg" |
|
970 |
! |
|
971 |
||
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
972 |
initialRCSRevisionStringFor:aClass in:dir container:fileName |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
973 |
"return a string usable as initial revision string" |
122
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
974 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
975 |
"/ do not make the string below into one string; |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
976 |
"/ RCS would expand it into a wrong rev-string |
122
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
977 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
978 |
|nm oldRev idx special| |
472 | 979 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
980 |
nm := fileName. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
981 |
(nm endsWith:',v') ifTrue:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
982 |
nm := nm copyWithoutLast:2 |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
983 |
]. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
984 |
(nm endsWith:'.st') ifFalse:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
985 |
nm := nm , '.st' |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
986 |
]. |
122
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
987 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
988 |
oldRev := aClass revisionString. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
989 |
special := ''. |
122
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
990 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
991 |
oldRev notNil ifTrue:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
992 |
idx := oldRev lastIndexOf:$[. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
993 |
idx ~~ 0 ifTrue:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
994 |
idx := oldRev indexOf:$[ startingAt:idx+1. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
995 |
idx ~~ 0 ifTrue:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
996 |
special := ' ' , (oldRev copyFrom:idx). |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
997 |
] |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
998 |
] |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
999 |
]. |
122
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
1000 |
|
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
1001 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1002 |
^ '$' , 'Header: ' , dir , '/' , fileName , ',v $' |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1003 |
, special |
472 | 1004 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1005 |
"Modified: 17.9.1996 / 15:57:15 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1006 |
"Created: 14.2.1997 / 20:59:28 / cg" |
122
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
1007 |
! |
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
1008 |
|
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1009 |
newestRevisionInFile:classFileName directory:packageDir module:moduleDir |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1010 |
"return the newest revision found in a container. |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1011 |
Return nil on failure." |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1012 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1013 |
|log| |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1014 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1015 |
log := self |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1016 |
revisionLogOf:nil |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1017 |
fromRevision:0 |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1018 |
toRevision:0 |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1019 |
fileName:classFileName |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1020 |
directory:packageDir |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1021 |
module:moduleDir. |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1022 |
|
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1023 |
log isNil ifTrue:[^ nil]. |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1024 |
^ log at:#newestRevision ifAbsent:nil |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1025 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1026 |
" |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1027 |
SourceCodeManager newestRevisionInFile:'Array.st' directory:'libbasic' module:'stx' |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1028 |
" |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1029 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1030 |
"Modified: 10.1.1997 / 13:31:42 / cg" |
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1031 |
! |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1032 |
|
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1033 |
newestRevisionLogEntryOf:aClass |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1034 |
"return the newest revisions log found in the repository. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1035 |
Return nil on failure." |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1036 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1037 |
^ self revisionLogOf:aClass fromRevision:0 toRevision:0. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1038 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1039 |
" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1040 |
SourceCodeManager newestRevisionLogEntryOf:Array |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1041 |
SourceCodeManager newestRevisionLogEntryOf:Connection |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1042 |
" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1043 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1044 |
"Modified: 10.1.1997 / 13:30:36 / cg" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1045 |
"Created: 29.1.1997 / 18:50:12 / cg" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1046 |
! |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1047 |
|
207
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1048 |
newestRevisionOf:aClass |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1049 |
"return the newest revision (as string) found in the repository. |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1050 |
Return nil on failure." |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1051 |
|
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1052 |
|log| |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1053 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1054 |
log := self revisionLogOf:aClass fromRevision:0 toRevision:0. |
207
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1055 |
log isNil ifTrue:[^ nil]. |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1056 |
^ log at:#newestRevision ifAbsent:nil |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1057 |
|
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1058 |
" |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1059 |
SourceCodeManager newestRevisionOf:Array |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1060 |
SourceCodeManager newestRevisionOf:Connection |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1061 |
" |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1062 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1063 |
"Modified: 10.1.1997 / 13:30:36 / cg" |
207
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1064 |
! |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1065 |
|
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1066 |
revisionInfoFromRCSString:aString |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1067 |
"{ Pragma: +optSpace }" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1068 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1069 |
"return a dictionary filled with revision info. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1070 |
This extracts the relevant info from aString." |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1071 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1072 |
|words info nm mgr| |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1073 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1074 |
info := IdentityDictionary new. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1075 |
words := aString asCollectionOfWords. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1076 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1077 |
words notEmpty ifTrue:[ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1078 |
"/ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1079 |
"/ supported formats: |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1080 |
"/ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1081 |
"/ $-Header: pathName rev date time user state $ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1082 |
"/ $-Revision: rev $ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1083 |
"/ $-Id: fileName rev date time user state $ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1084 |
"/ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1085 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1086 |
((words at:1) = '$Header:') ifTrue:[ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1087 |
nm := words at:2. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1088 |
info at:#repositoryPathName put:nm. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1089 |
(nm endsWith:',v') ifTrue:[ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1090 |
nm := nm copyWithoutLast:2 |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1091 |
]. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1092 |
info at:#fileName put:nm asFilename baseName. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1093 |
words size > 2 ifTrue:[ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1094 |
(words at:3) = '$' ifFalse:[ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1095 |
info at:#revision put:(words at:3). |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1096 |
(words at:4) = '$' ifFalse:[ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1097 |
info at:#date put:(words at:4). |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1098 |
info at:#time put:(words at:5). |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1099 |
info at:#user put:(words at:6). |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1100 |
info at:#state put:(words at:7). |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1101 |
] |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1102 |
]. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1103 |
]. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1104 |
^ info |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1105 |
]. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1106 |
((words at:1) = '$Revision:') ifTrue:[ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1107 |
info at:#revision put:(words at:2). |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1108 |
^ info |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1109 |
]. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1110 |
((words at:1) = '$Id:') ifTrue:[ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1111 |
info at:#fileName put:(words at:2). |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1112 |
info at:#revision put:(words at:3). |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1113 |
info at:#date put:(words at:4). |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1114 |
info at:#time put:(words at:5). |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1115 |
info at:#user put:(words at:6). |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1116 |
info at:#state put:(words at:7). |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1117 |
^ info |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1118 |
]. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1119 |
]. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1120 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1121 |
^ nil |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1122 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1123 |
" |
745
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1124 |
SourceCodeManager revisionInfoFromString:'$Revision: 1.91 $' |
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1125 |
SourceCodeManager revisionInfoFromString:(SourceCodeManager version) |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1126 |
" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1127 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1128 |
"Modified: 29.1.1997 / 18:56:31 / cg" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1129 |
! |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1130 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1131 |
revisionInfoFromString:aString |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1132 |
"{ Pragma: +optSpace }" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1133 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1134 |
"return a dictionary filled with revision info. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1135 |
This extracts the relevant info from aString." |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1136 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1137 |
^ self subclassResponsibility |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1138 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1139 |
"Created: 29.1.1997 / 18:54:52 / cg" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1140 |
"Modified: 29.1.1997 / 18:57:29 / cg" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1141 |
! |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1142 |
|
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1143 |
revisionLogInFile:classFileName directory:packageDir module:moduleDir |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1144 |
"return info about the repository container and |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1145 |
(part of) the revisionlog as a collection of revision entries. |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1146 |
Return nil on failure. |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1147 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1148 |
The returned information is a structure (IdentityDictionary) |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1149 |
filled with: |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1150 |
#container -> the RCS container file name |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1151 |
#filename -> the actual source file name |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1152 |
#newestRevision -> the revisionString of the newest revision |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1153 |
#numberOfRevisions -> the number of revisions in the container |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1154 |
#revisions -> collection of per-revision info (see below) |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1155 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1156 |
per revision info consists of one record per revision: |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1157 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1158 |
#revision -> the revision string |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1159 |
#author -> who checked that revision into the repository |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1160 |
#date -> when was it checked in |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1161 |
#state -> the RCS state |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1162 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1163 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1164 |
revisions are ordered newest first |
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1165 |
(i.e. the last entry is for the initial revision; |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1166 |
the first for the most recent one) |
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1167 |
" |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1168 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1169 |
^ self |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1170 |
revisionLogOf:nil |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1171 |
fromRevision:nil |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1172 |
toRevision:nil |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1173 |
fileName:classFileName |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1174 |
directory:packageDir |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1175 |
module:moduleDir |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1176 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1177 |
" |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1178 |
CVSSourceCodeManager |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1179 |
revisionLogInFile:'Array.st' directory:'libbasic' module:'stx' |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1180 |
" |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1181 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1182 |
"Modified: 10.1.1997 / 13:29:06 / cg" |
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1183 |
! |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1184 |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1185 |
revisionLogOf:aClass |
95 | 1186 |
"return info about the repository container and |
1187 |
the revisionlog as a collection of revision entries. |
|
1188 |
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
|
1189 |
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
|
1190 |
filled with: |
95 | 1191 |
#container -> the RCS container file name |
1192 |
#filename -> the actual source file name |
|
1193 |
#newestRevision -> the revisionString of the newest revision |
|
1194 |
#numberOfRevisions -> the number of revisions in the container |
|
1195 |
#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
|
1196 |
|
95 | 1197 |
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
|
1198 |
|
95 | 1199 |
#revision -> the revision string |
1200 |
#author -> who checked that revision into the repository |
|
1201 |
#date -> when was it checked in |
|
1202 |
#state -> the RCS state |
|
1203 |
#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
|
1204 |
|
95 | 1205 |
revisions are ordered newest first |
1206 |
(i.e. the last entry is for the initial revision; the first for the most recent one) |
|
1207 |
" |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1208 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1209 |
^ self |
95 | 1210 |
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
|
1211 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1212 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1213 |
SourceCodeManager revisionLogOf:Array |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1214 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1215 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1216 |
"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
|
1217 |
"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
|
1218 |
! |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1219 |
|
110 | 1220 |
revisionLogOf:aClass fromRevision:rev1 |
1221 |
"return info about the repository container and |
|
1222 |
(part of) the revisionlog as a collection of revision entries. |
|
1223 |
Return nil on failure. |
|
1224 |
||
1225 |
The returned information is a structure (IdentityDictionary) |
|
1226 |
filled with: |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1227 |
#container -> the RCS container file name |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1228 |
#filename -> the actual source file name |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1229 |
#newestRevision -> the revisionString of the newest revision |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1230 |
#numberOfRevisions -> the number of revisions in the container |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1231 |
#revisions -> collection of per-revision info (see below) |
110 | 1232 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1233 |
for some classes, additional info is returned: |
110 | 1234 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1235 |
#renamed -> true if the class has been renamed or copied |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1236 |
and the sourceInfo is from the previous one |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1237 |
#expectedFileName -> the filename we would expect (i.e. for the new class) |
110 | 1238 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1239 |
rev1 specifies from which revisions a logEntry is wanted: |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1240 |
If rev1 is nil, the first revision is the initial revision |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1241 |
otherwise, the log starts with that revision. |
110 | 1242 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1243 |
per revision info consists of one record per revision: |
110 | 1244 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1245 |
#revision -> the revision string |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1246 |
#author -> who checked that revision into the repository |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1247 |
#date -> when was it checked in |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1248 |
#state -> the RCS state |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1249 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
110 | 1250 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1251 |
revisions are ordered newest first |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1252 |
(i.e. the last entry is for the initial revision; |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1253 |
the first for the most recent one) |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1254 |
" |
110 | 1255 |
|
1256 |
^ self revisionLogOf:aClass fromRevision:rev1 toRevision:nil |
|
1257 |
||
1258 |
" |
|
1259 |
SourceCodeManager revisionLogOf:Array fromRevision:'1.40' |
|
1260 |
" |
|
1261 |
||
1262 |
"Created: 6.11.1995 / 18:56:00 / cg" |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1263 |
"Modified: 10.1.1997 / 13:29:50 / cg" |
110 | 1264 |
! |
1265 |
||
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1266 |
revisionLogOf:aClass fromRevision:rev1 toRevision:rev2 |
95 | 1267 |
"return info about the repository container and |
1268 |
(part of) the revisionlog as a collection of revision entries. |
|
1269 |
Return nil on failure. |
|
1270 |
||
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1271 |
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
|
1272 |
filled with: |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1273 |
#container -> the RCS container file name |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1274 |
#filename -> the actual source file name |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1275 |
#newestRevision -> the revisionString of the newest revision |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1276 |
#numberOfRevisions -> the number of revisions in the container |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1277 |
#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
|
1278 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1279 |
for some classes, additional info is returned: |
96 | 1280 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1281 |
#renamed -> true if the class has been renamed or copied |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1282 |
and the sourceInfo is from the previous one |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1283 |
#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
|
1284 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1285 |
rev1 / rev2 specify from which revisions a logEntry is wanted: |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1286 |
If rev1 is nil, the first revision is the initial revision |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1287 |
otherwise, the log starts with that revision. |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1288 |
If rev2 is nil, the last revision is the newest revision |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1289 |
otherwise, the log ends with that revision. |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1290 |
If both are nil, no logEntries are extracted (i.e. only the header). |
96 | 1291 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1292 |
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
|
1293 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1294 |
#revision -> the revision string |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1295 |
#author -> who checked that revision into the repository |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1296 |
#date -> when was it checked in |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1297 |
#state -> the RCS state |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1298 |
#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
|
1299 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1300 |
revisions are ordered newest first |
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1301 |
(i.e. the last entry is for the initial revision; |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1302 |
the first for the most recent one) |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1303 |
" |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1304 |
|
501 | 1305 |
|sourceInfo packageDir moduleDir classFileName info| |
95 | 1306 |
|
1307 |
sourceInfo := self sourceInfoOfClass:aClass. |
|
1308 |
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
|
1309 |
|
179 | 1310 |
packageDir := self packageFromSourceInfo:sourceInfo. |
1311 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
|
1312 |
classFileName := self containerFromSourceInfo:sourceInfo. |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1313 |
|
96 | 1314 |
info := self |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1315 |
revisionLogOf:aClass |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1316 |
fromRevision:rev1 |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1317 |
toRevision:rev2 |
179 | 1318 |
fileName:classFileName |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1319 |
directory:packageDir |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1320 |
module:moduleDir. |
96 | 1321 |
|
1322 |
info notNil ifTrue:[ |
|
179 | 1323 |
"/ (sourceInfo includesKey:#renamed) ifTrue:[ |
1324 |
"/ info at:#renamed put:(sourceInfo at:#renamed) |
|
1325 |
"/ ]. |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1326 |
(sourceInfo includesKey:#expectedFileName) ifTrue:[ |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1327 |
info at:#expectedFileName put:(sourceInfo at:#expectedFileName) |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1328 |
] |
96 | 1329 |
]. |
1330 |
^ info |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1331 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1332 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1333 |
SourceCodeManager revisionLogOf:Array fromRevision:'1.40' toRevision:'1.43' |
96 | 1334 |
SourceCodeManager revisionLogOf:XtBoxNew |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1335 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1336 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1337 |
"Created: 6.11.1995 / 18:56:00 / cg" |
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1338 |
"Modified: 10.1.1997 / 13:30:00 / cg" |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1339 |
! |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1340 |
|
213 | 1341 |
revisionsOf:aClass |
1342 |
"return a collection of revisions (as strings) found in the repository. |
|
1343 |
The most recent (newest) revision will be the first in the list. |
|
1344 |
Return nil on failure." |
|
1345 |
||
1346 |
|log revisions| |
|
1347 |
||
1348 |
log := self revisionLogOf:aClass. |
|
1349 |
log isNil ifTrue:[^ nil]. |
|
1350 |
revisions := log at:#revisions ifAbsent:nil. |
|
1351 |
revisions isNil ifTrue:[^ nil]. |
|
1352 |
^ revisions collect:[:rev | rev at:#revision]. |
|
1353 |
||
1354 |
" |
|
1355 |
SourceCodeManager revisionsOf:Array |
|
1356 |
SourceCodeManager newestRevisionOf:Array |
|
1357 |
" |
|
1358 |
||
1359 |
"Modified: 10.4.1996 / 23:14:24 / cg" |
|
1360 |
"Created: 19.4.1996 / 17:24:34 / cg" |
|
1361 |
! |
|
1362 |
||
147 | 1363 |
writeHistoryLogSince:timeGoal filterSTSources:filter to:aStream |
472 | 1364 |
"send a repositories historyLog to some stream" |
1365 |
||
147 | 1366 |
self writeHistoryLogSince:timeGoal filterSTSources:filter filterUser:nil to:aStream |
1367 |
||
472 | 1368 |
"Modified: 12.9.1996 / 02:36:32 / cg" |
147 | 1369 |
! |
1370 |
||
1371 |
writeHistoryLogSince:timeGoal to:aStream |
|
472 | 1372 |
"send a repositories historyLog to some stream" |
1373 |
||
147 | 1374 |
self writeHistoryLogSince:timeGoal filterSTSources:true filterUser:nil to:aStream |
1375 |
||
1376 |
"Created: 13.12.1995 / 10:28:27 / cg" |
|
472 | 1377 |
"Modified: 12.9.1996 / 02:36:38 / cg" |
147 | 1378 |
! |
1379 |
||
96 | 1380 |
writeRevisionLogMessagesFrom:log to:aStream |
1381 |
"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
|
1382 |
|
138
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
1383 |
self writeRevisionLogMessagesFrom:log withHeader:true to:aStream |
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
1384 |
|
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
1385 |
"Created: 10.12.1995 / 16:51:30 / cg" |
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
1386 |
! |
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
1387 |
|
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
1388 |
writeRevisionLogMessagesFrom:log withHeader:header to:aStream |
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
1389 |
"helper; send the revisionlog to aStream" |
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
1390 |
|
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
1391 |
header ifTrue:[ |
179 | 1392 |
"/ (log at:#renamed ifAbsent:false) ifTrue:[ |
1393 |
"/ aStream nextPutAll:' Class was probably renamed; revision info is from original class.'. |
|
1394 |
"/ aStream cr; nextPutAll:' You may have to create a new container for it.'. |
|
1395 |
"/ aStream cr; cr. |
|
1396 |
"/ ]. |
|
138
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
1397 |
|
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
1398 |
aStream nextPutAll:' Total revisions: '; nextPutLine:(log at:#numberOfRevisions) printString. |
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
1399 |
aStream nextPutAll:' Newest revision: '; nextPutLine:(log at:#newestRevision) printString. |
96 | 1400 |
]. |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1401 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1402 |
(log at:#revisions) do:[:entry | |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1403 |
|logMsg| |
96 | 1404 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1405 |
aStream cr. |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1406 |
aStream nextPutAll:' revision '; nextPutAll:(entry at:#revision); tab. |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1407 |
aStream nextPutAll:' date: '; nextPutAll:(entry at:#date); tab. |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1408 |
aStream nextPutAll:' author: '; nextPutAll:(entry at:#author); tab. |
549
8b4035c43732
Add lines: +xx -yy to revision log.
Stefan Vogel <sv@exept.de>
parents:
545
diff
changeset
|
1409 |
aStream nextPutAll:' lines: '; nextPutAll:(entry at:#numberOfChangedLines). |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1410 |
aStream cr. |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1411 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1412 |
logMsg := entry at:#logMessage. |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1413 |
(logMsg isEmpty or:[logMsg isBlank or:[logMsg withoutSeparators = '.']]) ifTrue:[ |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1414 |
logMsg := '*** empty log message ***' |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1415 |
]. |
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
1416 |
aStream tab; nextPutLine:logMsg. |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1417 |
]. |
96 | 1418 |
|
1419 |
"Created: 16.11.1995 / 13:25:30 / cg" |
|
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
1420 |
"Modified: 8.11.1996 / 23:52:48 / cg" |
549
8b4035c43732
Add lines: +xx -yy to revision log.
Stefan Vogel <sv@exept.de>
parents:
545
diff
changeset
|
1421 |
"Modified: 27.11.1996 / 18:26:30 / stefan" |
73 | 1422 |
! |
1423 |
||
77 | 1424 |
writeRevisionLogOf:aClass fromRevision:rev1 toRevision:rev2 to:aStream |
73 | 1425 |
"extract a classes log and append it to aStream." |
1426 |
||
96 | 1427 |
|log | |
73 | 1428 |
|
96 | 1429 |
log := self revisionLogOf:aClass fromRevision:rev1 toRevision:rev2. |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1430 |
log isNil ifTrue:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1431 |
aStream nextPutAll:'** No revision log available **'. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1432 |
^ false |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1433 |
]. |
96 | 1434 |
|
1435 |
self writeRevisionLogMessagesFrom:log to:aStream. |
|
1436 |
^ true |
|
73 | 1437 |
|
1438 |
" |
|
77 | 1439 |
SourceCodeManager writeRevisionLogOf:Array fromRevision:'1.40' toRevision:'1.43' to:Transcript |
73 | 1440 |
" |
1441 |
||
1442 |
"Created: 6.11.1995 / 18:56:00 / cg" |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1443 |
"Modified: 14.2.1997 / 21:11:57 / cg" |
77 | 1444 |
! |
1445 |
||
87 | 1446 |
writeRevisionLogOf:aClass to:aStream |
1447 |
"extract a classes log and append it to aStream." |
|
1448 |
||
1449 |
^ self |
|
1450 |
writeRevisionLogOf:aClass fromRevision:nil toRevision:nil to:aStream |
|
77 | 1451 |
|
87 | 1452 |
" |
1453 |
SourceCodeManager writeRevisionLogOf:Array to:Transcript |
|
1454 |
" |
|
1455 |
! ! |
|
77 | 1456 |
|
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
1457 |
!AbstractSourceCodeManager class methodsFor:'documentation'! |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1458 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1459 |
version |
745
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1460 |
^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.91 1999-03-29 11:57:38 cg Exp $' |
123
9a1dff152656
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
122
diff
changeset
|
1461 |
! ! |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
1462 |
AbstractSourceCodeManager initialize! |