author | Claus Gittinger <cg@exept.de> |
Wed, 08 Nov 2006 19:52:02 +0100 | |
changeset 1889 | d5c6cc3e51db |
parent 1888 | 61dad1bbee19 |
child 1890 | 9a64ba9dcf37 |
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 |
1863 | 3 |
All Rights Reserved |
56
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 |
" |
919 | 12 |
"{ Package: 'stx:libbasic3' }" |
13 |
||
56
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
14 |
Object subclass:#AbstractSourceCodeManager |
1881 | 15 |
instanceVariableNames:'' |
16 |
classVariableNames:'DefaultManager CachingSources CacheDirectoryName UseWorkTree |
|
17 |
WorkTreeDirectoryName' |
|
18 |
poolDictionaries:'' |
|
19 |
category:'System-SourceCodeManagement' |
|
56
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
20 |
! |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
21 |
|
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
22 |
!AbstractSourceCodeManager class methodsFor:'documentation'! |
56
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
23 |
|
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
24 |
copyright |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
25 |
" |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
26 |
COPYRIGHT (c) 1995 by Claus Gittinger |
1863 | 27 |
All Rights Reserved |
56
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
28 |
|
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
29 |
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
|
30 |
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
|
31 |
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
|
32 |
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
|
33 |
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
|
34 |
hereby transferred. |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
35 |
" |
71 | 36 |
! |
37 |
||
38 |
documentation |
|
39 |
" |
|
40 |
Abstract superclass for sourceCodeManagers. |
|
41 |
Concrete subclasses provide access to a source repository. |
|
42 |
All protocol here traps into subclassResponsbility errors. |
|
43 |
Please read more documentation in concrete subclasses |
|
44 |
(especially: CVSSourceCodeManager) for how to use this manager. |
|
236 | 45 |
|
46 |
[author:] |
|
47 |
Claus Gittinger |
|
71 | 48 |
" |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
49 |
! ! |
56
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
50 |
|
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
51 |
!AbstractSourceCodeManager class methodsFor:'initialization'! |
63 | 52 |
|
53 |
initCacheDirPath |
|
472 | 54 |
"initialize the name of the cacheDirectory. |
796 | 55 |
This is: |
56 |
<tempDir>/stx_sourceCache." |
|
63 | 57 |
|
796 | 58 |
CacheDirectoryName := (Filename tempDirectory constructString:'stx_sourceCache'). |
792
901f03b078db
fixed tempdir setup for win32
Claus Gittinger <cg@exept.de>
parents:
769
diff
changeset
|
59 |
|
901f03b078db
fixed tempdir setup for win32
Claus Gittinger <cg@exept.de>
parents:
769
diff
changeset
|
60 |
" |
901f03b078db
fixed tempdir setup for win32
Claus Gittinger <cg@exept.de>
parents:
769
diff
changeset
|
61 |
self initCacheDirPath |
901f03b078db
fixed tempdir setup for win32
Claus Gittinger <cg@exept.de>
parents:
769
diff
changeset
|
62 |
" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
63 |
|
796 | 64 |
"Modified: / 12.7.1999 / 10:01:31 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
65 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
66 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
67 |
initialize |
472 | 68 |
"setup for no caching and no workTree" |
69 |
||
1060 | 70 |
CachingSources ifNil:[CachingSources := false]. |
71 |
UseWorkTree ifNil:[UseWorkTree := false]. |
|
63 | 72 |
! ! |
73 |
||
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
74 |
!AbstractSourceCodeManager class methodsFor:'accessing'! |
112 | 75 |
|
1729 | 76 |
availableManagers |
77 |
^ AbstractSourceCodeManager allSubclasses |
|
78 |
reject:[:cls | (cls isAbstract) or:[cls isExperimental ]]. |
|
79 |
||
80 |
" |
|
81 |
self availableManagers |
|
82 |
" |
|
83 |
! |
|
84 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
85 |
cacheDirectoryName |
472 | 86 |
"return the name of the cache directory, where checked out class |
87 |
sources are kept for faster access. The default is '/tmp/stx_sourceCache'. |
|
88 |
This cache is shared among all ST/X users on a system." |
|
89 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
90 |
^ CacheDirectoryName |
472 | 91 |
|
92 |
"Modified: 12.9.1996 / 02:20:45 / cg" |
|
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
93 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
94 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
95 |
cacheDirectoryName:aStringOrFilename |
472 | 96 |
"set the name of the cache directory, where checked out class |
97 |
sources are kept for faster access. The default is '/tmp/stx_sourceCache'. |
|
98 |
This cache is shared among all ST/X users on a system. |
|
99 |
The directory is typically set via the launchers setting menu, or |
|
100 |
from a startup rc-file." |
|
101 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
102 |
CacheDirectoryName := aStringOrFilename |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
103 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
104 |
"Created: 16.12.1995 / 15:18:43 / cg" |
472 | 105 |
"Modified: 12.9.1996 / 02:21:35 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
106 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
107 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
108 |
cachingSources |
472 | 109 |
"return true, if source caching is enabled. |
110 |
(see cacheDirectoryName for what that means)" |
|
111 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
112 |
^ CachingSources |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
113 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
114 |
"Created: 16.12.1995 / 15:17:50 / cg" |
472 | 115 |
"Modified: 12.9.1996 / 02:22:19 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
116 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
117 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
118 |
cachingSources:aBoolean |
472 | 119 |
"enable/disable the caching of source files. |
120 |
(see cacheDirectoryName for what that means)" |
|
121 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
122 |
CachingSources := aBoolean |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
123 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
124 |
"Created: 16.12.1995 / 15:18:13 / cg" |
472 | 125 |
"Modified: 12.9.1996 / 02:22:42 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
126 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
127 |
|
112 | 128 |
defaultManager |
472 | 129 |
"return the default sourceCodeManager class" |
130 |
||
112 | 131 |
^ DefaultManager |
132 |
||
133 |
"Created: 7.12.1995 / 17:14:22 / cg" |
|
472 | 134 |
"Modified: 12.9.1996 / 02:22:56 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
135 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
136 |
|
482
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
137 |
repositoryName |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
138 |
"return the name of the repository. |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
139 |
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
|
140 |
|
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
141 |
^ nil |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
142 |
|
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
143 |
"Modified: 12.9.1996 / 02:20:45 / cg" |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
144 |
"Created: 14.9.1996 / 13:21:37 / cg" |
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 |
|
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
147 |
useWorkTree |
472 | 148 |
"return the setting of useWorkTree, which (eventually) |
149 |
controls if an up-to-date view of a CVS working tree should be |
|
150 |
kept in sync. This is not yet implemented." |
|
151 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
152 |
^ UseWorkTree |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
153 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
154 |
"Created: 16.12.1995 / 15:36:48 / cg" |
472 | 155 |
"Modified: 12.9.1996 / 02:24:01 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
156 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
157 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
158 |
useWorkTree:aBoolean |
472 | 159 |
"enable/disable the useWorkTree feature, which (eventually) |
160 |
controls if an up-to-date view of a CVS working tree should be |
|
161 |
kept in sync. This is not yet implemented." |
|
162 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
163 |
UseWorkTree := aBoolean |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
164 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
165 |
"Created: 16.12.1995 / 15:37:29 / cg" |
472 | 166 |
"Modified: 12.9.1996 / 02:24:38 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
167 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
168 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
169 |
workTreeDirectoryName |
472 | 170 |
"return the name of the workTree, which is kept in sync |
171 |
with the current class versions. This is not yet implemented" |
|
172 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
173 |
^ WorkTreeDirectoryName |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
174 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
175 |
"Created: 16.12.1995 / 15:35:21 / cg" |
472 | 176 |
"Modified: 12.9.1996 / 02:25:13 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
177 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
178 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
179 |
workTreeDirectoryName:aStringOrFilename |
472 | 180 |
"set the name of the workTree, which is kept in sync |
181 |
with the current class versions. This is not yet implemented" |
|
182 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
183 |
WorkTreeDirectoryName := aStringOrFilename |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
184 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
185 |
"Created: 16.12.1995 / 15:35:34 / cg" |
472 | 186 |
"Modified: 12.9.1996 / 02:25:19 / cg" |
112 | 187 |
! ! |
188 |
||
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
189 |
!AbstractSourceCodeManager class methodsFor:'basic access'! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
190 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
191 |
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
|
192 |
"checkin of a class into the source repository. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
193 |
Return true if ok, false if not." |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
194 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
195 |
^ self subclassResponsibility. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
196 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
197 |
"Created: 14.2.1997 / 21:17:33 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
198 |
"Modified: 14.2.1997 / 21:18:48 / cg" |
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 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
201 |
checkoutModule:aModule directory:aPackage andDo:aBlock |
759 | 202 |
"check out everything from a package into a temporary directory. |
203 |
Then evaluate aBlock, passing the name of that temp-directory. |
|
204 |
Afterwards, the tempDir is removed. |
|
205 |
Return true, if OK, false if any error occurred." |
|
206 |
||
207 |
^ self subclassResponsibility |
|
208 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
209 |
"Created: / 23-08-2006 / 14:07:08 / cg" |
759 | 210 |
! |
211 |
||
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
212 |
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
|
213 |
"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
|
214 |
A revision of nil selects the current (in image) revision. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
215 |
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
|
216 |
which itself is extracted from the classes packageString." |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
217 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
218 |
^ self subclassResponsibility |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
219 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
220 |
"Modified: 14.2.1997 / 21:18:35 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
221 |
! ! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
222 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
223 |
!AbstractSourceCodeManager class methodsFor:'basic administration'! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
224 |
|
1786 | 225 |
checkForExistingContainer:fileName inModule:moduleName directory:dirName |
226 |
"check for a container to be present" |
|
227 |
||
228 |
^ self subclassResponsibility. |
|
229 |
||
230 |
"Created: / 13-09-2006 / 18:22:24 / cg" |
|
231 |
! |
|
232 |
||
1785 | 233 |
checkForExistingContainer:fileName inPackage:aPackage |
234 |
"check if a source-code container is present in a packages directory." |
|
235 |
||
236 |
|packageDir moduleDir| |
|
237 |
||
238 |
packageDir := aPackage asPackageId directory. |
|
239 |
moduleDir := aPackage asPackageId module. |
|
240 |
||
241 |
^ self |
|
1786 | 242 |
checkForExistingContainer:fileName |
243 |
inModule:moduleDir |
|
244 |
directory:packageDir |
|
1785 | 245 |
|
246 |
"Created: / 13-09-2006 / 18:10:30 / cg" |
|
247 |
! |
|
248 |
||
674
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
249 |
checkForExistingContainerForClass:aClass |
1013 | 250 |
"check if a source-code container for a given class is present in the repository." |
251 |
||
674
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
252 |
|sourceInfo packageDir moduleDir classFileName| |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
253 |
|
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
254 |
sourceInfo := self sourceInfoOfClass:aClass. |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
255 |
sourceInfo isNil ifTrue:[ |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
256 |
('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
|
257 |
^ false |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
258 |
]. |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
259 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
260 |
packageDir := self directoryFromSourceInfo:sourceInfo. |
674
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
261 |
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
|
262 |
classFileName := self containerFromSourceInfo:sourceInfo. |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
263 |
|
1786 | 264 |
^ self |
265 |
checkForExistingContainer:classFileName |
|
266 |
inModule:moduleDir |
|
267 |
directory:packageDir |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
268 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
269 |
"Created: / 13-05-1998 / 22:35:50 / cg" |
1786 | 270 |
"Modified: / 13-09-2006 / 18:23:20 / cg" |
545
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 |
checkForExistingModule:moduleName |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
274 |
"check for a module directory to be present" |
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:01 / 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 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
282 |
checkForExistingModule:moduleDir directory:packageDir |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
283 |
"check for a package directory to be present" |
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 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
287 |
"Created: / 23-08-2006 / 14:03:06 / cg" |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
288 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
289 |
|
966 | 290 |
createContainerFor:aClass inModule:moduleName directory:dirName container:fileName |
291 |
"create a new container & check into it an initial version of aClass" |
|
292 |
||
293 |
^ self subclassResponsibility. |
|
294 |
||
295 |
"Created: 9.12.1995 / 19:02:47 / cg" |
|
296 |
"Modified: 14.2.1997 / 21:19:11 / cg" |
|
297 |
! |
|
298 |
||
299 |
createModule:moduleName |
|
300 |
"create a new module directory" |
|
301 |
||
302 |
^ self subclassResponsibility. |
|
303 |
||
304 |
"Created: 9.12.1995 / 19:02:23 / cg" |
|
305 |
"Modified: 14.2.1997 / 21:19:16 / cg" |
|
306 |
! |
|
307 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
308 |
createModule:module directory:directory |
966 | 309 |
"create a new package directory" |
310 |
||
311 |
^ self subclassResponsibility. |
|
312 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
313 |
"Created: / 23-08-2006 / 14:04:41 / cg" |
966 | 314 |
! |
315 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
316 |
initialRevisionStringFor:aClass inModule:moduleDir directory:packageDir container:fileName |
966 | 317 |
"return a string usable as initial revision string" |
318 |
||
319 |
^ self subclassResponsibility |
|
320 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
321 |
"Created: / 23-08-2006 / 14:05:42 / cg" |
966 | 322 |
! |
323 |
||
324 |
revisionLogOf:cls fromRevision:rev1 toRevision:rev2 fileName:classFileName directory:packageDir module:moduleDir |
|
325 |
"actually do return a revisionLog. The main worker method. |
|
326 |
This must be implemented by a concrete source-code manager" |
|
327 |
||
328 |
^ self subclassResponsibility. |
|
329 |
||
330 |
"Created: 15.11.1995 / 18:12:51 / cg" |
|
331 |
"Modified: 14.2.1997 / 21:14:01 / cg" |
|
332 |
! ! |
|
333 |
||
334 |
!AbstractSourceCodeManager class methodsFor:'cache administration'! |
|
335 |
||
961
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
336 |
condenseSourceCache |
966 | 337 |
"remove all cached old versions (i.e. leave the newest only)" |
961
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
338 |
|
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
339 |
|extractBaseAndVersion versionIsGreater vsnNumberString baseName| |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
340 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
341 |
CacheDirectoryName isNil ifTrue:[^ self]. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
342 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
343 |
extractBaseAndVersion := |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
344 |
[:filenameString | |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
345 |
|i| |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
346 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
347 |
i := filenameString size. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
348 |
[i > 0 and:[(filenameString at:i) isDigit or:[(filenameString at:i) == $.]]] whileTrue:[ i := i - 1 ]. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
349 |
vsnNumberString := filenameString copyFrom:i + 1. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
350 |
(filenameString at:i) == $_ ifTrue:[i := i - 1]. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
351 |
baseName := filenameString copyTo:i. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
352 |
]. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
353 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
354 |
versionIsGreater := |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
355 |
[:vA :vB | |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
356 |
|seqA seqB sequenceIsGreater| |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
357 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
358 |
seqA := (vA asCollectionOfSubstringsSeparatedBy:$.) collect:[:each | Integer readFrom:each]. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
359 |
seqB := (vB asCollectionOfSubstringsSeparatedBy:$.) collect:[:each | Integer readFrom:each]. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
360 |
sequenceIsGreater := |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
361 |
[:seqA :seqB :index | |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
362 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
363 |
|elA elB| |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
364 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
365 |
elA := seqA at:index. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
366 |
elB := seqB at:index. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
367 |
elA > elB ifTrue:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
368 |
true |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
369 |
] ifFalse:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
370 |
elA < elB ifTrue:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
371 |
false |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
372 |
] ifFalse:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
373 |
sequenceIsGreater value:seqA value:seqB value:index+1. |
961
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
374 |
]. |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
375 |
]. |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
376 |
]. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
377 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
378 |
sequenceIsGreater value:seqA value:seqB value:1. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
379 |
]. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
380 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
381 |
CacheDirectoryName asFilename withAllDirectoriesDo:[:d | |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
382 |
|allFiles newestVersions| |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
383 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
384 |
newestVersions := Dictionary new. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
385 |
allFiles := d files. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
386 |
allFiles do:[:eachFilename | |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
387 |
|prevVsnString| |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
388 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
389 |
extractBaseAndVersion value:eachFilename baseName. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
390 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
391 |
vsnNumberString notEmpty ifTrue:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
392 |
prevVsnString := newestVersions at:baseName ifAbsent:nil. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
393 |
prevVsnString isNil ifTrue:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
394 |
newestVersions at:baseName put:vsnNumberString. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
395 |
] ifFalse:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
396 |
(versionIsGreater value:vsnNumberString value:prevVsnString) ifTrue:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
397 |
newestVersions at:baseName put:vsnNumberString |
961
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
398 |
] |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
399 |
]. |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
400 |
]. |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
401 |
]. |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
402 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
403 |
allFiles do:[:eachFilename | |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
404 |
extractBaseAndVersion value:eachFilename baseName. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
405 |
(vsnNumberString isEmpty |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
406 |
or:[(vsnNumberString ~= (newestVersions at:baseName))]) ifTrue:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
407 |
eachFilename remove |
961
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
408 |
] |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
409 |
]. |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
410 |
] |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
411 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
412 |
" |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
413 |
self condenseSourceCache |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
414 |
" |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
415 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
416 |
"Modified: / 29-08-2006 / 11:25:25 / cg" |
961
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
417 |
! |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
418 |
|
966 | 419 |
flushSourceCache |
420 |
"remove all cached versions" |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
421 |
|
961
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
422 |
|d| |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
423 |
|
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
424 |
CacheDirectoryName notNil ifTrue:[ |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
425 |
d := CacheDirectoryName asFilename. |
1860
c092daa2828f
#flushSourceCache tolerates non-existing source cache directory
Stefan Vogel <sv@exept.de>
parents:
1857
diff
changeset
|
426 |
d isDirectory ifTrue:[ |
c092daa2828f
#flushSourceCache tolerates non-existing source cache directory
Stefan Vogel <sv@exept.de>
parents:
1857
diff
changeset
|
427 |
d directoryContentsAsFilenames do:[:eachFile | |
c092daa2828f
#flushSourceCache tolerates non-existing source cache directory
Stefan Vogel <sv@exept.de>
parents:
1857
diff
changeset
|
428 |
eachFile recursiveRemove |
c092daa2828f
#flushSourceCache tolerates non-existing source cache directory
Stefan Vogel <sv@exept.de>
parents:
1857
diff
changeset
|
429 |
] |
c092daa2828f
#flushSourceCache tolerates non-existing source cache directory
Stefan Vogel <sv@exept.de>
parents:
1857
diff
changeset
|
430 |
]. |
961
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
431 |
] |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
432 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
433 |
" |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
434 |
self flushSourceCache |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
435 |
" |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
436 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
437 |
"Modified: / 29-08-2006 / 11:25:47 / cg" |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
438 |
! ! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
439 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
440 |
!AbstractSourceCodeManager class methodsFor:'obsolete backward compatibility'! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
441 |
|
1786 | 442 |
checkForExistingContainerInModule:moduleDir directory:packageDir container:fileName |
443 |
"check for a container to exist" |
|
444 |
||
445 |
self obsoleteMethodWarning. |
|
446 |
^ self checkForExistingContainer:fileName inModule:moduleDir directory:packageDir |
|
447 |
||
448 |
"Modified: / 13-09-2006 / 18:23:45 / cg" |
|
449 |
! |
|
450 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
451 |
checkForExistingContainerInModule:moduleName package:dirName container:fileName |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
452 |
"check for a container to be present" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
453 |
|
1881 | 454 |
<resource: #obsolete> |
455 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
456 |
self obsoleteMethodWarning. |
1786 | 457 |
^ self |
458 |
checkForExistingContainer:fileName |
|
459 |
inModule:moduleName |
|
460 |
directory:dirName |
|
461 |
||
462 |
"Modified: / 13-09-2006 / 18:23:35 / cg" |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
463 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
464 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
465 |
checkForExistingModule:moduleDir package:packageDir |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
466 |
"check for a package directory to be present" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
467 |
|
1881 | 468 |
<resource: #obsolete> |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
469 |
self obsoleteMethodWarning. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
470 |
^ self checkForExistingModule:moduleDir directory:packageDir. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
471 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
472 |
"Created: / 09-12-1995 / 19:02:23 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
473 |
"Modified: / 23-08-2006 / 14:03:25 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
474 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
475 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
476 |
checkoutModule:aModule package:aPackage andDo:aBlock |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
477 |
"check out everything from a package into a temporary directory. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
478 |
Then evaluate aBlock, passing the name of that temp-directory. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
479 |
Afterwards, the tempDir is removed. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
480 |
Return true, if OK, false if any error occurred." |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
481 |
|
1881 | 482 |
<resource: #obsolete> |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
483 |
self obsoleteMethodWarning. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
484 |
^ self checkoutModule:aModule directory:aPackage andDo:aBlock |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
485 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
486 |
"Modified: / 23-08-2006 / 14:07:31 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
487 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
488 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
489 |
createModule:module package:package |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
490 |
"create a new package directory" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
491 |
|
1881 | 492 |
<resource: #obsolete> |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
493 |
self obsoleteMethodWarning. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
494 |
^ self createModule:module directory:package. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
495 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
496 |
"Created: / 09-12-1995 / 19:02:23 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
497 |
"Modified: / 23-08-2006 / 14:04:59 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
498 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
499 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
500 |
getExistingContainersInModule:aModule package:aPackage |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
501 |
"{ Pragma: +optSpace }" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
502 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
503 |
"return a collection containing the names of existing containers" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
504 |
|
1881 | 505 |
<resource: #obsolete> |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
506 |
self obsoleteMethodWarning. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
507 |
^ self getExistingContainersInModule:aModule directory:aPackage |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
508 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
509 |
"Created: / 20-05-1998 / 19:49:12 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
510 |
"Modified: / 23-08-2006 / 14:12:24 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
511 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
512 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
513 |
getExistingPackagesInModule:aModule |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
514 |
"{ Pragma: +optSpace }" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
515 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
516 |
"return a collection containing the names of existing packages" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
517 |
|
1881 | 518 |
<resource: #obsolete> |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
519 |
self obsoleteMethodWarning. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
520 |
^ self getExistingDirectoriesInModule:aModule |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
521 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
522 |
"Created: / 20-05-1998 / 19:38:34 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
523 |
"Modified: / 23-08-2006 / 14:14:04 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
524 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
525 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
526 |
initialRevisionStringFor:aClass inModule:moduleDir package:packageDir container:fileName |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
527 |
"return a string usable as initial revision string" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
528 |
|
1881 | 529 |
<resource: #obsolete> |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
530 |
self obsoleteMethodWarning. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
531 |
^ self initialRevisionStringFor:aClass inModule:moduleDir directory:packageDir container:fileName |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
532 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
533 |
"Created: / 14-02-1997 / 21:01:41 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
534 |
"Modified: / 23-08-2006 / 14:06:18 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
535 |
! ! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
536 |
|
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
537 |
!AbstractSourceCodeManager class methodsFor:'private'! |
71 | 538 |
|
813 | 539 |
checkMethodPackagesOf:aClass |
540 |
"check if aClass contains methods from another package; |
|
541 |
ask if these should be checked in with the class. |
|
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
542 |
Raises abortSignal if checkIn is to be suppressed. |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
543 |
returns: |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
544 |
#base - only check in methods from the classes package |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
545 |
#all - check in all |
813 | 546 |
|
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
547 |
the old code looked for all extensions, and allowed them to be moved to the base-package. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
548 |
This was dangerous, as if one presses yes too quickly, extensions move to the base too easy. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
549 |
The new code only allows for extensions from the __NOPROJECT__ package to be moved. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
550 |
Extensions always remain extensions, and must be moved by an explicit method-menu action. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
551 |
" |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
552 |
|
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
553 |
|checkInClassPackageOnly clsPackage otherPackages otherPackageNames methodsFromOtherPackages |
1066
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
554 |
methodCategoriesInOtherPackages methodCategoryInOtherPackages |
1520 | 555 |
msg answer isDefaultAnswer labels actions hasUnassignedExtensions |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
556 |
unassignedMethods methodCategoriesWithUnassignedMethods methodCategoryWithUnassignedMethods |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
557 |
args| |
813 | 558 |
|
559 |
checkInClassPackageOnly := false. |
|
560 |
||
561 |
clsPackage := aClass package. |
|
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
562 |
|
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
563 |
otherPackages := Set new. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
564 |
methodsFromOtherPackages := OrderedCollection new. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
565 |
hasUnassignedExtensions := false. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
566 |
unassignedMethods := OrderedCollection new. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
567 |
methodCategoriesWithUnassignedMethods := Set new. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
568 |
methodCategoriesInOtherPackages := Set new. |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
569 |
|
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
570 |
aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
815 | 571 |
|mthdPackage| |
572 |
||
573 |
(mthdPackage := mthd package) ~= clsPackage ifTrue:[ |
|
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
574 |
mthdPackage == Project noProjectID ifTrue:[ |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
575 |
hasUnassignedExtensions := true. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
576 |
unassignedMethods add:mthd. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
577 |
methodCategoriesWithUnassignedMethods add:(mthd category). |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
578 |
] ifFalse:[ |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
579 |
methodsFromOtherPackages add:mthd. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
580 |
otherPackages add:mthdPackage. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
581 |
methodCategoriesInOtherPackages add:(mthd category). |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
582 |
]. |
815 | 583 |
] |
584 |
]. |
|
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
585 |
|
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
586 |
hasUnassignedExtensions ifFalse:[ |
1027
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
587 |
aClass allPrivateClassesDo:[:eachPrivateClass | |
1028 | 588 |
aClass setPackage:clsPackage. |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
589 |
eachPrivateClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
1027
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
590 |
mthd setPackage:clsPackage |
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
591 |
] |
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
592 |
]. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
593 |
^ #base |
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
594 |
]. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
595 |
|
1029 | 596 |
otherPackages := otherPackages asOrderedCollection sort. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
597 |
otherPackageNames := String streamContents:[:stream| |
1432
17790e20ad14
Show all foreign package names when checking in
Stefan Vogel <sv@exept.de>
parents:
1417
diff
changeset
|
598 |
otherPackages |
17790e20ad14
Show all foreign package names when checking in
Stefan Vogel <sv@exept.de>
parents:
1417
diff
changeset
|
599 |
do:[:eachPackageName| eachPackageName printOn:stream] |
17790e20ad14
Show all foreign package names when checking in
Stefan Vogel <sv@exept.de>
parents:
1417
diff
changeset
|
600 |
separatedBy:[stream nextPutAll:', ']. |
17790e20ad14
Show all foreign package names when checking in
Stefan Vogel <sv@exept.de>
parents:
1417
diff
changeset
|
601 |
]. |
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
602 |
|
1066
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
603 |
methodCategoriesInOtherPackages size == 1 ifTrue:[ |
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
604 |
methodCategoryInOtherPackages := methodCategoriesInOtherPackages anElement. |
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
605 |
]. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
606 |
methodCategoriesWithUnassignedMethods size == 1 ifTrue:[ |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
607 |
methodCategoryWithUnassignedMethods := methodCategoriesWithUnassignedMethods anElement. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
608 |
]. |
1066
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
609 |
|
1021 | 610 |
isDefaultAnswer := false. |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
611 |
(SourceCodeManagerUtilities yesToAllNotification notNil |
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
612 |
and:[SourceCodeManagerUtilities yesToAllNotification isHandled]) ifTrue:[ |
1021 | 613 |
answer := isDefaultAnswer := true. |
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
614 |
] ifFalse:[ |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
615 |
methodCategoriesWithUnassignedMethods size == 1 ifTrue:[ |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
616 |
unassignedMethods size == 1 ifTrue:[ |
1520 | 617 |
msg := 'The class ''%1'' contains the unassigned (loose) method: %6'. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
618 |
msg := msg , '\(In the ''%4'' category).'. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
619 |
] ifFalse:[ |
1520 | 620 |
msg := 'The class ''%1'' contains %3 unassigned (loose) method(s)'. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
621 |
msg := msg , '\(In the ''%4'' category).'. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
622 |
] |
1016 | 623 |
] ifFalse:[ |
1520 | 624 |
msg := 'The class ''%1'' contains %3 unassigned (loose) methods in %5 categories.'. |
1016 | 625 |
]. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
626 |
unassignedMethods size == 1 ifTrue:[ |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
627 |
msg := msg , '\\Move this method to the ''%2'' package ?'. |
1550 | 628 |
msg := msg , '\\Hint: if this is meant to be an extension of another package,\move it to the appropriate package and checkIn the extension(s).'. |
1066
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
629 |
] ifFalse:[ |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
630 |
msg := msg , '\\Move those to the ''%2'' package ?'. |
1550 | 631 |
msg := msg , '\\Hint: if these are meant to be extensions of another package,\move them to the appropriate package and checkIn the extensions.'. |
1066
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
632 |
]. |
1550 | 633 |
|
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
634 |
args := Array |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
635 |
with:aClass name allBold |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
636 |
with:clsPackage allBold |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
637 |
with:unassignedMethods size |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
638 |
with:methodCategoryWithUnassignedMethods |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
639 |
with:methodCategoriesWithUnassignedMethods size |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
640 |
with:unassignedMethods first selector allBold. |
1016 | 641 |
|
1036 | 642 |
SourceCodeManagerUtilities yesToAllNotification isHandled |
643 |
ifTrue:[ |
|
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
644 |
labels := #('Cancel' 'No' 'Browse' 'Yes to all' 'Yes'). |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
645 |
actions := #(#cancel false #browse #yesToAll true). |
1036 | 646 |
] ifFalse:[ |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
647 |
labels := #('Cancel' 'No' 'Browse' 'Yes'). |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
648 |
actions := #(#cancel false #browse true). |
1036 | 649 |
]. |
650 |
||
1016 | 651 |
answer := OptionBox |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
652 |
request:(SystemBrowser classResources |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
653 |
stringWithCRs:msg |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
654 |
withArgs:args) |
1016 | 655 |
label:'Change packageID ?' |
1392
4469708537e8
dont send obsolete message to OptionBox
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
656 |
image:(InfoBox iconBitmap) |
1218 | 657 |
buttonLabels:(Dialog resources array:labels) |
1036 | 658 |
values:actions |
1520 | 659 |
default:true. |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
660 |
|
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
661 |
answer == #browse ifTrue:[ |
1112
c395948357d3
care for userPref-browser-setting (in browse-action)
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
662 |
UserPreferences current systemBrowserClass |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
663 |
browseMethods:methodsFromOtherPackages |
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
664 |
title:('Extensions in %1' bindWith:aClass name) |
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
665 |
sort:true. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
666 |
answer := #cancel. |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
667 |
]. |
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
668 |
]. |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
669 |
|
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
670 |
answer == #cancel ifTrue:[ |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
671 |
AbortSignal raise |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
672 |
]. |
1016 | 673 |
answer == #yesToAll ifTrue:[ |
674 |
SourceCodeManagerUtilities yesToAllNotification raiseWith:true. |
|
675 |
answer := true. |
|
676 |
]. |
|
851
fcf26a083242
better confirm, when asking for other package methods
Claus Gittinger <cg@exept.de>
parents:
844
diff
changeset
|
677 |
|
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
678 |
"/ ok, move them over |
851
fcf26a083242
better confirm, when asking for other package methods
Claus Gittinger <cg@exept.de>
parents:
844
diff
changeset
|
679 |
answer == true ifTrue:[ |
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
680 |
"/ change all method's packageID to the classes packageId |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
681 |
aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
682 |
mthd package == Project noProjectID ifTrue:[ |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
683 |
mthd makeLocalStringSource. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
684 |
mthd setPackage:clsPackage |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
685 |
] |
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
686 |
]. |
1027
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
687 |
aClass allPrivateClassesDo:[:eachPrivateClass | |
1028 | 688 |
aClass setPackage:clsPackage. |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
689 |
eachPrivateClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
1454
b7617ab0033d
oops - care for extension method's sources
Claus Gittinger <cg@exept.de>
parents:
1451
diff
changeset
|
690 |
mthd makeLocalStringSource. |
1027
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
691 |
mthd setPackage:clsPackage |
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
692 |
] |
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
693 |
]. |
980 | 694 |
aClass changed:#projectOrganization. |
1011
647a8c2fabc1
method category: and package: now send change notifications.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
695 |
Smalltalk changed:#projectOrganization with:(Array with:aClass). |
813 | 696 |
]. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
697 |
^ #base |
1112
c395948357d3
care for userPref-browser-setting (in browse-action)
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
698 |
|
1550 | 699 |
"Modified: / 18-08-2006 / 12:27:51 / cg" |
813 | 700 |
! |
701 |
||
179 | 702 |
containerFromSourceInfo:info |
472 | 703 |
"given a sourceInfo, return the classes container" |
704 |
||
179 | 705 |
(info includesKey:#fileName) ifTrue:[ |
706 |
^ info at:#fileName |
|
707 |
]. |
|
708 |
(info includesKey:#expectedFileName) ifTrue:[ |
|
709 |
^ info at:#expectedFileName |
|
710 |
]. |
|
711 |
^ (info at:#classFileNameBase) , '.st' |
|
712 |
||
472 | 713 |
"Modified: 12.9.1996 / 02:31:52 / cg" |
179 | 714 |
! |
715 |
||
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
716 |
directoryFromContainerPath:containerPath forClass:aClass |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
717 |
"given a full path as in an RCS header, |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
718 |
extract the directory (i.e. package)." |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
719 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
720 |
^ self directoryFromContainerPath:containerPath forPackage:(aClass package) |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
721 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
722 |
" |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
723 |
CVSSourceCodeManager directoryFromContainerPath:'/files/CVS/stx/libbasic/Array.st' forClass:Array |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
724 |
" |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
725 |
! |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
726 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
727 |
directoryFromContainerPath:containerPath forPackage:packageID |
721
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
728 |
"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
|
729 |
extract the directory (i.e. package)." |
148 | 730 |
|
96 | 731 |
|path idx| |
732 |
||
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
733 |
path := self pathInRepositoryFrom:containerPath forPackage:packageID. |
704 | 734 |
path isNil ifTrue:[^ nil]. |
735 |
||
736 |
"/ these are always UNIX filenames ... |
|
737 |
idx := path indexOf:$/. |
|
738 |
idx ~~ 0 ifTrue:[ |
|
739 |
path := path copyFrom:(idx + 1) |
|
96 | 740 |
]. |
721
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
741 |
|
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
742 |
"/ the code below used to be: |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
743 |
"/ ^ path asFilename directoryName |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
744 |
"/ however, that only works under UNIX, since |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
745 |
"/ we MUST return a unix pathname here. |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
746 |
"/ therefore, do what unix would do here ... |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
747 |
|
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
748 |
idx := path lastIndexOf:$/. |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
749 |
idx == 0 ifTrue:[ |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
750 |
"/ huh ? |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
751 |
^ path |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
752 |
]. |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
753 |
^ path copyTo:(idx - 1) |
96 | 754 |
|
755 |
" |
|
721
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
756 |
CVSSourceCodeManager directoryFromContainerPath:'/files/CVS/stx/libbasic/Array.st' |
96 | 757 |
" |
758 |
||
721
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
759 |
"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
|
760 |
"Modified: / 25.9.1998 / 15:38:59 / cg" |
96 | 761 |
! |
762 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
763 |
directoryFromSourceInfo:info |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
764 |
"given a sourceInfo, return the classes package directory" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
765 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
766 |
^ info at:#directory. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
767 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
768 |
"Created: / 23-08-2006 / 14:10:29 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
769 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
770 |
|
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
771 |
moduleFromContainerPath:containerPath forClass:aClass |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
772 |
"given a full path as in an RCS header, extract the module." |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
773 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
774 |
^ self moduleFromContainerPath:containerPath forPackage:aClass package |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
775 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
776 |
" |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
777 |
SourceCodeManager moduleFromContainerPath:'/files/CVS/stx/libbasic/Array.st' forClass:Array |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
778 |
" |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
779 |
! |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
780 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
781 |
moduleFromContainerPath:containerPath forPackage:packageID |
148 | 782 |
"given a full path as in an RCS header, extract the module." |
783 |
||
96 | 784 |
|path idx| |
785 |
||
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
786 |
path := self pathInRepositoryFrom:containerPath forPackage:packageID. |
704 | 787 |
path isNil ifTrue:[^ nil]. |
788 |
||
789 |
"/ these are always UNIX filenames |
|
790 |
idx := path indexOf:$/. |
|
791 |
idx == 0 ifTrue:[^ path]. |
|
792 |
^ path copyTo:(idx - 1) |
|
96 | 793 |
|
794 |
" |
|
795 |
SourceCodeManager moduleFromContainerPath:'/files/CVS/stx/libbasic/Array.st' |
|
796 |
" |
|
797 |
||
704 | 798 |
"Created: / 25.11.1995 / 18:42:20 / cg" |
799 |
"Modified: / 11.8.1998 / 23:01:24 / cg" |
|
96 | 800 |
! |
801 |
||
179 | 802 |
moduleFromSourceInfo:info |
472 | 803 |
"given a sourceInfo, return the classes module directory" |
804 |
||
179 | 805 |
^ info at:#module. "/ use the modules name as CVS module |
806 |
||
807 |
"Created: 6.2.1996 / 17:26:38 / cg" |
|
472 | 808 |
"Modified: 12.9.1996 / 02:32:23 / cg" |
179 | 809 |
! |
810 |
||
811 |
packageFromSourceInfo:info |
|
472 | 812 |
"given a sourceInfo, return the classes package directory" |
813 |
||
1881 | 814 |
<resource: #obsolete> |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
815 |
self obsoleteMethodWarning. |
179 | 816 |
^ info at:#directory. |
817 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
818 |
"Created: / 06-02-1996 / 17:26:23 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
819 |
"Modified: / 23-08-2006 / 14:11:18 / cg" |
179 | 820 |
! |
821 |
||
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
822 |
pathInRepositoryFrom:containerPath forPackage:packageID |
148 | 823 |
"this tries to extract the path within a repository, given some path |
824 |
as present in an RCS Header string. |
|
825 |
Typically, this ought to be that string directly; |
|
826 |
however, if the repository directory is accessed via a symbolic link during |
|
827 |
ci/co, some systems extract different strings with co. |
|
828 |
One such system here had a symbolic link from /phys/ibm/CVS... to /file/CVS, |
|
829 |
and extracted sources had /phys/ibm/CVS in their header. |
|
830 |
Do not depend on the code below to work correctly all the time." |
|
831 |
||
501 | 832 |
|top lastTop idx| |
96 | 833 |
|
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
834 |
containerPath isNil ifTrue:[^ nil]. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
835 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
836 |
packageID notNil ifTrue:[ |
1348 | 837 |
idx := containerPath lastIndexOfSubCollection:(packageID copyReplaceAll:$: with:$/). |
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
838 |
idx ~~ 0 ifTrue:[ |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
839 |
^ containerPath copyFrom:idx. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
840 |
]. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
841 |
]. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
842 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
843 |
"/ |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
844 |
"/ the following is heuristics, in case that the packageID is not known |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
845 |
"/ (should not be required) |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
846 |
"/ |
1499 | 847 |
top := self repositoryTopDirectoryFromCVSRoot. |
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
848 |
top notNil ifTrue:[ |
148 | 849 |
|
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
850 |
(containerPath startsWith:(top , '/')) ifTrue:[ |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
851 |
^ containerPath copyFrom:(top size + 2). |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
852 |
]. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
853 |
(containerPath startsWith:(top)) ifTrue:[ |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
854 |
^ containerPath copyFrom:(top size + 1). |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
855 |
]. |
148 | 856 |
|
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
857 |
"/ hardcase - the repository-filename in the versionInfo |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
858 |
"/ does not match my repository top. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
859 |
"/ check for mangled prefix (happens with symbolic links) |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
860 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
861 |
lastTop := '/' , top asFilename baseName, '/'. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
862 |
idx := containerPath indexOfSubCollection:lastTop. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
863 |
idx ~~ 0 ifTrue:[ |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
864 |
('SourceCodeManager [warning]: warning: repository path mismatch: ' , (containerPath copyTo:idx-1) , lastTop , ' vs. ' , top , '/') infoPrintCR. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
865 |
'SourceCodeManager [info]: warning: assuming that mismatch is ok.' infoPrintCR. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
866 |
^ containerPath copyFrom:(idx + lastTop size). |
148 | 867 |
] |
96 | 868 |
]. |
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
869 |
|
501 | 870 |
^ nil |
96 | 871 |
|
872 |
" |
|
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
873 |
SourceCodeManager pathInRepositoryFrom:'/files/CVS/stx/libbasic/Array.st' forPackage:Array package |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
874 |
SourceCodeManager pathInRepositoryFrom:'/phys/ibm/CVS/stx/libbasic/Array.st' forPackage:Array package |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
875 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
876 |
SourceCodeManager pathInRepositoryFrom:'/files/CVS/stx/libbasic/Array.st' forPackage:nil |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
877 |
SourceCodeManager pathInRepositoryFrom:'/phys/ibm/CVS/stx/libbasic/Array.st' forPackage:nil |
96 | 878 |
" |
879 |
||
1498 | 880 |
"Created: / 25-11-1995 / 18:42:20 / cg" |
881 |
"Modified: / 21-06-2006 / 12:06:14 / cg" |
|
96 | 882 |
! |
883 |
||
1091
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
884 |
postCheckInClass:aClass |
871 | 885 |
"invoked after a checkIn" |
870 | 886 |
|
928 | 887 |
|p| |
888 |
||
889 |
(p := Project current) notNil ifTrue:[ |
|
890 |
p condenseChangesForClassCheckin:aClass. |
|
891 |
] |
|
1091
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
892 |
|
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
893 |
"Created: / 5.11.2001 / 14:23:00 / cg" |
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
894 |
! |
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
895 |
|
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
896 |
postCheckInExtensionsForPackage:aPackageId |
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
897 |
"invoked after a checkIn" |
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
898 |
|
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
899 |
|p| |
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
900 |
|
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
901 |
(p := Project current) notNil ifTrue:[ |
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
902 |
p condenseChangesForExtensionsCheckInInPackage:aPackageId. |
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
903 |
] |
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
904 |
|
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
905 |
"Created: / 5.11.2001 / 14:23:31 / cg" |
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
906 |
"Modified: / 5.11.2001 / 17:07:38 / cg" |
870 | 907 |
! |
908 |
||
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
909 |
reportError:msg |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
910 |
|fullMsg| |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
911 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
912 |
fullMsg := self class name,' [error]: ',msg. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
913 |
fullMsg errorPrintCR. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
914 |
SourceCodeManagerError raiseErrorString:fullMsg. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
915 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
916 |
"Created: / 29-08-2006 / 12:44:19 / cg" |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
917 |
! |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
918 |
|
96 | 919 |
repositoryTopDirectory |
472 | 920 |
"return the name of the repository" |
921 |
||
96 | 922 |
^ nil |
923 |
||
924 |
"Created: 25.11.1995 / 18:38:59 / cg" |
|
472 | 925 |
"Modified: 12.9.1996 / 02:32:40 / cg" |
96 | 926 |
! |
927 |
||
87 | 928 |
revisionAfter:aRevisionString |
472 | 929 |
"generate the next revision number after the given number" |
930 |
||
501 | 931 |
|idx| |
87 | 932 |
|
933 |
idx := aRevisionString lastIndexOf:$.. |
|
934 |
idx == 0 ifTrue:[ |
|
472 | 935 |
^ ((Integer readFrom:aRevisionString) + 1) printString |
87 | 936 |
]. |
937 |
||
938 |
^ (aRevisionString copyTo:idx) , ((Integer readFrom:(aRevisionString copyFrom:(idx+1)))+1) printString |
|
939 |
||
940 |
" |
|
941 |
SourceCodeManager revisionAfter:'1.2.3.4' |
|
942 |
SourceCodeManager revisionAfter:'123' |
|
943 |
SourceCodeManager revisionAfter:'1.24' |
|
944 |
" |
|
945 |
||
946 |
"Created: 20.11.1995 / 12:54:05 / cg" |
|
472 | 947 |
"Modified: 12.9.1996 / 02:33:03 / cg" |
87 | 948 |
! |
949 |
||
71 | 950 |
sourceCacheDirectory |
472 | 951 |
"return the sourceCache directories name" |
952 |
||
71 | 953 |
|dir nm| |
954 |
||
955 |
(nm := self cacheDirectoryName) isNil ifTrue:[^ nil]. |
|
69 | 956 |
|
71 | 957 |
(dir := nm asFilename) exists ifFalse:[ |
1467 | 958 |
OperatingSystem errorSignal catch:[ |
1060 | 959 |
dir makeDirectory. |
960 |
]. |
|
173
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
961 |
dir exists ifFalse:[ |
535 | 962 |
'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
|
963 |
^ nil |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
964 |
]. |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
965 |
"/ |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
966 |
"/ make it read/writable for everyone |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
967 |
"/ |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
968 |
dir makeReadableForAll. |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
969 |
dir makeWritableForAll. |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
970 |
dir makeExecutableForAll. |
71 | 971 |
]. |
972 |
^ dir |
|
173
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
973 |
|
535 | 974 |
"Modified: 10.1.1997 / 15:13:20 / cg" |
71 | 975 |
! |
69 | 976 |
|
96 | 977 |
sourceInfoOfClass:aClass |
751 | 978 |
"helper: return a classes sourceCodeInfo by extracting its |
979 |
versionString components." |
|
96 | 980 |
|
752 | 981 |
|cls packageInfo revInfo actualSourceFileName classFileNameBase |
501 | 982 |
newInfo container expectedFileName |
752 | 983 |
directoryFromVersion moduleFromVersion fileNameFromVersion |
984 |
directoryFromPackage moduleFromPackage| |
|
96 | 985 |
|
1091
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
986 |
cls := aClass theNonMetaclass. |
96 | 987 |
|
179 | 988 |
newInfo := IdentityDictionary new. |
989 |
||
96 | 990 |
"/ |
991 |
"/ the info given by the classes source ... |
|
752 | 992 |
"/ (i.e. its revisionString) |
96 | 993 |
"/ |
1223 | 994 |
revInfo := cls revisionInfo. |
179 | 995 |
revInfo notNil ifTrue:[ |
996 |
revInfo keysAndValuesDo:[:key :value | |
|
997 |
newInfo at:key put:value |
|
998 |
] |
|
999 |
]. |
|
96 | 1000 |
|
1001 |
"/ |
|
1002 |
"/ the info given by the classes binary ... |
|
752 | 1003 |
"/ (i.e. its package-ID) |
96 | 1004 |
"/ if present, we better trust that one. |
752 | 1005 |
"/ however, it only contains partial information (module:directory:libName). |
179 | 1006 |
"/ (but is available even without a source) |
96 | 1007 |
"/ |
752 | 1008 |
packageInfo := cls packageSourceCodeInfo. |
1009 |
packageInfo notNil ifTrue:[ |
|
1010 |
packageInfo keysAndValuesDo:[:key :value | |
|
179 | 1011 |
newInfo at:key put:value |
160 | 1012 |
] |
96 | 1013 |
]. |
1014 |
||
179 | 1015 |
"/ |
1016 |
"/ no information |
|
1017 |
"/ |
|
752 | 1018 |
(packageInfo isNil and:[revInfo isNil]) ifTrue:[ |
1223 | 1019 |
('SourceCodeManager [warning]: class `' , cls name , ''' has neither source nor compiled-in info') infoPrintCR. |
179 | 1020 |
^ nil |
1021 |
]. |
|
96 | 1022 |
|
1023 |
"/ |
|
179 | 1024 |
"/ validate for conflicts |
1025 |
"/ trust binary if in doubt |
|
1026 |
"/ (in case some cheater edited the version string) |
|
752 | 1027 |
"/ |
179 | 1028 |
revInfo notNil ifTrue:[ |
1029 |
(revInfo includesKey:#repositoryPathName) ifTrue:[ |
|
1030 |
container := revInfo at:#repositoryPathName ifAbsent:nil. |
|
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1031 |
moduleFromVersion := self moduleFromContainerPath:container forClass:aClass. |
1125 | 1032 |
moduleFromVersion notNil ifTrue:[ |
1033 |
newInfo at:#module put:moduleFromVersion. |
|
1034 |
]. |
|
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1035 |
directoryFromVersion := self directoryFromContainerPath:container forClass:aClass. |
752 | 1036 |
directoryFromVersion notNil ifTrue:[ |
1037 |
newInfo at:#directory put:directoryFromVersion. |
|
704 | 1038 |
]. |
752 | 1039 |
fileNameFromVersion := container asFilename baseName. |
1040 |
(fileNameFromVersion endsWith:',v') ifTrue:[ |
|
1041 |
fileNameFromVersion := fileNameFromVersion copyWithoutLast:2. |
|
704 | 1042 |
]. |
752 | 1043 |
newInfo at:#fileName put:fileNameFromVersion. |
179 | 1044 |
|
752 | 1045 |
packageInfo notNil ifTrue:[ |
1046 |
(packageInfo includesKey:#directory) ifTrue:[ |
|
1047 |
directoryFromPackage := packageInfo at:#directory. |
|
1048 |
moduleFromPackage := packageInfo at:#module. |
|
96 | 1049 |
|
752 | 1050 |
(directoryFromPackage ~= directoryFromVersion |
1051 |
or:[moduleFromPackage ~= moduleFromVersion]) ifTrue:[ |
|
1052 |
(directoryFromVersion isNil or:[moduleFromVersion isNil]) ifTrue:[ |
|
1053 |
directoryFromPackage ~= 'no package' ifTrue:[ |
|
1125 | 1054 |
moduleFromVersion notNil ifTrue:[ |
1055 |
('SourceCodeManager [warning]: conflicting source infos (binary: ' |
|
1056 |
, (moduleFromPackage ? 'nil') , '/' , (directoryFromPackage ? 'nil') |
|
1057 |
, ' vs. source:' |
|
1058 |
, (moduleFromVersion ? 'nil') , '/' , (directoryFromVersion ? 'nil') |
|
1059 |
, ')') infoPrintCR. |
|
1060 |
('SourceCodeManager [info]: using binary info: ' |
|
1061 |
, moduleFromPackage , '/' , directoryFromPackage |
|
1062 |
) infoPrintCR. |
|
1063 |
]. |
|
752 | 1064 |
newInfo at:#directory put:directoryFromPackage. |
1065 |
newInfo at:#module put:moduleFromPackage. |
|
583
aeb05843bd69
suppress annoying warning message about binary vs. source info,
Claus Gittinger <cg@exept.de>
parents:
582
diff
changeset
|
1066 |
] |
187
fdda79120bbb
in sourceInfoOfClass: be prepared for binInfo present, but no sourceInfo
Claus Gittinger <cg@exept.de>
parents:
185
diff
changeset
|
1067 |
] ifFalse:[ |
752 | 1068 |
directoryFromPackage ~= 'no package' ifTrue:[ |
581
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
1069 |
('SourceCodeManager [warning]: conflicting source infos (binary: ' |
752 | 1070 |
, moduleFromPackage , '/' , directoryFromPackage |
581
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
1071 |
, ' vs. source:' |
752 | 1072 |
, moduleFromVersion , '/' , directoryFromVersion |
581
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
1073 |
, ')') infoPrintCR. |
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
1074 |
] |
583
aeb05843bd69
suppress annoying warning message about binary vs. source info,
Claus Gittinger <cg@exept.de>
parents:
582
diff
changeset
|
1075 |
] |
179 | 1076 |
] |
1077 |
] |
|
1078 |
]. |
|
1079 |
] |
|
1080 |
]. |
|
1081 |
||
1082 |
"/ |
|
1083 |
"/ the filename I'd expect from its name ... |
|
1084 |
"/ |
|
1863 | 1085 |
classFileNameBase := cls classBaseFilename. |
179 | 1086 |
|
1087 |
(newInfo includesKey:#fileName) ifFalse:[ |
|
1856
1b69eec9b150
care for filename in classFilename,
Claus Gittinger <cg@exept.de>
parents:
1838
diff
changeset
|
1088 |
newInfo at:#fileName put:classFileNameBase |
179 | 1089 |
]. |
1090 |
||
1091 |
"/ guess on the container |
|
1461 | 1092 |
((newInfo includesKey:#directory) and:[newInfo includesKey:#module]) ifTrue:[ |
1093 |
|pathInRepository| |
|
1094 |
||
1095 |
container isNil ifTrue:[ |
|
1096 |
container := (newInfo at:#module) |
|
1097 |
, '/' |
|
1098 |
, (newInfo at:#directory) |
|
1099 |
, '/' |
|
1856
1b69eec9b150
care for filename in classFilename,
Claus Gittinger <cg@exept.de>
parents:
1838
diff
changeset
|
1100 |
, classFileNameBase , ',v'. |
1461 | 1101 |
]. |
1102 |
pathInRepository := (newInfo at:#module) |
|
1103 |
, '/' |
|
1104 |
, (newInfo at:#directory) |
|
1105 |
, '/' |
|
1856
1b69eec9b150
care for filename in classFilename,
Claus Gittinger <cg@exept.de>
parents:
1838
diff
changeset
|
1106 |
, classFileNameBase. |
1461 | 1107 |
newInfo at:#pathInRepository put:pathInRepository. |
179 | 1108 |
]. |
1109 |
||
1110 |
container notNil ifTrue:[ |
|
1111 |
newInfo at:#repositoryPathName put:container. |
|
96 | 1112 |
]. |
1113 |
||
1114 |
"/ check .. |
|
1115 |
revInfo notNil ifTrue:[ |
|
160 | 1116 |
actualSourceFileName := revInfo at:#fileName ifAbsent:nil. |
1117 |
actualSourceFileName notNil ifTrue:[ |
|
1856
1b69eec9b150
care for filename in classFilename,
Claus Gittinger <cg@exept.de>
parents:
1838
diff
changeset
|
1118 |
expectedFileName := classFileNameBase. |
179 | 1119 |
actualSourceFileName ~= expectedFileName ifTrue:[ |
1223 | 1120 |
('SourceCodeManager [warning]: source of class ' , cls name , ' in ' , actualSourceFileName , ';') infoPrintCR. |
535 | 1121 |
('SourceCodeManager [info]: (expected: ' , expectedFileName , '); renamed or missing abbreviation ?') infoPrintCR. |
1122 |
('SourceCodeManager [info]: This may fail to autoload later if left unchanged.') infoPrintCR. |
|
179 | 1123 |
newInfo at:#expectedFileName put:expectedFileName. |
160 | 1124 |
newInfo at:#renamed put:true. |
1856
1b69eec9b150
care for filename in classFilename,
Claus Gittinger <cg@exept.de>
parents:
1838
diff
changeset
|
1125 |
classFileNameBase := actualSourceFileName |
160 | 1126 |
] |
1127 |
] |
|
96 | 1128 |
]. |
1129 |
||
1888 | 1130 |
newInfo at:#classFileNameBase put:(classFileNameBase asFilename nameWithoutSuffix). |
96 | 1131 |
^ newInfo |
1132 |
||
704 | 1133 |
" |
1134 |
self sourceInfoOfClass:Array |
|
1135 |
" |
|
1136 |
||
1888 | 1137 |
"Modified: / 07-11-2006 / 13:58:21 / cg" |
95 | 1138 |
! ! |
1139 |
||
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
1140 |
!AbstractSourceCodeManager class methodsFor:'source code access'! |
95 | 1141 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1142 |
checkinClass:aClass fileName:classFileName directory:packageDir module:moduleDir logMessage:logMessage |
95 | 1143 |
"checkin of a class into the source repository. |
1144 |
Return true if ok, false if not." |
|
1145 |
||
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1146 |
^ self |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1147 |
checkinClass:aClass |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1148 |
fileName:classFileName |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1149 |
directory:packageDir |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1150 |
module:moduleDir |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1151 |
logMessage:logMessage |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1152 |
force:false |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1153 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1154 |
"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
|
1155 |
! |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1156 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1157 |
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
|
1158 |
"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
|
1159 |
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
|
1160 |
|
1159
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1161 |
|tempDir tempFile ok packageMode filter className answer allLabel allValue| |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1162 |
|
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1163 |
className := aClass name. |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1164 |
aClass revision isNil ifTrue:[ |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1165 |
force ifFalse:[ |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1166 |
('CVSSourceCodeManager [warning]: class ' , className, ' has no revision string') errorPrintCR. |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1167 |
|
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1168 |
AbortAllSignal isHandled ifTrue:[ |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1169 |
allLabel := #('Cancel All'). |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1170 |
allValue := #(cancelAll). |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1171 |
] ifFalse:[ |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1172 |
allLabel := #(). |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1173 |
allValue := #(). |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1174 |
]. |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1175 |
|
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1176 |
(aClass theMetaclass includesSelector:#version) ifTrue:[ |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1177 |
answer := OptionBox |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1178 |
request:('Class %1 has no (usable) revision string.\\Check in as newest ?' bindWith:className allBold) withCRs |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1179 |
label:'Confirm' |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1180 |
buttonLabels:(allLabel , #('Cancel' 'CheckIn')) |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1181 |
values:(allValue , #(false #checkIn)) |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1182 |
default:#checkIn. |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1183 |
] ifFalse:[ |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1184 |
answer := OptionBox |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1185 |
request:('Class %1 has no revision string.\\Check in as newest ?' bindWith:className allBold) withCRs |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1186 |
label:'Confirm' |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1187 |
buttonLabels:(allLabel , #('Cancel' 'CheckIn' 'Create & CheckIn')) |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1188 |
values:(allValue , #(false #checkIn #create)) |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1189 |
default:#create. |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1190 |
]. |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1191 |
answer == false ifTrue:[ AbortSignal raise. ^ false ]. |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1192 |
answer == #cancelAll ifTrue:[ AbortAllSignal raise. ^ false ]. |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1193 |
answer == #create ifTrue:[ |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1194 |
aClass theNonMetaclass updateVersionMethodFor:'$' , 'Header' , '$'. "/ concatenated to avoid RCS expansion |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1195 |
]. |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1196 |
] |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1197 |
]. |
e5b888912508
fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents:
1141
diff
changeset
|
1198 |
|
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
1199 |
packageMode := self checkMethodPackagesOf:aClass. |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
1200 |
packageMode == #base ifTrue:[ |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
1201 |
filter := [:mthd | mthd package = aClass package]. |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
1202 |
]. |
71 | 1203 |
|
1804 | 1204 |
tempDir := Filename newTemporaryDirectory. |
813 | 1205 |
ok := false. |
71 | 1206 |
[ |
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
1207 |
|aStream| |
75 | 1208 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1209 |
tempFile := tempDir construct:classFileName. |
1213
7dae237b6ee8
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
1206
diff
changeset
|
1210 |
[ |
7dae237b6ee8
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
1206
diff
changeset
|
1211 |
aStream := tempFile writeStream. |
7dae237b6ee8
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
1206
diff
changeset
|
1212 |
] on:FileStream openErrorSignal do:[:ex| |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1213 |
self reportError:('temporary fileout failed'). |
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
1214 |
^ false |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
1215 |
]. |
71 | 1216 |
|
184
e682441f91cb
flush methods fileCache before filingOut
Claus Gittinger <cg@exept.de>
parents:
183
diff
changeset
|
1217 |
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
|
1218 |
Class fileOutErrorSignal handle:[:ex | |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
1219 |
aStream close. |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1220 |
self reportError:('fileout failed (',ex description,')'). |
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
1221 |
^ false |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
1222 |
] do:[ |
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
1223 |
aClass |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
1224 |
fileOutOn:aStream |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
1225 |
withTimeStamp:false |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
1226 |
withInitialize:true |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
1227 |
withDefinition:true |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
1228 |
methodFilter:filter |
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
1229 |
]. |
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
1230 |
aStream close. |
71 | 1231 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1232 |
tempFile exists ifFalse:[ |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1233 |
self reportError:'temporary fileout failed'. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1234 |
^ false. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1235 |
]. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1236 |
ok := self |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1237 |
checkinClass:aClass |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1238 |
fileName:classFileName |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1239 |
directory:packageDir |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1240 |
module:moduleDir |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1241 |
source:(tempFile name) |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1242 |
logMessage:logMessage |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1243 |
force:force. |
1141
9f0bd4f3d482
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1244 |
] ensure:[ |
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
1245 |
tempDir recursiveRemove |
71 | 1246 |
]. |
813 | 1247 |
^ ok |
71 | 1248 |
|
1249 |
" |
|
1250 |
SourceCodeManager checkinClass:Array |
|
1251 |
" |
|
1252 |
||
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1253 |
"Created: / 11-09-1996 / 16:15:17 / cg" |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1254 |
"Modified: / 25-09-1997 / 12:16:00 / stefan" |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1255 |
"Modified: / 29-08-2006 / 12:47:32 / cg" |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1256 |
! |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1257 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1258 |
checkinClass:aClass logMessage:logMessage |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1259 |
"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
|
1260 |
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
|
1261 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1262 |
|sourceInfo packageDir moduleDir classFileName| |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1263 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1264 |
sourceInfo := self sourceInfoOfClass:aClass. |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1265 |
sourceInfo isNil ifTrue:[ |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1266 |
self reportError:('no sourceInfo for class: ' , aClass name). |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1267 |
^ false |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1268 |
]. |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1269 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1270 |
packageDir := self directoryFromSourceInfo:sourceInfo. |
179 | 1271 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
1272 |
classFileName := self containerFromSourceInfo:sourceInfo. |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1273 |
|
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1274 |
^ self |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1275 |
checkinClass:aClass |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1276 |
fileName:classFileName |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1277 |
directory:packageDir |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1278 |
module:moduleDir |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1279 |
logMessage:logMessage |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1280 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1281 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1282 |
" |
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1283 |
SourceCodeManager checkinClass:Array logMessage:'foo' |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1284 |
" |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1285 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1286 |
"Created: / 06-11-1995 / 18:56:00 / cg" |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1287 |
"Modified: / 29-08-2006 / 12:46:28 / cg" |
71 | 1288 |
! |
1289 |
||
1780 | 1290 |
getFile:fileName revision:revision directory:packageDir module:moduleDir |
1291 |
|s contents| |
|
1292 |
||
1293 |
s := self |
|
1294 |
streamForFile:fileName |
|
1295 |
revision:revision |
|
1296 |
directory:packageDir |
|
1297 |
module:moduleDir. |
|
1298 |
s isNil ifTrue:[^ nil]. |
|
1299 |
contents := s contentsOfEntireFile. |
|
1300 |
s close. |
|
1301 |
^ contents |
|
1302 |
||
1303 |
" |
|
1304 |
SourceCodeManager |
|
1305 |
getFile:'Make.spec' |
|
1306 |
revision:#newest |
|
1307 |
directory:'libbasic2' |
|
1308 |
module:'stx' |
|
1309 |
" |
|
1310 |
||
1311 |
"Created: / 29-08-2006 / 15:47:08 / cg" |
|
1312 |
! |
|
1313 |
||
493
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
1314 |
getMostRecentSourceStreamForClassNamed:aClassName |
472 | 1315 |
"given a class, return an open stream to its most recent source |
1316 |
(not knowing anything about its version). |
|
1317 |
Used when autoloading classes." |
|
1318 |
||
745
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1319 |
^ self |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1320 |
getMostRecentSourceStreamForClassNamed:aClassName |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1321 |
inPackage:nil |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1322 |
! |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1323 |
|
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1324 |
getMostRecentSourceStreamForClassNamed:aClassName inPackage:forcedPackage |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1325 |
"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
|
1326 |
(not knowing anything about its version). |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1327 |
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
|
1328 |
recent found in the repostitory. |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1329 |
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
|
1330 |
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
|
1331 |
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
|
1332 |
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
|
1333 |
|
1205 | 1334 |
|cls sourceInfo classFileName packageDir moduleDir s components i| |
71 | 1335 |
|
133 | 1336 |
cls := Smalltalk classNamed:aClassName. |
1337 |
cls notNil ifTrue:[ |
|
1338 |
sourceInfo := self sourceInfoOfClass:cls. |
|
1339 |
]. |
|
1340 |
sourceInfo notNil ifTrue:[ |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1341 |
packageDir := self directoryFromSourceInfo:sourceInfo. |
179 | 1342 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
1343 |
classFileName := self containerFromSourceInfo:sourceInfo. |
|
133 | 1344 |
] ifFalse:[ |
1838 | 1345 |
classFileName := (Smalltalk fileNameForClass:aClassName), '.st'. |
133 | 1346 |
packageDir := Smalltalk sourceDirectoryNameOfClass:aClassName. |
769 | 1347 |
packageDir notNil ifTrue:[ |
1348 |
(packageDir startsWith:'stx/') ifTrue:[ |
|
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1349 |
"this is a backward compatibility leftover - will vanish" |
769 | 1350 |
packageDir := packageDir copyFrom:5. |
1351 |
] ifFalse:[ |
|
1352 |
i := packageDir indexOf:$:. |
|
1353 |
i ~~ 0 ifTrue:[ |
|
1354 |
moduleDir := packageDir copyTo:i-1. |
|
1355 |
packageDir := packageDir copyFrom:i+1 |
|
1356 |
] |
|
1357 |
] |
|
744 | 1358 |
]. |
769 | 1359 |
moduleDir isNil ifTrue:[ |
1360 |
moduleDir := 'stx' |
|
1361 |
]. |
|
133 | 1362 |
]. |
1363 |
||
1364 |
packageDir isNil ifTrue:[ |
|
745
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1365 |
forcedPackage isNil ifTrue:[ |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1366 |
'SourceCodeManager [warning]: could not extract packageDir' errorPrintCR. |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1367 |
^ nil |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1368 |
]. |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1369 |
moduleDir := forcedPackage asPackageId module. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1370 |
packageDir := forcedPackage asPackageId directory. |
133 | 1371 |
]. |
71 | 1372 |
|
557
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1373 |
s := self |
133 | 1374 |
streamForClass:nil |
1375 |
fileName:classFileName |
|
1376 |
revision:#newest |
|
1377 |
directory:packageDir |
|
1378 |
module:moduleDir |
|
557
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1379 |
cache:false. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1380 |
|
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1381 |
s isNil ifTrue:[ |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1382 |
"/ guessed moduleDir ? |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1383 |
|
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1384 |
sourceInfo isNil ifTrue:[ |
1417
2707849f626a
No need to use Filename>>#concreteClass
Stefan Vogel <sv@exept.de>
parents:
1392
diff
changeset
|
1385 |
components := Filename components:packageDir. |
557
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1386 |
moduleDir := components first. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1387 |
packageDir := (Filename fromComponents:(components copyFrom:2)) asString. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1388 |
s := self |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1389 |
streamForClass:nil |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1390 |
fileName:classFileName |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1391 |
revision:#newest |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1392 |
directory:packageDir |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1393 |
module:moduleDir |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1394 |
cache:false. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1395 |
] |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1396 |
]. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
1397 |
^ s. |
71 | 1398 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1399 |
"Created: / 12-10-1996 / 17:22:54 / cg" |
1838 | 1400 |
"Modified: / 06-10-2006 / 16:17:33 / cg" |
71 | 1401 |
! |
1402 |
||
1594 | 1403 |
getMostRecentSourceStreamForFile:aFileName inPackage:aPackage |
1404 |
"given a filename, return an open stream to its most recent contents |
|
1405 |
(not knowing anything about its version). |
|
1406 |
Used when autoloading extensions or to compare a classes source with the most |
|
1407 |
recent found in the repostitory." |
|
1408 |
||
1780 | 1409 |
|directory module| |
1594 | 1410 |
|
1411 |
module := aPackage asPackageId module. |
|
1412 |
directory := aPackage asPackageId directory. |
|
1413 |
||
1780 | 1414 |
^ self |
1415 |
streamForFile:aFileName |
|
1594 | 1416 |
revision:#newest |
1417 |
directory:directory |
|
1780 | 1418 |
module:module. |
1419 |
||
1420 |
"Created: / 12-10-1996 / 17:22:54 / cg" |
|
1421 |
"Modified: / 29-08-2006 / 15:49:02 / cg" |
|
1594 | 1422 |
! |
1423 |
||
493
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
1424 |
getSourceStreamFor:aClass |
58 | 1425 |
"extract a classes source code and return an open readStream on it. |
1426 |
The classes source code is extracted using the revision and the sourceCodeInfo, |
|
1427 |
which itself is extracted from the classes packageString." |
|
1428 |
||
493
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
1429 |
^ self getSourceStreamFor:aClass revision:nil |
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
1430 |
|
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
1431 |
"Created: 12.10.1996 / 17:21:03 / cg" |
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
1432 |
"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
|
1433 |
! |
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
1434 |
|
493
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
1435 |
getSourceStreamFor:aClass revision:aRevisionStringOrNil |
83
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
1436 |
"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
|
1437 |
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
|
1438 |
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
|
1439 |
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
|
1440 |
|
96 | 1441 |
|classFileName revision |
501 | 1442 |
packageDir moduleDir sourceInfo| |
58 | 1443 |
|
943 | 1444 |
aRevisionStringOrNil == #newest ifTrue:[ |
1445 |
^ self getMostRecentSourceStreamForClassNamed:(aClass theNonMetaclass name). |
|
1446 |
]. |
|
1447 |
||
83
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
1448 |
aRevisionStringOrNil isNil ifTrue:[ |
179 | 1449 |
revision := aClass binaryRevision. |
1450 |
revision isNil ifTrue:[ |
|
191
ebdb455a26ce
take revision if no binaryRevision is available (in sourceStream for ...)
ca
parents:
187
diff
changeset
|
1451 |
revision := aClass revision. |
ebdb455a26ce
take revision if no binaryRevision is available (in sourceStream for ...)
ca
parents:
187
diff
changeset
|
1452 |
revision isNil ifTrue:[ |
535 | 1453 |
('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
|
1454 |
^ nil. |
ebdb455a26ce
take revision if no binaryRevision is available (in sourceStream for ...)
ca
parents:
187
diff
changeset
|
1455 |
]. |
535 | 1456 |
('SourceCodeManager [info]: trusting classes revision ...') infoPrintCR. |
179 | 1457 |
] |
83
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
1458 |
] ifFalse:[ |
179 | 1459 |
revision := aRevisionStringOrNil |
58 | 1460 |
]. |
1461 |
||
95 | 1462 |
sourceInfo := self sourceInfoOfClass:aClass. |
1066
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
1463 |
sourceInfo isNil ifTrue:[ |
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
1464 |
('SourceCodeManager [warning]: no sourceInfo for class `' , aClass name , '''') infoPrintCR. |
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
1465 |
^ nil |
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
1466 |
]. |
58 | 1467 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1468 |
packageDir := self directoryFromSourceInfo:sourceInfo. |
179 | 1469 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
1470 |
classFileName := self containerFromSourceInfo:sourceInfo. |
|
58 | 1471 |
^ self |
179 | 1472 |
streamForClass:aClass |
1473 |
fileName:classFileName |
|
1474 |
revision:revision |
|
1475 |
directory:packageDir |
|
1476 |
module:moduleDir |
|
1477 |
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
|
1478 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1479 |
"Created: / 12-10-1996 / 17:21:52 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1480 |
"Modified: / 23-08-2006 / 14:10:45 / cg" |
1780 | 1481 |
! |
1482 |
||
1483 |
streamForFile:fileName revision:revision directory:packageDir module:moduleDir |
|
1484 |
^ self |
|
1485 |
streamForClass:nil |
|
1486 |
fileName:fileName |
|
1487 |
revision:revision |
|
1488 |
directory:packageDir |
|
1489 |
module:moduleDir |
|
1490 |
cache:true |
|
1491 |
||
1492 |
" |
|
1493 |
SourceCodeManager |
|
1494 |
streamForFile:'Make.spec' |
|
1495 |
revision:#newest |
|
1496 |
directory:'libbasic2' |
|
1497 |
module:'stx' |
|
1498 |
" |
|
1499 |
||
1500 |
"Created: / 29-08-2006 / 15:41:43 / cg" |
|
58 | 1501 |
! ! |
1502 |
||
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
1503 |
!AbstractSourceCodeManager class methodsFor:'source code administration'! |
59
3bb0b97dffa2
reorganized; shared methods into AbstractSCMMgr
Claus Gittinger <cg@exept.de>
parents:
58
diff
changeset
|
1504 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1505 |
getExistingContainersInModule:aModule directory:aPackage |
677 | 1506 |
"{ Pragma: +optSpace }" |
1507 |
||
1508 |
"return a collection containing the names of existing containers" |
|
1509 |
||
1510 |
^ self subclassResponsibility |
|
1511 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1512 |
"Created: / 23-08-2006 / 14:12:07 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1513 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1514 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1515 |
getExistingDirectoriesInModule:aModule |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1516 |
"{ Pragma: +optSpace }" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1517 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1518 |
"return a collection containing the names of existing packages" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1519 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1520 |
^ self subclassResponsibility |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1521 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1522 |
"Created: / 23-08-2006 / 14:13:52 / cg" |
677 | 1523 |
! |
1524 |
||
676 | 1525 |
getExistingModules |
1526 |
"{ Pragma: +optSpace }" |
|
1527 |
||
1528 |
"return a collection containing the names of existing modules" |
|
1529 |
||
1530 |
^ self subclassResponsibility |
|
1531 |
||
1532 |
"Modified: / 29.1.1997 / 18:57:29 / cg" |
|
1533 |
"Created: / 20.5.1998 / 19:38:23 / cg" |
|
1534 |
! |
|
1535 |
||
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1536 |
initialRCSRevisionStringFor:aClass in:dir container:fileName |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1537 |
"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
|
1538 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1539 |
"/ do not make the string below into one string; |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1540 |
"/ 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
|
1541 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1542 |
|nm oldRev idx special| |
472 | 1543 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1544 |
nm := fileName. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1545 |
(nm endsWith:',v') ifTrue:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1546 |
nm := nm copyWithoutLast:2 |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1547 |
]. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1548 |
(nm endsWith:'.st') ifFalse:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1549 |
nm := nm , '.st' |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1550 |
]. |
122
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
1551 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1552 |
oldRev := aClass revisionString. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1553 |
special := ''. |
122
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
1554 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1555 |
oldRev notNil ifTrue:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1556 |
idx := oldRev lastIndexOf:$[. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1557 |
idx ~~ 0 ifTrue:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1558 |
idx := oldRev indexOf:$[ startingAt:idx+1. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1559 |
idx ~~ 0 ifTrue:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1560 |
special := ' ' , (oldRev copyFrom:idx). |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1561 |
] |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1562 |
] |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1563 |
]. |
122
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
1564 |
|
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
1565 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1566 |
^ '$' , 'Header: ' , dir , '/' , fileName , ',v $' |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1567 |
, special |
472 | 1568 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1569 |
"Modified: 17.9.1996 / 15:57:15 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
1570 |
"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
|
1571 |
! |
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
1572 |
|
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1573 |
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
|
1574 |
"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
|
1575 |
Return nil on failure." |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1576 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1577 |
|log| |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1578 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1579 |
log := self |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1580 |
revisionLogOf:nil |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1581 |
fromRevision:0 |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1582 |
toRevision:0 |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1583 |
fileName:classFileName |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1584 |
directory:packageDir |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1585 |
module:moduleDir. |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1586 |
|
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1587 |
log isNil ifTrue:[^ nil]. |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1588 |
^ 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
|
1589 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1590 |
" |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1591 |
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
|
1592 |
" |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1593 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1594 |
"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
|
1595 |
! |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1596 |
|
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1597 |
newestRevisionLogEntryOf:aClass |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1598 |
"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
|
1599 |
Return nil on failure." |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1600 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1601 |
^ 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
|
1602 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1603 |
" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1604 |
SourceCodeManager newestRevisionLogEntryOf:Array |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1605 |
SourceCodeManager newestRevisionLogEntryOf:Connection |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1606 |
" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1607 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1608 |
"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
|
1609 |
"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
|
1610 |
! |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1611 |
|
207
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1612 |
newestRevisionOf:aClass |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1613 |
"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
|
1614 |
Return nil on failure." |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1615 |
|
1205 | 1616 |
|sourceInfo packageDir moduleDir classFileName| |
1005
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
1617 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
1618 |
sourceInfo := self sourceInfoOfClass:aClass. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
1619 |
sourceInfo isNil ifTrue:[^ nil]. |
207
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1620 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1621 |
packageDir := self directoryFromSourceInfo:sourceInfo. |
1005
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
1622 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
1623 |
classFileName := self containerFromSourceInfo:sourceInfo. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
1624 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
1625 |
^ self newestRevisionInFile:classFileName directory:packageDir module:moduleDir |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
1626 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
1627 |
"/ |log| |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
1628 |
"/ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
1629 |
"/ log := self revisionLogOf:aClass fromRevision:0 toRevision:0. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
1630 |
"/ log isNil ifTrue:[^ nil]. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
1631 |
"/ ^ log at:#newestRevision ifAbsent:nil |
207
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1632 |
|
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1633 |
" |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1634 |
SourceCodeManager newestRevisionOf:Array |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1635 |
SourceCodeManager newestRevisionOf:Connection |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1636 |
" |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1637 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1638 |
"Modified: / 23-08-2006 / 14:10:47 / cg" |
207
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1639 |
! |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
1640 |
|
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1641 |
revisionInfoFromRCSString:aString |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1642 |
"{ Pragma: +optSpace }" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1643 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1644 |
"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
|
1645 |
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
|
1646 |
|
1463
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1647 |
|words firstWord nextWord info nm| |
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1648 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1649 |
info := IdentityDictionary new. |
1463
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1650 |
words := aString asCollectionOfWords readStream. |
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1651 |
|
1463
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1652 |
words atEnd ifFalse:[ |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1653 |
firstWord := words next. |
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1654 |
|
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1655 |
"/ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1656 |
"/ supported formats: |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1657 |
"/ |
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1658 |
"/ $-Header: pathName rev date time user state $ |
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1659 |
"/ $-Revision: rev $ |
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1660 |
"/ $-Id: fileName rev date time user state $ |
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1661 |
"/ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1662 |
|
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1663 |
(firstWord = '$Header:') ifTrue:[ |
1463
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1664 |
nm := words next. |
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1665 |
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
|
1666 |
(nm endsWith:',v') ifTrue:[ |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1667 |
nm := nm copyWithoutLast:2 |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1668 |
]. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1669 |
info at:#fileName put:nm asFilename baseName. |
1463
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1670 |
words atEnd ifFalse:[ |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1671 |
nextWord := words next. |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1672 |
nextWord ~= '$' ifTrue:[ |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1673 |
info at:#revision put:nextWord. |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1674 |
nextWord := words next. |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1675 |
nextWord ~= '$' ifTrue:[ |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1676 |
info at:#date put:nextWord. |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1677 |
info at:#time put:words next. |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1678 |
nextWord := words next. |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1679 |
(nextWord startsWithAnyOf:'+-') ifTrue:[ |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1680 |
info at:#timezone put:nextWord. |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1681 |
nextWord := words next. |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1682 |
]. |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1683 |
info at:#user put:nextWord. |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1684 |
info at:#state put:words next. |
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1685 |
] |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1686 |
]. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1687 |
]. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1688 |
^ info |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1689 |
]. |
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1690 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1691 |
(firstWord = '$Revision:') ifTrue:[ |
1463
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1692 |
info at:#revision put:words next. |
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1693 |
^ info |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1694 |
]. |
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1695 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1696 |
(firstWord = '$Id:') ifTrue:[ |
1463
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1697 |
info at:#fileName put:(words next). |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1698 |
info at:#revision put:(words next). |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1699 |
info at:#date put:(words next). |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1700 |
info at:#time put:(words next). |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1701 |
info at:#user put:(words next). |
fd42454f4339
Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents:
1461
diff
changeset
|
1702 |
info at:#state put:(words next). |
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1703 |
^ info |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1704 |
]. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1705 |
]. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1706 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1707 |
^ nil |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1708 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1709 |
" |
968 | 1710 |
SourceCodeManager revisionInfoFromString:'$' , 'Revision: 1.122 $' |
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1711 |
SourceCodeManager revisionInfoFromString:(SourceCodeManager version) |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1712 |
" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1713 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1714 |
"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
|
1715 |
! |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1716 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1717 |
revisionInfoFromString:aString |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1718 |
"{ Pragma: +optSpace }" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1719 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1720 |
"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
|
1721 |
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
|
1722 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1723 |
^ self subclassResponsibility |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1724 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1725 |
"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
|
1726 |
"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
|
1727 |
! |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
1728 |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1729 |
revisionLogOf:aClass |
95 | 1730 |
"return info about the repository container and |
1731 |
the revisionlog as a collection of revision entries. |
|
1732 |
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
|
1733 |
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
|
1734 |
filled with: |
1863 | 1735 |
#container -> the RCS container file name |
1736 |
#filename -> the actual source file name |
|
1737 |
#newestRevision -> the revisionString of the newest revision |
|
1738 |
#numberOfRevisions -> the number of revisions in the container |
|
1739 |
#revisions -> collection of per-revision info |
|
1740 |
||
1741 |
per revision info consists of one record per revision: |
|
1742 |
||
1743 |
#revision -> the revision string |
|
1744 |
#author -> who checked that revision into the repository |
|
1745 |
#date -> when was it checked in |
|
1746 |
#state -> the RCS state |
|
1747 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
|
1748 |
||
1749 |
revisions are ordered newest first |
|
1750 |
(i.e. the last entry is for the initial revision; the first for the most recent one) |
|
1751 |
" |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1752 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1753 |
^ self |
1863 | 1754 |
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
|
1755 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1756 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1757 |
SourceCodeManager revisionLogOf:Array |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1758 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1759 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1760 |
"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
|
1761 |
"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
|
1762 |
! |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1763 |
|
110 | 1764 |
revisionLogOf:aClass fromRevision:rev1 |
1765 |
"return info about the repository container and |
|
1766 |
(part of) the revisionlog as a collection of revision entries. |
|
1767 |
Return nil on failure. |
|
1768 |
||
1769 |
The returned information is a structure (IdentityDictionary) |
|
1770 |
filled with: |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1771 |
#container -> the RCS container file name |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1772 |
#filename -> the actual source file name |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1773 |
#newestRevision -> the revisionString of the newest revision |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1774 |
#numberOfRevisions -> the number of revisions in the container |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1775 |
#revisions -> collection of per-revision info (see below) |
110 | 1776 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1777 |
for some classes, additional info is returned: |
110 | 1778 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1779 |
#renamed -> true if the class has been renamed or copied |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1780 |
and the sourceInfo is from the previous one |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1781 |
#expectedFileName -> the filename we would expect (i.e. for the new class) |
110 | 1782 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1783 |
rev1 specifies from which revisions a logEntry is wanted: |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1784 |
If rev1 is nil, the first revision is the initial revision |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1785 |
otherwise, the log starts with that revision. |
110 | 1786 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1787 |
per revision info consists of one record per revision: |
110 | 1788 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1789 |
#revision -> the revision string |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1790 |
#author -> who checked that revision into the repository |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1791 |
#date -> when was it checked in |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1792 |
#state -> the RCS state |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1793 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
110 | 1794 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1795 |
revisions are ordered newest first |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1796 |
(i.e. the last entry is for the initial revision; |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1797 |
the first for the most recent one) |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1798 |
" |
110 | 1799 |
|
1800 |
^ self revisionLogOf:aClass fromRevision:rev1 toRevision:nil |
|
1801 |
||
1802 |
" |
|
1803 |
SourceCodeManager revisionLogOf:Array fromRevision:'1.40' |
|
1804 |
" |
|
1805 |
||
1806 |
"Created: 6.11.1995 / 18:56:00 / cg" |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1807 |
"Modified: 10.1.1997 / 13:29:50 / cg" |
110 | 1808 |
! |
1809 |
||
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1810 |
revisionLogOf:aClass fromRevision:rev1 toRevision:rev2 |
95 | 1811 |
"return info about the repository container and |
1812 |
(part of) the revisionlog as a collection of revision entries. |
|
1813 |
Return nil on failure. |
|
1814 |
||
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1815 |
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
|
1816 |
filled with: |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1817 |
#container -> the RCS container file name |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1818 |
#filename -> the actual source file name |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1819 |
#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
|
1820 |
#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
|
1821 |
#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
|
1822 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1823 |
for some classes, additional info is returned: |
96 | 1824 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1825 |
#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
|
1826 |
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
|
1827 |
#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
|
1828 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1829 |
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
|
1830 |
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
|
1831 |
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
|
1832 |
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
|
1833 |
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
|
1834 |
If both are nil, no logEntries are extracted (i.e. only the header). |
96 | 1835 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1836 |
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
|
1837 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1838 |
#revision -> the revision string |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1839 |
#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
|
1840 |
#date -> when was it checked in |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1841 |
#state -> the RCS state |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1842 |
#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
|
1843 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1844 |
revisions are ordered newest first |
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1845 |
(i.e. the last entry is for the initial revision; |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
1846 |
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
|
1847 |
" |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1848 |
|
501 | 1849 |
|sourceInfo packageDir moduleDir classFileName info| |
95 | 1850 |
|
1851 |
sourceInfo := self sourceInfoOfClass:aClass. |
|
1852 |
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
|
1853 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1854 |
packageDir := self directoryFromSourceInfo:sourceInfo. |
179 | 1855 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
1856 |
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
|
1857 |
|
96 | 1858 |
info := self |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1859 |
revisionLogOf:aClass |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1860 |
fromRevision:rev1 |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1861 |
toRevision:rev2 |
179 | 1862 |
fileName:classFileName |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1863 |
directory:packageDir |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1864 |
module:moduleDir. |
96 | 1865 |
|
1866 |
info notNil ifTrue:[ |
|
179 | 1867 |
"/ (sourceInfo includesKey:#renamed) ifTrue:[ |
1868 |
"/ info at:#renamed put:(sourceInfo at:#renamed) |
|
1869 |
"/ ]. |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1870 |
(sourceInfo includesKey:#expectedFileName) ifTrue:[ |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1871 |
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
|
1872 |
] |
96 | 1873 |
]. |
1874 |
^ info |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1875 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1876 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1877 |
SourceCodeManager revisionLogOf:Array fromRevision:'1.40' toRevision:'1.43' |
96 | 1878 |
SourceCodeManager revisionLogOf:XtBoxNew |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1879 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1880 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1881 |
"Created: / 06-11-1995 / 18:56:00 / cg" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1882 |
"Modified: / 23-08-2006 / 14:10:50 / cg" |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1883 |
! |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
1884 |
|
935
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1885 |
revisionLogOf:aClass numberOfRevisions:numRevisions |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1886 |
"return info about the repository container and |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1887 |
(part of) the revisionlog (numRevisions newest revisions) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1888 |
as a collection of revision entries. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1889 |
Return nil on failure. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1890 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1891 |
The returned information is a structure (IdentityDictionary) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1892 |
filled with: |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1893 |
#container -> the RCS container file name |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1894 |
#filename -> the actual source file name |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1895 |
#newestRevision -> the revisionString of the newest revision |
1069 | 1896 |
#numberOfRevisions -> the number of revisions in the container (nil for all) |
935
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1897 |
#revisions -> collection of per-revision info (see below) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1898 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1899 |
for some classes, additional info is returned: |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1900 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1901 |
#renamed -> true if the class has been renamed or copied |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1902 |
and the sourceInfo is from the previous one |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1903 |
#expectedFileName -> the filename we would expect (i.e. for the new class) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1904 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1905 |
rev1 / rev2 specify from which revisions a logEntry is wanted: |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1906 |
If rev1 is nil, the first revision is the initial revision |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1907 |
otherwise, the log starts with that revision. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1908 |
If rev2 is nil, the last revision is the newest revision |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1909 |
otherwise, the log ends with that revision. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1910 |
If both are nil, no logEntries are extracted (i.e. only the header). |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1911 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1912 |
per revision info consists of one record per revision: |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1913 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1914 |
#revision -> the revision string |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1915 |
#author -> who checked that revision into the repository |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1916 |
#date -> when was it checked in |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1917 |
#state -> the RCS state |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1918 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1919 |
#logMessage -> the checkIn log message |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1920 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1921 |
revisions are ordered newest first |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1922 |
(i.e. the last entry is for the initial revision; |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1923 |
the first for the most recent one) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1924 |
" |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1925 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1926 |
|sourceInfo packageDir moduleDir classFileName info| |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1927 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1928 |
sourceInfo := self sourceInfoOfClass:aClass. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1929 |
sourceInfo isNil ifTrue:[^ nil]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1930 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1931 |
packageDir := self directoryFromSourceInfo:sourceInfo. |
935
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1932 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1933 |
classFileName := self containerFromSourceInfo:sourceInfo. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1934 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1935 |
info := self |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1936 |
revisionLogOf:aClass |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1937 |
numberOfRevisions:numRevisions |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1938 |
fileName:classFileName |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1939 |
directory:packageDir |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1940 |
module:moduleDir. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1941 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1942 |
info notNil ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1943 |
"/ (sourceInfo includesKey:#renamed) ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1944 |
"/ info at:#renamed put:(sourceInfo at:#renamed) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1945 |
"/ ]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1946 |
(sourceInfo includesKey:#expectedFileName) ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1947 |
info at:#expectedFileName put:(sourceInfo at:#expectedFileName) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1948 |
] |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1949 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1950 |
^ info |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1951 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1952 |
" |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1953 |
SourceCodeManager revisionLogOf:Array numberOfRevisions:10 |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1954 |
" |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1955 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1956 |
"Modified: / 23-08-2006 / 14:10:52 / cg" |
935
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1957 |
! |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
1958 |
|
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1959 |
revisionLogOfContainer:classFileName directory:packageDir module:moduleDir |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1960 |
"return info about the repository container and |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1961 |
(part of) the revisionlog as a collection of revision entries. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1962 |
Return nil on failure. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1963 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1964 |
The returned information is a structure (IdentityDictionary) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1965 |
filled with: |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1966 |
#container -> the RCS container file name |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1967 |
#filename -> the actual source file name |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1968 |
#newestRevision -> the revisionString of the newest revision |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1969 |
#numberOfRevisions -> the number of revisions in the container |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1970 |
#revisions -> collection of per-revision info (see below) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1971 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1972 |
per revision info consists of one record per revision: |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1973 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1974 |
#revision -> the revision string |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1975 |
#author -> who checked that revision into the repository |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1976 |
#date -> when was it checked in |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1977 |
#state -> the RCS state |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1978 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1979 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1980 |
revisions are ordered newest first |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1981 |
(i.e. the last entry is for the initial revision; |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1982 |
the first for the most recent one) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1983 |
" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1984 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1985 |
^ self |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1986 |
revisionLogOf:nil |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1987 |
fromRevision:nil |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1988 |
toRevision:nil |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1989 |
fileName:classFileName |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1990 |
directory:packageDir |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1991 |
module:moduleDir |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1992 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1993 |
" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1994 |
CVSSourceCodeManager |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1995 |
revisionLogInFile:'Array.st' directory:'libbasic' module:'stx' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1996 |
" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1997 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1998 |
"Modified: 10.1.1997 / 13:29:06 / cg" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1999 |
! |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2000 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2001 |
revisionLogOfContainer:fileName module:moduleDir directory:packageDir fromRevision:rev1 toRevision:rev2 |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2002 |
"return info about the repository container and |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2003 |
(part of) the revisionlog as a collection of revision entries. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2004 |
Return nil on failure. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2005 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2006 |
The returned information is a structure (IdentityDictionary) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2007 |
filled with: |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2008 |
#container -> the RCS container file name |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2009 |
#filename -> the actual source file name |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2010 |
#newestRevision -> the revisionString of the newest revision |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2011 |
#numberOfRevisions -> the number of revisions in the container |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2012 |
#revisions -> collection of per-revision info (see below) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2013 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2014 |
for some classes, additional info is returned: |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2015 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2016 |
#renamed -> true if the class has been renamed or copied |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2017 |
and the sourceInfo is from the previous one |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2018 |
#expectedFileName -> the filename we would expect (i.e. for the new class) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2019 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2020 |
rev1 / rev2 specify from which revisions a logEntry is wanted: |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2021 |
If rev1 is nil, the first revision is the initial revision |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2022 |
otherwise, the log starts with that revision. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2023 |
If rev2 is nil, the last revision is the newest revision |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2024 |
otherwise, the log ends with that revision. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2025 |
If both are nil, no logEntries are extracted (i.e. only the header). |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2026 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2027 |
per revision info consists of one record per revision: |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2028 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2029 |
#revision -> the revision string |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2030 |
#author -> who checked that revision into the repository |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2031 |
#date -> when was it checked in |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2032 |
#state -> the RCS state |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2033 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2034 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2035 |
revisions are ordered newest first |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2036 |
(i.e. the last entry is for the initial revision; |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2037 |
the first for the most recent one) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2038 |
" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2039 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2040 |
|info| |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2041 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2042 |
info := self |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2043 |
revisionLogOf:nil |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2044 |
fromRevision:rev1 |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2045 |
toRevision:rev2 |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2046 |
fileName:fileName |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2047 |
directory:packageDir |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2048 |
module:moduleDir. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2049 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2050 |
^ info |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2051 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2052 |
" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2053 |
CVSSourceCodeManager revisionLogOfContainer:'Array.st' module:'stx' package:'libbasic' fromRevision:'1.40' toRevision:'1.43' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2054 |
" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2055 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2056 |
"Created: / 23-08-2006 / 14:14:59 / cg" |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2057 |
! |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
2058 |
|
213 | 2059 |
revisionsOf:aClass |
2060 |
"return a collection of revisions (as strings) found in the repository. |
|
2061 |
The most recent (newest) revision will be the first in the list. |
|
2062 |
Return nil on failure." |
|
2063 |
||
2064 |
|log revisions| |
|
2065 |
||
2066 |
log := self revisionLogOf:aClass. |
|
2067 |
log isNil ifTrue:[^ nil]. |
|
2068 |
revisions := log at:#revisions ifAbsent:nil. |
|
2069 |
revisions isNil ifTrue:[^ nil]. |
|
2070 |
^ revisions collect:[:rev | rev at:#revision]. |
|
2071 |
||
2072 |
" |
|
2073 |
SourceCodeManager revisionsOf:Array |
|
2074 |
SourceCodeManager newestRevisionOf:Array |
|
2075 |
" |
|
2076 |
||
2077 |
"Modified: 10.4.1996 / 23:14:24 / cg" |
|
2078 |
"Created: 19.4.1996 / 17:24:34 / cg" |
|
2079 |
! |
|
2080 |
||
1784 | 2081 |
writeHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter filterRepository:repositoryFilter filterModules:moduleFilter filterProjects:projectFilterArg to:aStream |
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2082 |
"send a full historyLog to some stream. |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2083 |
This walks over all possible repository roots." |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2084 |
|
1784 | 2085 |
|projectFilter goalString prevUser prevCvsRoot | |
2086 |
||
2087 |
projectFilter := projectFilterArg isEmptyOrNil ifTrue:nil ifFalse:projectFilterArg. |
|
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2088 |
|
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2089 |
goalString := ''. |
1784 | 2090 |
projectFilter notNil ifTrue:[ |
2091 |
projectFilter size == 1 ifTrue:[ |
|
2092 |
goalString := goalString , 'of ',projectFilter first. |
|
2093 |
] ifFalse:[ |
|
2094 |
projectFilter size == 2 ifTrue:[ |
|
2095 |
goalString := goalString , 'of ',projectFilter first,' and ',projectFilter second. |
|
2096 |
] ifFalse:[ |
|
2097 |
goalString := goalString , 'of ',projectFilter size printString,' projects'. |
|
2098 |
]. |
|
2099 |
]. |
|
2100 |
goalString := goalString,' ' |
|
2101 |
]. |
|
1447
2ac1cf09722b
isEmptyOrNil / notEmptyOrNil refactoring
Claus Gittinger <cg@exept.de>
parents:
1432
diff
changeset
|
2102 |
(timeGoal notEmptyOrNil) ifTrue:[ |
1784 | 2103 |
goalString := goalString , 'since ' , timeGoal,' '. |
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2104 |
]. |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2105 |
userFilter notNil ifTrue:[ |
1220 | 2106 |
userFilter isString ifTrue:[ |
1784 | 2107 |
goalString := 'by user ',userFilter |
1220 | 2108 |
] ifFalse:[ |
2109 |
userFilter size == 1 ifTrue:[ |
|
1784 | 2110 |
goalString := 'by user ',(userFilter first) |
1220 | 2111 |
] ifFalse:[ |
1784 | 2112 |
goalString := 'by users ',(userFilter first),'...',(userFilter last) |
1220 | 2113 |
] |
2114 |
]. |
|
1784 | 2115 |
goalString := goalString,' '. |
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2116 |
]. |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2117 |
|
1784 | 2118 |
aStream nextPutLine:'**** repository history ' , goalString , '****'. |
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2119 |
aStream cr. |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2120 |
|
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2121 |
self |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2122 |
reportHistoryLogSince:timeGoal |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2123 |
filterSTSources:filter |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2124 |
filterUser:userFilter |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2125 |
filterRepository:repositoryFilter |
1038 | 2126 |
filterModules:moduleFilter |
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2127 |
inTo:[:info | |
1784 | 2128 |
|user recordType fileName date time rev pkgDir |
2129 |
module directory pkg |
|
2130 |
clsName cvsRoot cls clsRev revInfo| |
|
2131 |
||
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2132 |
pkgDir := info at:#directory ifAbsent:'?'. |
1784 | 2133 |
module := pkgDir upTo:$/. |
2134 |
directory := pkgDir copyFrom:(module size+2). |
|
2135 |
pkg := module,':',directory. |
|
2136 |
||
2137 |
(projectFilter isEmptyOrNil |
|
2138 |
or:[ projectFilter includes:pkg ]) ifTrue:[ |
|
2139 |
||
2140 |
user := info at:#user ifAbsent:'?'. |
|
2141 |
recordType := info at:#cvsRecordType ifAbsent:'?'. |
|
2142 |
fileName := info at:#fileName ifAbsent:'?'. |
|
2143 |
date := info at:#date ifAbsent:'?'. |
|
2144 |
time := info at:#time ifAbsent:'?'. |
|
2145 |
rev := info at:#revision ifAbsent:'?'. |
|
2146 |
||
2147 |
clsName := info at:#className ifAbsent:'?'. |
|
2148 |
cvsRoot := info at:#cvsRoot ifAbsent:'?'. |
|
2149 |
||
2150 |
cvsRoot ~= prevCvsRoot ifTrue:[ |
|
2151 |
aStream cr. |
|
2152 |
aStream nextPutLine:'>>>> repository: ' , cvsRoot , ' <<<<'. |
|
2153 |
aStream cr; cr. |
|
2154 |
aStream nextPutLine:' Date Time User Rev File Package'. |
|
2155 |
prevUser := nil. |
|
2156 |
prevCvsRoot := cvsRoot. |
|
2157 |
]. |
|
2158 |
prevUser ~= user ifTrue:[ |
|
2159 |
aStream cr. |
|
2160 |
prevUser := user. |
|
2161 |
]. |
|
2162 |
aStream |
|
2163 |
nextPutAll:recordType; space; |
|
2164 |
nextPutAll:(date printString paddedTo:10); space; nextPutAll:(time printString paddedTo:5); space; |
|
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2165 |
nextPutAll:(user leftPaddedTo:10); space; |
1784 | 2166 |
nextPutAll:(rev decimalPaddedTo:8 and:4 at:$. withLeft:(Character space) right:nil); tab; |
2167 |
nextPutAll:(fileName paddedTo:30); space; |
|
2168 |
nextPutAll:pkg. |
|
2169 |
||
2170 |
"/ |
|
2171 |
"/ for your convenience: |
|
2172 |
"/ check what the actual version is in the image |
|
2173 |
"/ |
|
2174 |
clsName notNil ifTrue:[ |
|
2175 |
revInfo := nil. |
|
2176 |
cls := Smalltalk classNamed:clsName. |
|
2177 |
(cls notNil and:[(clsRev := cls revision) notNil]) ifTrue:[ |
|
2178 |
rev ~= clsRev ifTrue:[ |
|
2179 |
revInfo := (' current: ' , clsRev) |
|
2180 |
] |
|
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2181 |
] ifFalse:[ |
1784 | 2182 |
cls isNil ifTrue:[ |
2183 |
revInfo := (' current: ** none **') |
|
1480 | 2184 |
] ifFalse:[ |
1784 | 2185 |
cls isLoaded ifTrue:[ |
2186 |
revInfo := (' current: ** no revision info **') |
|
2187 |
] ifFalse:[ |
|
2188 |
revInfo := (' current: ** not loaded **') |
|
2189 |
] |
|
2190 |
] |
|
2191 |
]. |
|
2192 |
revInfo notNil ifTrue:[ |
|
2193 |
aStream nextPutAll:revInfo |
|
2194 |
]. |
|
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2195 |
]. |
1784 | 2196 |
aStream cr |
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2197 |
]. |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2198 |
]. |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2199 |
|
1784 | 2200 |
"Created: / 12-09-2006 / 15:18:35 / cg" |
2201 |
! |
|
2202 |
||
2203 |
writeHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter filterRepository:repositoryFilter filterModules:moduleFilter to:aStream |
|
2204 |
"send a full historyLog to some stream. |
|
2205 |
This walks over all possible repository roots." |
|
2206 |
||
2207 |
self |
|
2208 |
writeHistoryLogSince:timeGoal |
|
2209 |
filterSTSources:filter |
|
2210 |
filterUser:userFilter |
|
2211 |
filterRepository:repositoryFilter |
|
2212 |
filterModules:moduleFilter |
|
2213 |
filterProjects:nil |
|
2214 |
to:aStream |
|
2215 |
||
2216 |
"Modified: / 12-09-2006 / 15:19:11 / cg" |
|
1038 | 2217 |
! |
2218 |
||
2219 |
writeHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter filterRepository:repositoryFilter to:aStream |
|
2220 |
"send a full historyLog to some stream. |
|
2221 |
This walks over all possible repository roots." |
|
2222 |
||
2223 |
^self |
|
2224 |
writeHistoryLogSince:timeGoal |
|
2225 |
filterSTSources:filter |
|
2226 |
filterUser:userFilter |
|
2227 |
filterRepository:repositoryFilter |
|
2228 |
filterModules:nil to:aStream |
|
2229 |
||
2230 |
"Modified: / 17.1.2001 / 13:15:54 / cg" |
|
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2231 |
! |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2232 |
|
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2233 |
writeHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter to:aStream |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2234 |
"send a full historyLog to some stream. |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2235 |
This walks over all possible repository roots." |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2236 |
|
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2237 |
^ self |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2238 |
writeHistoryLogSince:timeGoal |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2239 |
filterSTSources:filter |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2240 |
filterUser:userFilter |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2241 |
filterRepository:nil |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2242 |
to:aStream |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2243 |
! |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2244 |
|
147 | 2245 |
writeHistoryLogSince:timeGoal filterSTSources:filter to:aStream |
472 | 2246 |
"send a repositories historyLog to some stream" |
2247 |
||
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2248 |
^ self |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2249 |
writeHistoryLogSince:timeGoal |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2250 |
filterSTSources:filter |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2251 |
filterUser:nil |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2252 |
filterRepository:nil |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2253 |
to:aStream |
147 | 2254 |
|
472 | 2255 |
"Modified: 12.9.1996 / 02:36:32 / cg" |
147 | 2256 |
! |
2257 |
||
2258 |
writeHistoryLogSince:timeGoal to:aStream |
|
472 | 2259 |
"send a repositories historyLog to some stream" |
2260 |
||
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2261 |
^ self |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2262 |
writeHistoryLogSince:timeGoal |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2263 |
filterSTSources:true |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2264 |
filterUser:nil |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2265 |
filterRepository:nil |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2266 |
to:aStream |
147 | 2267 |
|
2268 |
"Created: 13.12.1995 / 10:28:27 / cg" |
|
472 | 2269 |
"Modified: 12.9.1996 / 02:36:38 / cg" |
147 | 2270 |
! |
2271 |
||
96 | 2272 |
writeRevisionLogMessagesFrom:log to:aStream |
2273 |
"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
|
2274 |
|
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
2275 |
^ self writeRevisionLogMessagesFrom:log withHeader:true to:aStream |
138
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
2276 |
|
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
2277 |
"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
|
2278 |
! |
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
2279 |
|
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
2280 |
writeRevisionLogMessagesFrom:log withHeader:header to:aStream |
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
2281 |
"helper; send the revisionlog to aStream" |
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
2282 |
|
1451 | 2283 |
|tags| |
2284 |
||
138
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
2285 |
header ifTrue:[ |
179 | 2286 |
"/ (log at:#renamed ifAbsent:false) ifTrue:[ |
2287 |
"/ aStream nextPutAll:' Class was probably renamed; revision info is from original class.'. |
|
2288 |
"/ aStream cr; nextPutAll:' You may have to create a new container for it.'. |
|
2289 |
"/ aStream cr; cr. |
|
2290 |
"/ ]. |
|
138
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
2291 |
|
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
2292 |
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
|
2293 |
aStream nextPutAll:' Newest revision: '; nextPutLine:(log at:#newestRevision) printString. |
1451 | 2294 |
tags := log at:#symbolicNames ifAbsent:nil. |
2295 |
tags notNil ifTrue:[ |
|
2296 |
aStream nextPutAll:' Stable revision: '; nextPutAll:(tags at:'stable' ifAbsent:'none'); cr. |
|
2297 |
aStream nextPutAll:' Symbolic names: '; cr. |
|
2298 |
"sort tags by tag name" |
|
2299 |
tags := tags associations sort:[:a :b| a key < b key]. |
|
2300 |
tags do:[:eachAssociation| |
|
2301 |
aStream tab; nextPutAll:eachAssociation key; |
|
2302 |
nextPutAll:': '; |
|
2303 |
nextPutAll:eachAssociation value; cr. |
|
2304 |
] |
|
2305 |
]. |
|
96 | 2306 |
]. |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2307 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2308 |
(log at:#revisions) do:[:entry | |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2309 |
|logMsg| |
96 | 2310 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2311 |
aStream cr. |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2312 |
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
|
2313 |
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
|
2314 |
aStream nextPutAll:' author: '; nextPutAll:(entry at:#author); tab. |
1451 | 2315 |
aStream nextPutAll:' lines: '; nextPutAll:(entry at:#numberOfChangedLines); cr. |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2316 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2317 |
logMsg := entry at:#logMessage. |
1467 | 2318 |
(logMsg isBlank or:[logMsg withoutSeparators = '.']) ifTrue:[ |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2319 |
logMsg := '*** empty log message ***' |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2320 |
]. |
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
2321 |
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
|
2322 |
]. |
96 | 2323 |
|
2324 |
"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
|
2325 |
"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
|
2326 |
"Modified: 27.11.1996 / 18:26:30 / stefan" |
73 | 2327 |
! |
2328 |
||
77 | 2329 |
writeRevisionLogOf:aClass fromRevision:rev1 toRevision:rev2 to:aStream |
73 | 2330 |
"extract a classes log and append it to aStream." |
2331 |
||
96 | 2332 |
|log | |
73 | 2333 |
|
96 | 2334 |
log := self revisionLogOf:aClass fromRevision:rev1 toRevision:rev2. |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2335 |
log isNil ifTrue:[ |
1024
7344e4e24b1c
missing repository-log message beautified
Claus Gittinger <cg@exept.de>
parents:
1021
diff
changeset
|
2336 |
aStream cr; nextPutAll:' ** No revision log available **'. |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2337 |
^ false |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2338 |
]. |
96 | 2339 |
|
2340 |
self writeRevisionLogMessagesFrom:log to:aStream. |
|
2341 |
^ true |
|
73 | 2342 |
|
2343 |
" |
|
77 | 2344 |
SourceCodeManager writeRevisionLogOf:Array fromRevision:'1.40' toRevision:'1.43' to:Transcript |
73 | 2345 |
" |
2346 |
||
2347 |
"Created: 6.11.1995 / 18:56:00 / cg" |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2348 |
"Modified: 14.2.1997 / 21:11:57 / cg" |
77 | 2349 |
! |
2350 |
||
87 | 2351 |
writeRevisionLogOf:aClass to:aStream |
2352 |
"extract a classes log and append it to aStream." |
|
2353 |
||
2354 |
^ self |
|
1863 | 2355 |
writeRevisionLogOf:aClass fromRevision:nil toRevision:nil to:aStream |
77 | 2356 |
|
87 | 2357 |
" |
2358 |
SourceCodeManager writeRevisionLogOf:Array to:Transcript |
|
2359 |
" |
|
2360 |
! ! |
|
77 | 2361 |
|
1205 | 2362 |
!AbstractSourceCodeManager class methodsFor:'subclass responsibility'! |
2363 |
||
2364 |
reportHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter |
|
2365 |
filterRepository:repositoryFilter filterModules:moduleFilter inTo:aBlock |
|
2366 |
||
2367 |
^ self subclassResponsibility |
|
2368 |
! ! |
|
2369 |
||
1527 | 2370 |
!AbstractSourceCodeManager class methodsFor:'testing'! |
2371 |
||
2372 |
isCVS |
|
2373 |
^ false |
|
2374 |
||
2375 |
"Created: / 16-08-2006 / 10:58:27 / cg" |
|
2376 |
! |
|
2377 |
||
2378 |
isExperimental |
|
2379 |
^ false |
|
2380 |
||
2381 |
"Created: / 16-08-2006 / 11:22:47 / cg" |
|
2382 |
! |
|
2383 |
||
1889 | 2384 |
isSharedImage |
2385 |
^ false |
|
2386 |
||
2387 |
"Created: / 08-11-2006 / 18:54:57 / cg" |
|
2388 |
! |
|
2389 |
||
1527 | 2390 |
isStore |
2391 |
^ false |
|
2392 |
||
2393 |
"Created: / 16-08-2006 / 10:59:26 / cg" |
|
2394 |
! ! |
|
2395 |
||
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
2396 |
!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
|
2397 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2398 |
version |
1889 | 2399 |
^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.203 2006-11-08 18:52:02 cg Exp $' |
123
9a1dff152656
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
122
diff
changeset
|
2400 |
! ! |
1202 | 2401 |
|
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
2402 |
AbstractSourceCodeManager initialize! |