author | Claus Gittinger <cg@exept.de> |
Wed, 26 Sep 2012 18:16:18 +0200 | |
changeset 2916 | 259d582b2131 |
parent 2915 | f0e6c9528a5e |
child 2924 | abed88d9d99f |
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 |
2764
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
15 |
instanceVariableNames:'' |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
16 |
classVariableNames:'DefaultManager CachingSources CacheDirectoryName UseWorkTree |
2866 | 17 |
WorkTreeDirectoryName ManagerPerModule Verbose' |
2764
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
18 |
poolDictionaries:'' |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
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 |
|
2445 | 22 |
Object subclass:#PackageAndManager |
2764
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
23 |
instanceVariableNames:'package managerTypeName' |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
24 |
classVariableNames:'' |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
25 |
poolDictionaries:'' |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
26 |
privateIn:AbstractSourceCodeManager |
2445 | 27 |
! |
28 |
||
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
29 |
!AbstractSourceCodeManager class methodsFor:'documentation'! |
56
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
30 |
|
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
31 |
copyright |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
32 |
" |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
33 |
COPYRIGHT (c) 1995 by Claus Gittinger |
1863 | 34 |
All Rights Reserved |
56
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
35 |
|
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
36 |
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
|
37 |
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
|
38 |
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
|
39 |
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
|
40 |
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
|
41 |
hereby transferred. |
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
42 |
" |
71 | 43 |
! |
44 |
||
45 |
documentation |
|
46 |
" |
|
47 |
Abstract superclass for sourceCodeManagers. |
|
2400 | 48 |
|
71 | 49 |
Concrete subclasses provide access to a source repository. |
2400 | 50 |
Most protocol here traps into subclassResponsbility errors. |
71 | 51 |
Please read more documentation in concrete subclasses |
2400 | 52 |
(especially: CVSSourceCodeManager) for how to use this manager and |
53 |
what to redefine in another repository manager if required. |
|
236 | 54 |
|
55 |
[author:] |
|
56 |
Claus Gittinger |
|
71 | 57 |
" |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
58 |
! ! |
56
6705671acee8
source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
59 |
|
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
60 |
!AbstractSourceCodeManager class methodsFor:'initialization'! |
63 | 61 |
|
2647
69c582668ce8
added: #forgetDisabledModules
Claus Gittinger <cg@exept.de>
parents:
2638
diff
changeset
|
62 |
forgetDisabledModules |
69c582668ce8
added: #forgetDisabledModules
Claus Gittinger <cg@exept.de>
parents:
2638
diff
changeset
|
63 |
^ self |
69c582668ce8
added: #forgetDisabledModules
Claus Gittinger <cg@exept.de>
parents:
2638
diff
changeset
|
64 |
! |
69c582668ce8
added: #forgetDisabledModules
Claus Gittinger <cg@exept.de>
parents:
2638
diff
changeset
|
65 |
|
63 | 66 |
initCacheDirPath |
472 | 67 |
"initialize the name of the cacheDirectory. |
796 | 68 |
This is: |
2838 | 69 |
<tempDir>/stx_sourceCache (non-UNIX) |
70 |
~/.smalltalk/source-cache (UNIX, as <tempDir> is pruned upon each reboot) |
|
71 |
" |
|
72 |
"JV@2012-03-14: Changed to use .smalltalk/source-cache on UNIX machines" |
|
73 |
||
74 |
OperatingSystem isUNIXlike ifTrue:[ |
|
75 |
CacheDirectoryName := '~/.smalltalk/sourceCache'. |
|
76 |
^self |
|
77 |
]. |
|
2231 | 78 |
CacheDirectoryName := (Filename defaultTempDirectory constructString:'stx_sourceCache'). |
792
901f03b078db
fixed tempdir setup for win32
Claus Gittinger <cg@exept.de>
parents:
769
diff
changeset
|
79 |
|
2838 | 80 |
|
792
901f03b078db
fixed tempdir setup for win32
Claus Gittinger <cg@exept.de>
parents:
769
diff
changeset
|
81 |
" |
2838 | 82 |
self initCacheDirPath |
792
901f03b078db
fixed tempdir setup for win32
Claus Gittinger <cg@exept.de>
parents:
769
diff
changeset
|
83 |
" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
84 |
|
2838 | 85 |
"Modified: / 12-07-1999 / 10:01:31 / cg" |
86 |
"Modified (comment): / 19-07-2012 / 14:03:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
87 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
88 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
89 |
initialize |
472 | 90 |
"setup for no caching and no workTree" |
91 |
||
1930 | 92 |
CachingSources isNil ifTrue:[CachingSources := false]. |
93 |
UseWorkTree isNil ifTrue:[UseWorkTree := false]. |
|
2788 | 94 |
CacheDirectoryName isNil ifTrue:[ |
95 |
self initCacheDirPath. |
|
96 |
]. |
|
97 |
||
98 |
"Modified: / 02-03-2012 / 17:00:11 / cg" |
|
63 | 99 |
! ! |
100 |
||
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
101 |
!AbstractSourceCodeManager class methodsFor:'accessing'! |
112 | 102 |
|
1729 | 103 |
availableManagers |
104 |
^ AbstractSourceCodeManager allSubclasses |
|
105 |
reject:[:cls | (cls isAbstract) or:[cls isExperimental ]]. |
|
106 |
||
107 |
" |
|
108 |
self availableManagers |
|
109 |
" |
|
110 |
! |
|
111 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
112 |
cacheDirectoryName |
472 | 113 |
"return the name of the cache directory, where checked out class |
114 |
sources are kept for faster access. The default is '/tmp/stx_sourceCache'. |
|
115 |
This cache is shared among all ST/X users on a system." |
|
116 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
117 |
^ CacheDirectoryName |
472 | 118 |
|
119 |
"Modified: 12.9.1996 / 02:20:45 / cg" |
|
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
120 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
121 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
122 |
cacheDirectoryName:aStringOrFilename |
472 | 123 |
"set the name of the cache directory, where checked out class |
124 |
sources are kept for faster access. The default is '/tmp/stx_sourceCache'. |
|
125 |
This cache is shared among all ST/X users on a system. |
|
126 |
The directory is typically set via the launchers setting menu, or |
|
127 |
from a startup rc-file." |
|
128 |
||
2451 | 129 |
CacheDirectoryName := aStringOrFilename. |
130 |
||
131 |
"HACK, HACK, since ManagerPerModule is lazy-initialize before |
|
132 |
preferences are read, sigh. We need a better system..." |
|
133 |
||
134 |
ManagerPerModule := nil. |
|
135 |
||
136 |
"Created: / 16-12-1995 / 15:18:43 / cg" |
|
137 |
"Modified: / 12-09-1996 / 02:21:35 / cg" |
|
138 |
"Modified (comment): / 09-07-2011 / 16:02:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
139 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
140 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
141 |
cachingSources |
472 | 142 |
"return true, if source caching is enabled. |
143 |
(see cacheDirectoryName for what that means)" |
|
144 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
145 |
^ CachingSources |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
146 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
147 |
"Created: 16.12.1995 / 15:17:50 / cg" |
472 | 148 |
"Modified: 12.9.1996 / 02:22:19 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
149 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
150 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
151 |
cachingSources:aBoolean |
472 | 152 |
"enable/disable the caching of source files. |
153 |
(see cacheDirectoryName for what that means)" |
|
154 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
155 |
CachingSources := aBoolean |
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 |
"Created: 16.12.1995 / 15:18:13 / cg" |
472 | 158 |
"Modified: 12.9.1996 / 02:22:42 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
159 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
160 |
|
112 | 161 |
defaultManager |
472 | 162 |
"return the default sourceCodeManager class" |
163 |
||
112 | 164 |
^ DefaultManager |
165 |
||
166 |
"Created: 7.12.1995 / 17:14:22 / cg" |
|
472 | 167 |
"Modified: 12.9.1996 / 02:22:56 / cg" |
158
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 |
|
2743 | 170 |
enabledManagers |
171 |
"Return list of source code managers that are enabled" |
|
172 |
||
173 |
"If source code management is disabled, return #(). Following code |
|
174 |
is hack since there is no global boolean flag, sigh" |
|
175 |
^(Smalltalk at:#SourceCodeManager) isNil ifTrue:[ |
|
176 |
#() |
|
177 |
] ifFalse:[ |
|
178 |
self availableManagers select:[:manager|manager enabled]. |
|
179 |
] |
|
180 |
||
181 |
||
182 |
||
183 |
" |
|
184 |
self enabledManagers |
|
185 |
" |
|
186 |
||
187 |
"Created: / 23-01-2012 / 19:13:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
188 |
! |
|
189 |
||
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
190 |
managerForMatchingModule:aPackageIDMatchString put:aSourceCodeManagerClass |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
191 |
"update the per-module manager definitions, adding a manager class for a matchString" |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
192 |
|
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
193 |
ManagerPerModule isNil ifTrue:[ |
2446 | 194 |
ManagerPerModule := UserPreferences current managerPerMatchingModuleDefinitions. |
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
195 |
]. |
2445 | 196 |
ManagerPerModule do:[:each | |
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
197 |
|packageMatch| |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
198 |
|
2445 | 199 |
packageMatch := each pattern. |
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
200 |
(packageMatch = aPackageIDMatchString) ifTrue:[ |
2445 | 201 |
each manager:aSourceCodeManagerClass. |
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
202 |
^ self |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
203 |
]. |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
204 |
]. |
2445 | 205 |
ManagerPerModule add: |
206 |
(PackageAndManager |
|
207 |
package: aPackageIDMatchString |
|
208 |
manager: aSourceCodeManagerClass) |
|
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
209 |
|
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
210 |
" |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
211 |
self managerForModule:'stx:libbasic2' put:SVNSourceCodeManager |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
212 |
self managerForModule:'stx:libbasic2' put:CVSSourceCodeManager |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
213 |
self managerForModule:'stx:libbasic2' |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
214 |
self managerForModule:'exept:expecco' |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
215 |
" |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
216 |
|
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
217 |
"Created: / 18-04-2011 / 19:48:19 / cg" |
2446 | 218 |
"Modified: / 09-07-2011 / 15:05:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
219 |
! |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
220 |
|
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
221 |
managerForModule:aPackageID |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
222 |
"return the sourceCodeManager for a aPackageID, nil if unspecified in the manager per package list" |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
223 |
|
2557 | 224 |
<resource: #obsolete> |
225 |
||
226 |
"Bad/misleading naming here, better use managerForPackage:" |
|
227 |
||
228 |
self managerPerMatchingModuleDefinitions do:[:each | |
|
229 |
(each match:aPackageID) ifTrue:[^ each manager]. |
|
230 |
]. |
|
2603 | 231 |
^ DefaultManager |
2557 | 232 |
|
233 |
" |
|
234 |
self managerForModule:'stx:libbasic' |
|
235 |
self managerForModule:'stx:libbasic2' |
|
236 |
self managerForModule:'exept:expecco' |
|
237 |
" |
|
238 |
||
239 |
"Created: / 18-04-2011 / 19:39:19 / cg" |
|
240 |
"Modified (comment): / 10-10-2011 / 14:51:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2603 | 241 |
"Modified: / 19-10-2011 / 16:45:50 / cg" |
2557 | 242 |
! |
243 |
||
244 |
managerForPackage:aPackageID |
|
245 |
"return the sourceCodeManager for a aPackageID, nil if unspecified in the manager per package list" |
|
246 |
||
2743 | 247 |
"JV@2012-01-23: If source code management is disabled, return nil. Following code |
248 |
is hack since there is no global boolean flag, sigh" |
|
249 |
(Smalltalk at:#SourceCodeManager) isNil ifTrue:[ ^nil ]. |
|
250 |
||
251 |
"JV@2012-01-23: HACK: Q: Shouldn't it filter configured manager through |
|
252 |
'enabled' managers?" |
|
2446 | 253 |
self managerPerMatchingModuleDefinitions do:[:each | |
254 |
(each match:aPackageID) ifTrue:[^ each manager]. |
|
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
255 |
]. |
2603 | 256 |
^ DefaultManager |
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
257 |
|
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
258 |
" |
2445 | 259 |
self managerForModule:'stx:libbasic' |
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
260 |
self managerForModule:'stx:libbasic2' |
2445 | 261 |
self managerForModule:'exept:expecco' |
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
262 |
" |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
263 |
|
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
264 |
"Created: / 18-04-2011 / 19:39:19 / cg" |
2557 | 265 |
"Created: / 10-10-2011 / 14:50:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2603 | 266 |
"Modified: / 19-10-2011 / 16:45:38 / cg" |
2743 | 267 |
"Modified (comment): / 23-01-2012 / 19:46:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
268 |
! |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
269 |
|
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
270 |
managerPerMatchingModuleDefinitions |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
271 |
"return the sourceCodeManager definitions" |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
272 |
|
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
273 |
ManagerPerModule isNil ifTrue:[ |
2445 | 274 |
ManagerPerModule := UserPreferences current managerPerMatchingModuleDefinitions |
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
275 |
]. |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
276 |
^ ManagerPerModule |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
277 |
|
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
278 |
"Created: / 18-04-2011 / 20:09:16 / cg" |
2445 | 279 |
"Modified: / 09-07-2011 / 13:36:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
280 |
! |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
281 |
|
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
282 |
managerPerMatchingModuleDefinitions:aCollection |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
283 |
"set the sourceCodeManager definitions; must be an orderedCollection of packageMatchString -> manager |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
284 |
associations |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
285 |
(not a dictionary, because order is relevant in the matching process, where the first match counts)" |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
286 |
|
2445 | 287 |
ManagerPerModule := aCollection. |
288 |
UserPreferences current managerPerMatchingModuleDefinitions:aCollection |
|
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
289 |
|
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
290 |
"Created: / 18-04-2011 / 20:09:21 / cg" |
2445 | 291 |
"Modified: / 09-07-2011 / 13:36:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
292 |
! |
|
293 |
||
294 |
named: managerTypeName |
|
295 |
||
296 |
^self availableManagers |
|
297 |
detect:[:each|each managerTypeName = managerTypeName] |
|
298 |
ifNone:[nil] |
|
299 |
||
300 |
" |
|
301 |
AbstractSourceCodeManager named: 'CVS' |
|
302 |
AbstractSourceCodeManager named: 'Perforce' |
|
303 |
" |
|
304 |
||
305 |
"Created: / 09-07-2011 / 13:51:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
306 |
! |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
307 |
|
1893 | 308 |
repositoryInfoPerModule |
2145 | 309 |
"return the dictionary, which associates CVSRoots to module names. |
310 |
If no entry is contained in this dictionary for some module, |
|
311 |
the default cvsRoot (CVSRoot) will be used." |
|
312 |
||
313 |
^ #() |
|
1893 | 314 |
|
315 |
"Created: / 09-11-2006 / 15:25:17 / cg" |
|
316 |
! |
|
317 |
||
2199 | 318 |
repositoryInfoPerModule:info |
319 |
"/ ignore here |
|
320 |
! |
|
321 |
||
482
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
322 |
repositoryName |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
323 |
"return the name of the repository. |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
324 |
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
|
325 |
|
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
326 |
^ nil |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
327 |
|
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
328 |
"Modified: 12.9.1996 / 02:20:45 / cg" |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
329 |
"Created: 14.9.1996 / 13:21:37 / cg" |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
330 |
! |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
472
diff
changeset
|
331 |
|
2592 | 332 |
repositoryNameForPackage:packageId |
2668 | 333 |
"Return the repository ULR for the given package. |
334 |
Used for testing/debugging source code management configuration" |
|
2592 | 335 |
|
336 |
^ self subclassResponsibility |
|
2565 | 337 |
|
338 |
"Created: / 10-10-2011 / 19:44:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2668 | 339 |
"Modified (comment): / 21-12-2011 / 23:03:00 / cg" |
2565 | 340 |
! |
341 |
||
2700 | 342 |
shownInBrowserMenus |
343 |
"can be redefined in subclasses which can be suppressed in the browser's menus" |
|
344 |
||
2728
362068fc2707
added: #shownInBrowserMenus:
Claus Gittinger <cg@exept.de>
parents:
2725
diff
changeset
|
345 |
^ UserPreferences current at:(self nameWithoutPrefix,'.enabled') ifAbsent:false. |
362068fc2707
added: #shownInBrowserMenus:
Claus Gittinger <cg@exept.de>
parents:
2725
diff
changeset
|
346 |
|
2700 | 347 |
"Created: / 08-01-2012 / 19:56:22 / cg" |
348 |
! |
|
349 |
||
2728
362068fc2707
added: #shownInBrowserMenus:
Claus Gittinger <cg@exept.de>
parents:
2725
diff
changeset
|
350 |
shownInBrowserMenus:aBoolean |
362068fc2707
added: #shownInBrowserMenus:
Claus Gittinger <cg@exept.de>
parents:
2725
diff
changeset
|
351 |
"can be redefined in subclasses which can be suppressed in the browser's menus" |
362068fc2707
added: #shownInBrowserMenus:
Claus Gittinger <cg@exept.de>
parents:
2725
diff
changeset
|
352 |
|
362068fc2707
added: #shownInBrowserMenus:
Claus Gittinger <cg@exept.de>
parents:
2725
diff
changeset
|
353 |
^ UserPreferences current at:(self nameWithoutPrefix,'.enabled') put:aBoolean. |
362068fc2707
added: #shownInBrowserMenus:
Claus Gittinger <cg@exept.de>
parents:
2725
diff
changeset
|
354 |
|
362068fc2707
added: #shownInBrowserMenus:
Claus Gittinger <cg@exept.de>
parents:
2725
diff
changeset
|
355 |
"Created: / 15-01-2012 / 14:09:21 / cg" |
362068fc2707
added: #shownInBrowserMenus:
Claus Gittinger <cg@exept.de>
parents:
2725
diff
changeset
|
356 |
! |
362068fc2707
added: #shownInBrowserMenus:
Claus Gittinger <cg@exept.de>
parents:
2725
diff
changeset
|
357 |
|
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
358 |
useWorkTree |
472 | 359 |
"return the setting of useWorkTree, which (eventually) |
360 |
controls if an up-to-date view of a CVS working tree should be |
|
361 |
kept in sync. This is not yet implemented." |
|
362 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
363 |
^ UseWorkTree |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
364 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
365 |
"Created: 16.12.1995 / 15:36:48 / cg" |
472 | 366 |
"Modified: 12.9.1996 / 02:24:01 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
367 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
368 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
369 |
useWorkTree:aBoolean |
472 | 370 |
"enable/disable the useWorkTree feature, which (eventually) |
371 |
controls if an up-to-date view of a CVS working tree should be |
|
372 |
kept in sync. This is not yet implemented." |
|
373 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
374 |
UseWorkTree := aBoolean |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
375 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
376 |
"Created: 16.12.1995 / 15:37:29 / cg" |
472 | 377 |
"Modified: 12.9.1996 / 02:24:38 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
378 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
379 |
|
2557 | 380 |
utilities |
381 |
"Returns 'utilities' object that can be used by tools. |
|
382 |
||
383 |
By default, it returns an instance of |
|
384 |
SourceCodeManagerUtilities with receiver as its |
|
385 |
manager, but individual managers may override this |
|
386 |
method and supply its own, customized utilities." |
|
387 |
||
2851
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
388 |
^ (self isContainerBased |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
389 |
ifTrue: [ SourceCodeManagerUtilitiesForContainerBasedManagers ] |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
390 |
ifFalse: [ SourceCodeManagerUtilitiesForWorkspaceBasedManagers ] |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
391 |
) forManager: self |
2557 | 392 |
|
393 |
"Created: / 10-10-2011 / 15:10:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2851
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
394 |
"Modified (format): / 25-07-2012 / 17:08:05 / cg" |
2557 | 395 |
! |
396 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
397 |
workTreeDirectoryName |
472 | 398 |
"return the name of the workTree, which is kept in sync |
399 |
with the current class versions. This is not yet implemented" |
|
400 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
401 |
^ WorkTreeDirectoryName |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
402 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
403 |
"Created: 16.12.1995 / 15:35:21 / cg" |
472 | 404 |
"Modified: 12.9.1996 / 02:25:13 / cg" |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
405 |
! |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
406 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
407 |
workTreeDirectoryName:aStringOrFilename |
472 | 408 |
"set the name of the workTree, which is kept in sync |
409 |
with the current class versions. This is not yet implemented" |
|
410 |
||
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
411 |
WorkTreeDirectoryName := aStringOrFilename |
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
412 |
|
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
413 |
"Created: 16.12.1995 / 15:35:34 / cg" |
472 | 414 |
"Modified: 12.9.1996 / 02:25:19 / cg" |
112 | 415 |
! ! |
416 |
||
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
417 |
!AbstractSourceCodeManager class methodsFor:'basic access'! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
418 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
419 |
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
|
420 |
"checkin of a class into the source repository. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
421 |
Return true if ok, false if not." |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
422 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
423 |
^ self subclassResponsibility. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
424 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
425 |
"Created: 14.2.1997 / 21:17:33 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
426 |
"Modified: 14.2.1997 / 21:18:48 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
427 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
428 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
429 |
checkoutModule:aModule directory:aPackage andDo:aBlock |
759 | 430 |
"check out everything from a package into a temporary directory. |
431 |
Then evaluate aBlock, passing the name of that temp-directory. |
|
432 |
Afterwards, the tempDir is removed. |
|
433 |
Return true, if OK, false if any error occurred." |
|
434 |
||
435 |
^ self subclassResponsibility |
|
436 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
437 |
"Created: / 23-08-2006 / 14:07:08 / cg" |
759 | 438 |
! |
439 |
||
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
440 |
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
|
441 |
"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
|
442 |
A revision of nil selects the current (in image) revision. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
443 |
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
|
444 |
which itself is extracted from the classes packageString." |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
445 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
446 |
^ self subclassResponsibility |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
447 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
448 |
"Modified: 14.2.1997 / 21:18:35 / cg" |
2202 | 449 |
! |
450 |
||
451 |
streamForExtensionFile:fileName package:package directory:dir module:mod cache:doCache |
|
452 |
|defClass extensionsRevisionString extensionsRevisionInfo rev| |
|
453 |
||
454 |
defClass := ProjectDefinition definitionClassForPackage:package. |
|
455 |
extensionsRevisionString := defClass perform:(self nameOfVersionMethodForExtensions) ifNotUnderstood:nil. |
|
456 |
extensionsRevisionString isNil ifTrue:[ |
|
457 |
Transcript showCR:'warning: no valid version info for extensions of "',package,'"'. |
|
458 |
^ self streamForClass:nil fileName:fileName revision:nil directory:dir module:mod cache:false. |
|
459 |
]. |
|
460 |
||
2399
2b84464f1d41
changed: #streamForExtensionFile:package:directory:module:cache:
Claus Gittinger <cg@exept.de>
parents:
2380
diff
changeset
|
461 |
extensionsRevisionInfo := self revisionInfoFromString:extensionsRevisionString inClass:nil. |
2b84464f1d41
changed: #streamForExtensionFile:package:directory:module:cache:
Claus Gittinger <cg@exept.de>
parents:
2380
diff
changeset
|
462 |
extensionsRevisionInfo isNil ifTrue:[ |
2b84464f1d41
changed: #streamForExtensionFile:package:directory:module:cache:
Claus Gittinger <cg@exept.de>
parents:
2380
diff
changeset
|
463 |
self halt:'oops - possibly corrupted extensions version string'. |
2b84464f1d41
changed: #streamForExtensionFile:package:directory:module:cache:
Claus Gittinger <cg@exept.de>
parents:
2380
diff
changeset
|
464 |
"/ check for umlaut-remover/adder bug from felix in extensionsRevisionString !!!!!!!! |
2b84464f1d41
changed: #streamForExtensionFile:package:directory:module:cache:
Claus Gittinger <cg@exept.de>
parents:
2380
diff
changeset
|
465 |
^ self streamForClass:nil fileName:fileName revision:nil directory:dir module:mod cache:false. |
2b84464f1d41
changed: #streamForExtensionFile:package:directory:module:cache:
Claus Gittinger <cg@exept.de>
parents:
2380
diff
changeset
|
466 |
]. |
2202 | 467 |
|
468 |
self assert:(fileName = 'extensions.st'). |
|
469 |
self assert:(fileName = extensionsRevisionInfo fileName). |
|
470 |
||
471 |
rev := extensionsRevisionInfo revision. |
|
472 |
^ self streamForClass:nil fileName:fileName revision:rev directory:dir module:mod cache:doCache. |
|
2399
2b84464f1d41
changed: #streamForExtensionFile:package:directory:module:cache:
Claus Gittinger <cg@exept.de>
parents:
2380
diff
changeset
|
473 |
|
2b84464f1d41
changed: #streamForExtensionFile:package:directory:module:cache:
Claus Gittinger <cg@exept.de>
parents:
2380
diff
changeset
|
474 |
"Modified: / 01-07-2011 / 13:52:38 / cg" |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
475 |
! ! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
476 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
477 |
!AbstractSourceCodeManager class methodsFor:'basic administration'! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
478 |
|
1786 | 479 |
checkForExistingContainer:fileName inModule:moduleName directory:dirName |
480 |
"check for a container to be present" |
|
481 |
||
482 |
^ self subclassResponsibility. |
|
483 |
||
484 |
"Created: / 13-09-2006 / 18:22:24 / cg" |
|
485 |
! |
|
486 |
||
1785 | 487 |
checkForExistingContainer:fileName inPackage:aPackage |
488 |
"check if a source-code container is present in a packages directory." |
|
489 |
||
490 |
|packageDir moduleDir| |
|
491 |
||
492 |
packageDir := aPackage asPackageId directory. |
|
493 |
moduleDir := aPackage asPackageId module. |
|
494 |
||
495 |
^ self |
|
1786 | 496 |
checkForExistingContainer:fileName |
497 |
inModule:moduleDir |
|
498 |
directory:packageDir |
|
1785 | 499 |
|
500 |
"Created: / 13-09-2006 / 18:10:30 / cg" |
|
501 |
! |
|
502 |
||
674
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
503 |
checkForExistingContainerForClass:aClass |
1013 | 504 |
"check if a source-code container for a given class is present in the repository." |
505 |
||
674
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
506 |
|sourceInfo packageDir moduleDir classFileName| |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
507 |
|
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
508 |
sourceInfo := self sourceInfoOfClass:aClass. |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
509 |
sourceInfo isNil ifTrue:[ |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
510 |
('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
|
511 |
^ false |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
512 |
]. |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
513 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
514 |
packageDir := self directoryFromSourceInfo:sourceInfo. |
674
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
515 |
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
|
516 |
classFileName := self containerFromSourceInfo:sourceInfo. |
5d660e2bae10
added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
517 |
|
1786 | 518 |
^ self |
519 |
checkForExistingContainer:classFileName |
|
520 |
inModule:moduleDir |
|
521 |
directory:packageDir |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
522 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
523 |
"Created: / 13-05-1998 / 22:35:50 / cg" |
1786 | 524 |
"Modified: / 13-09-2006 / 18:23:20 / cg" |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
525 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
526 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
527 |
checkForExistingModule:moduleName |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
528 |
"check for a module directory to be present" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
529 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
530 |
^ self subclassResponsibility. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
531 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
532 |
"Created: 9.12.1995 / 19:02:23 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
533 |
"Modified: 14.2.1997 / 21:19:01 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
534 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
535 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
536 |
checkForExistingModule:moduleDir directory:packageDir |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
537 |
"check for a package directory to be present" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
538 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
539 |
^ self subclassResponsibility. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
540 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
541 |
"Created: / 23-08-2006 / 14:03:06 / cg" |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
542 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
543 |
|
966 | 544 |
createContainerFor:aClass inModule:moduleName directory:dirName container:fileName |
545 |
"create a new container & check into it an initial version of aClass" |
|
546 |
||
547 |
^ self subclassResponsibility. |
|
548 |
||
549 |
"Created: 9.12.1995 / 19:02:47 / cg" |
|
550 |
"Modified: 14.2.1997 / 21:19:11 / cg" |
|
551 |
! |
|
552 |
||
2842
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
553 |
createContainerFor:cls inModule:moduleName package:packageDir container:classFileName |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
554 |
"create a new container & check into it an initial version of aClass" |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
555 |
|
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
556 |
^ self checkinClass:cls fileName:classFileName directory:packageDir module:moduleName logMessage:'Initial check in' force:false. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
557 |
|
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
558 |
"Created: / 23-07-2012 / 19:14:34 / cg" |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
559 |
! |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
560 |
|
966 | 561 |
createModule:moduleName |
562 |
"create a new module directory" |
|
563 |
||
564 |
^ self subclassResponsibility. |
|
565 |
||
566 |
"Created: 9.12.1995 / 19:02:23 / cg" |
|
567 |
"Modified: 14.2.1997 / 21:19:16 / cg" |
|
568 |
! |
|
569 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
570 |
createModule:module directory:directory |
966 | 571 |
"create a new package directory" |
572 |
||
573 |
^ self subclassResponsibility. |
|
574 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
575 |
"Created: / 23-08-2006 / 14:04:41 / cg" |
966 | 576 |
! |
577 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
578 |
initialRevisionStringFor:aClass inModule:moduleDir directory:packageDir container:fileName |
966 | 579 |
"return a string usable as initial revision string" |
580 |
||
581 |
^ self subclassResponsibility |
|
582 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
583 |
"Created: / 23-08-2006 / 14:05:42 / cg" |
966 | 584 |
! |
585 |
||
2052
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
586 |
revisionLogOf:clsOrNil fromRevision:firstRev toRevision:lastRef fileName:classFileName directory:packageDir module:moduleDir |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
587 |
^ self |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
588 |
revisionLogOf:clsOrNil |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
589 |
fromRevision:firstRev |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
590 |
toRevision:lastRef |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
591 |
numberOfRevisions:nil |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
592 |
fileName:classFileName |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
593 |
directory:packageDir |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
594 |
module:moduleDir |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
595 |
! |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
596 |
|
2210
42dd6c92f827
comment/format in: #revisionLogOf:fromRevision:toRevision:numberOfRevisions:fileName:directory:module:
Claus Gittinger <cg@exept.de>
parents:
2208
diff
changeset
|
597 |
revisionLogOf:clsOrNil fromRevision:rev1OrNil toRevision:rev2OrNil numberOfRevisions:limitOrNil fileName:classFileName directory:packageDir module:moduleDir |
966 | 598 |
"actually do return a revisionLog. The main worker method. |
599 |
This must be implemented by a concrete source-code manager" |
|
600 |
||
601 |
^ self subclassResponsibility. |
|
602 |
||
603 |
"Created: 15.11.1995 / 18:12:51 / cg" |
|
604 |
"Modified: 14.2.1997 / 21:14:01 / cg" |
|
605 |
! ! |
|
606 |
||
607 |
!AbstractSourceCodeManager class methodsFor:'cache administration'! |
|
608 |
||
961
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
609 |
condenseSourceCache |
966 | 610 |
"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
|
611 |
|
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
612 |
|extractBaseAndVersion versionIsGreater vsnNumberString baseName| |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
613 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
614 |
CacheDirectoryName isNil ifTrue:[^ self]. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
615 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
616 |
extractBaseAndVersion := |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
617 |
[:filenameString | |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
618 |
|i| |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
619 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
620 |
i := filenameString size. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
621 |
[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
|
622 |
vsnNumberString := filenameString copyFrom:i + 1. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
623 |
(filenameString at:i) == $_ ifTrue:[i := i - 1]. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
624 |
baseName := filenameString copyTo:i. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
625 |
]. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
626 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
627 |
versionIsGreater := |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
628 |
[:vA :vB | |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
629 |
|seqA seqB sequenceIsGreater| |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
630 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
631 |
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
|
632 |
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
|
633 |
sequenceIsGreater := |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
634 |
[:seqA :seqB :index | |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
635 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
636 |
|elA elB| |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
637 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
638 |
elA := seqA at:index. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
639 |
elB := seqB at:index. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
640 |
elA > elB ifTrue:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
641 |
true |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
642 |
] ifFalse:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
643 |
elA < elB ifTrue:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
644 |
false |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
645 |
] ifFalse:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
646 |
sequenceIsGreater value:seqA value:seqB value:index+1. |
961
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
647 |
]. |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
648 |
]. |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
649 |
]. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
650 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
651 |
sequenceIsGreater value:seqA value:seqB value:1. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
652 |
]. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
653 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
654 |
CacheDirectoryName asFilename withAllDirectoriesDo:[:d | |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
655 |
|allFiles newestVersions| |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
656 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
657 |
newestVersions := Dictionary new. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
658 |
allFiles := d files. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
659 |
allFiles do:[:eachFilename | |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
660 |
|prevVsnString| |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
661 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
662 |
extractBaseAndVersion value:eachFilename baseName. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
663 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
664 |
vsnNumberString notEmpty ifTrue:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
665 |
prevVsnString := newestVersions at:baseName ifAbsent:nil. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
666 |
prevVsnString isNil ifTrue:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
667 |
newestVersions at:baseName put:vsnNumberString. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
668 |
] ifFalse:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
669 |
(versionIsGreater value:vsnNumberString value:prevVsnString) ifTrue:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
670 |
newestVersions at:baseName put:vsnNumberString |
961
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
671 |
] |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
672 |
]. |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
673 |
]. |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
674 |
]. |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
675 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
676 |
allFiles do:[:eachFilename | |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
677 |
extractBaseAndVersion value:eachFilename baseName. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
678 |
(vsnNumberString isEmpty |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
679 |
or:[(vsnNumberString ~= (newestVersions at:baseName))]) ifTrue:[ |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
680 |
eachFilename remove |
961
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
681 |
] |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
682 |
]. |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
683 |
] |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
684 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
685 |
" |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
686 |
self condenseSourceCache |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
687 |
" |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
688 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
689 |
"Modified: / 29-08-2006 / 11:25:25 / cg" |
961
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
690 |
! |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
691 |
|
966 | 692 |
flushSourceCache |
693 |
"remove all cached versions" |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
694 |
|
961
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
695 |
|d| |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
696 |
|
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
697 |
CacheDirectoryName notNil ifTrue:[ |
1a99e0289a95
added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents:
953
diff
changeset
|
698 |
d := CacheDirectoryName asFilename. |
1860
c092daa2828f
#flushSourceCache tolerates non-existing source cache directory
Stefan Vogel <sv@exept.de>
parents:
1857
diff
changeset
|
699 |
d isDirectory ifTrue:[ |
c092daa2828f
#flushSourceCache tolerates non-existing source cache directory
Stefan Vogel <sv@exept.de>
parents:
1857
diff
changeset
|
700 |
d directoryContentsAsFilenames do:[:eachFile | |
c092daa2828f
#flushSourceCache tolerates non-existing source cache directory
Stefan Vogel <sv@exept.de>
parents:
1857
diff
changeset
|
701 |
eachFile recursiveRemove |
c092daa2828f
#flushSourceCache tolerates non-existing source cache directory
Stefan Vogel <sv@exept.de>
parents:
1857
diff
changeset
|
702 |
] |
c092daa2828f
#flushSourceCache tolerates non-existing source cache directory
Stefan Vogel <sv@exept.de>
parents:
1857
diff
changeset
|
703 |
]. |
2550 | 704 |
]. |
705 |
Method flushSourceStreamCache. |
|
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
706 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
707 |
" |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
708 |
self flushSourceCache |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
709 |
" |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
710 |
|
2550 | 711 |
"Modified: / 30-09-2011 / 13:33:33 / cg" |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
712 |
! ! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
713 |
|
2866 | 714 |
!AbstractSourceCodeManager class methodsFor:'debugging'! |
715 |
||
716 |
verboseSourceCodeAccess |
|
717 |
^ Verbose ? false |
|
718 |
! |
|
719 |
||
720 |
verboseSourceCodeAccess:aBoolean |
|
721 |
Verbose := aBoolean |
|
722 |
! ! |
|
723 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
724 |
!AbstractSourceCodeManager class methodsFor:'obsolete backward compatibility'! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
725 |
|
1786 | 726 |
checkForExistingContainerInModule:moduleDir directory:packageDir container:fileName |
2082 | 727 |
<resource: #obsolete> |
1786 | 728 |
"check for a container to exist" |
729 |
||
730 |
self obsoleteMethodWarning. |
|
731 |
^ self checkForExistingContainer:fileName inModule:moduleDir directory:packageDir |
|
732 |
||
733 |
"Modified: / 13-09-2006 / 18:23:45 / cg" |
|
734 |
! |
|
735 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
736 |
checkForExistingContainerInModule:moduleName package:dirName container:fileName |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
737 |
"check for a container to be present" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
738 |
|
1881 | 739 |
<resource: #obsolete> |
740 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
741 |
self obsoleteMethodWarning. |
1786 | 742 |
^ self |
743 |
checkForExistingContainer:fileName |
|
744 |
inModule:moduleName |
|
745 |
directory:dirName |
|
746 |
||
747 |
"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
|
748 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
749 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
750 |
checkForExistingModule:moduleDir package:packageDir |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
751 |
"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
|
752 |
|
1881 | 753 |
<resource: #obsolete> |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
754 |
self obsoleteMethodWarning. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
755 |
^ self checkForExistingModule:moduleDir directory:packageDir. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
756 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
757 |
"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
|
758 |
"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
|
759 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
760 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
761 |
checkoutModule:aModule package:aPackage andDo:aBlock |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
762 |
"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
|
763 |
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
|
764 |
Afterwards, the tempDir is removed. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
765 |
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
|
766 |
|
1881 | 767 |
<resource: #obsolete> |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
768 |
self obsoleteMethodWarning. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
769 |
^ self checkoutModule:aModule directory:aPackage andDo:aBlock |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
770 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
771 |
"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
|
772 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
773 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
774 |
createModule:module package:package |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
775 |
"create a new package directory" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
776 |
|
1881 | 777 |
<resource: #obsolete> |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
778 |
self obsoleteMethodWarning. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
779 |
^ self createModule:module directory:package. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
780 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
781 |
"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
|
782 |
"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
|
783 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
784 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
785 |
getExistingContainersInModule:aModule package:aPackage |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
786 |
"{ Pragma: +optSpace }" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
787 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
788 |
"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
|
789 |
|
1881 | 790 |
<resource: #obsolete> |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
791 |
self obsoleteMethodWarning. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
792 |
^ self getExistingContainersInModule:aModule directory:aPackage |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
793 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
794 |
"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
|
795 |
"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
|
796 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
797 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
798 |
getExistingPackagesInModule:aModule |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
799 |
"{ Pragma: +optSpace }" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
800 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
801 |
"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
|
802 |
|
1881 | 803 |
<resource: #obsolete> |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
804 |
self obsoleteMethodWarning. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
805 |
^ self getExistingDirectoriesInModule:aModule |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
806 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
807 |
"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
|
808 |
"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
|
809 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
810 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
811 |
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
|
812 |
"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
|
813 |
|
1881 | 814 |
<resource: #obsolete> |
2649 | 815 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
816 |
self obsoleteMethodWarning. |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
817 |
^ 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
|
818 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
819 |
"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
|
820 |
"Modified: / 23-08-2006 / 14:06:18 / cg" |
2649 | 821 |
"Modified (format): / 21-12-2011 / 18:58:53 / cg" |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
822 |
! ! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
823 |
|
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
824 |
!AbstractSourceCodeManager class methodsFor:'private'! |
71 | 825 |
|
813 | 826 |
checkMethodPackagesOf:aClass |
827 |
"check if aClass contains methods from another package; |
|
828 |
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
|
829 |
Raises abortSignal if checkIn is to be suppressed. |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
830 |
returns: |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
831 |
#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
|
832 |
#all - check in all |
813 | 833 |
|
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
834 |
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
|
835 |
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
|
836 |
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
|
837 |
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
|
838 |
" |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
839 |
|
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
840 |
|checkInClassPackageOnly clsPackage otherPackages otherPackageNames methodsFromOtherPackages |
1066
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
841 |
methodCategoriesInOtherPackages methodCategoryInOtherPackages |
1520 | 842 |
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
|
843 |
unassignedMethods methodCategoriesWithUnassignedMethods methodCategoryWithUnassignedMethods |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
844 |
args| |
813 | 845 |
|
846 |
checkInClassPackageOnly := false. |
|
847 |
||
848 |
clsPackage := aClass package. |
|
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
849 |
|
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
850 |
otherPackages := Set new. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
851 |
methodsFromOtherPackages := OrderedCollection new. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
852 |
hasUnassignedExtensions := false. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
853 |
unassignedMethods := OrderedCollection new. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
854 |
methodCategoriesWithUnassignedMethods := Set new. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
855 |
methodCategoriesInOtherPackages := Set new. |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
856 |
|
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
857 |
aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
815 | 858 |
|mthdPackage| |
859 |
||
860 |
(mthdPackage := mthd package) ~= clsPackage ifTrue:[ |
|
2240
a9c2f87fbd98
changed: #checkMethodPackagesOf:
Claus Gittinger <cg@exept.de>
parents:
2238
diff
changeset
|
861 |
mthdPackage = PackageId noProjectID ifTrue:[ |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
862 |
hasUnassignedExtensions := true. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
863 |
unassignedMethods add:mthd. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
864 |
methodCategoriesWithUnassignedMethods add:(mthd category). |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
865 |
] ifFalse:[ |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
866 |
methodsFromOtherPackages add:mthd. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
867 |
otherPackages add:mthdPackage. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
868 |
methodCategoriesInOtherPackages add:(mthd category). |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
869 |
]. |
815 | 870 |
] |
871 |
]. |
|
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
872 |
|
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
873 |
hasUnassignedExtensions ifFalse:[ |
1027
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
874 |
aClass allPrivateClassesDo:[:eachPrivateClass | |
1028 | 875 |
aClass setPackage:clsPackage. |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
876 |
eachPrivateClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
1027
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
877 |
mthd setPackage:clsPackage |
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
878 |
] |
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
879 |
]. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
880 |
^ #base |
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
881 |
]. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
882 |
|
1029 | 883 |
otherPackages := otherPackages asOrderedCollection sort. |
2043 | 884 |
otherPackageNames := |
885 |
String streamContents:[:stream| |
|
886 |
otherPackages |
|
887 |
do:[:eachPackageName| eachPackageName printOn:stream] |
|
888 |
separatedBy:[stream nextPutAll:', ']. |
|
889 |
]. |
|
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
890 |
|
1066
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
891 |
methodCategoriesInOtherPackages size == 1 ifTrue:[ |
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
892 |
methodCategoryInOtherPackages := methodCategoriesInOtherPackages anElement. |
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
893 |
]. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
894 |
methodCategoriesWithUnassignedMethods size == 1 ifTrue:[ |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
895 |
methodCategoryWithUnassignedMethods := methodCategoriesWithUnassignedMethods anElement. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
896 |
]. |
1066
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
897 |
|
1021 | 898 |
isDefaultAnswer := false. |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
899 |
(SourceCodeManagerUtilities yesToAllNotification notNil |
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
900 |
and:[SourceCodeManagerUtilities yesToAllNotification isHandled]) ifTrue:[ |
1021 | 901 |
answer := isDefaultAnswer := true. |
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
902 |
] ifFalse:[ |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
903 |
methodCategoriesWithUnassignedMethods size == 1 ifTrue:[ |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
904 |
unassignedMethods size == 1 ifTrue:[ |
1520 | 905 |
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
|
906 |
] ifFalse:[ |
1520 | 907 |
msg := 'The class ''%1'' contains %3 unassigned (loose) method(s)'. |
2468 | 908 |
]. |
909 |
msg := msg , '\(In the ''%4'' category).'. |
|
1016 | 910 |
] ifFalse:[ |
1520 | 911 |
msg := 'The class ''%1'' contains %3 unassigned (loose) methods in %5 categories.'. |
1016 | 912 |
]. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
913 |
unassignedMethods size == 1 ifTrue:[ |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
914 |
msg := msg , '\\Move this method to the ''%2'' package ?'. |
1550 | 915 |
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
|
916 |
] ifFalse:[ |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
917 |
msg := msg , '\\Move those to the ''%2'' package ?'. |
1550 | 918 |
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
|
919 |
]. |
1550 | 920 |
|
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
921 |
args := Array |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
922 |
with:aClass name allBold |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
923 |
with:clsPackage allBold |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
924 |
with:unassignedMethods size |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
925 |
with:methodCategoryWithUnassignedMethods |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
926 |
with:methodCategoriesWithUnassignedMethods size |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
927 |
with:unassignedMethods first selector allBold. |
1016 | 928 |
|
1036 | 929 |
SourceCodeManagerUtilities yesToAllNotification isHandled |
930 |
ifTrue:[ |
|
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
931 |
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
|
932 |
actions := #(#cancel false #browse #yesToAll true). |
1036 | 933 |
] ifFalse:[ |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
934 |
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
|
935 |
actions := #(#cancel false #browse true). |
1036 | 936 |
]. |
937 |
||
1016 | 938 |
answer := OptionBox |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
939 |
request:(SystemBrowser classResources |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
940 |
stringWithCRs:msg |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
941 |
withArgs:args) |
1016 | 942 |
label:'Change packageID ?' |
1392
4469708537e8
dont send obsolete message to OptionBox
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
943 |
image:(InfoBox iconBitmap) |
1218 | 944 |
buttonLabels:(Dialog resources array:labels) |
1036 | 945 |
values:actions |
1520 | 946 |
default:true. |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
947 |
|
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
948 |
answer == #browse ifTrue:[ |
1112
c395948357d3
care for userPref-browser-setting (in browse-action)
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
949 |
UserPreferences current systemBrowserClass |
2240
a9c2f87fbd98
changed: #checkMethodPackagesOf:
Claus Gittinger <cg@exept.de>
parents:
2238
diff
changeset
|
950 |
browseMethods:unassignedMethods |
a9c2f87fbd98
changed: #checkMethodPackagesOf:
Claus Gittinger <cg@exept.de>
parents:
2238
diff
changeset
|
951 |
title:('Unassigned (loose) Methods in %1' bindWith:aClass name) |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
952 |
sort:true. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
953 |
answer := #cancel. |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
954 |
]. |
2240
a9c2f87fbd98
changed: #checkMethodPackagesOf:
Claus Gittinger <cg@exept.de>
parents:
2238
diff
changeset
|
955 |
"/ answer == #browseExtensions ifTrue:[ |
a9c2f87fbd98
changed: #checkMethodPackagesOf:
Claus Gittinger <cg@exept.de>
parents:
2238
diff
changeset
|
956 |
"/ UserPreferences current systemBrowserClass |
a9c2f87fbd98
changed: #checkMethodPackagesOf:
Claus Gittinger <cg@exept.de>
parents:
2238
diff
changeset
|
957 |
"/ browseMethods:methodsFromOtherPackages |
a9c2f87fbd98
changed: #checkMethodPackagesOf:
Claus Gittinger <cg@exept.de>
parents:
2238
diff
changeset
|
958 |
"/ title:('Extensions for %1' bindWith:aClass name) |
a9c2f87fbd98
changed: #checkMethodPackagesOf:
Claus Gittinger <cg@exept.de>
parents:
2238
diff
changeset
|
959 |
"/ sort:true. |
a9c2f87fbd98
changed: #checkMethodPackagesOf:
Claus Gittinger <cg@exept.de>
parents:
2238
diff
changeset
|
960 |
"/ answer := #cancel. |
a9c2f87fbd98
changed: #checkMethodPackagesOf:
Claus Gittinger <cg@exept.de>
parents:
2238
diff
changeset
|
961 |
"/ ]. |
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
962 |
]. |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
963 |
|
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
964 |
answer == #cancel ifTrue:[ |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
965 |
AbortSignal raise |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
966 |
]. |
1016 | 967 |
answer == #yesToAll ifTrue:[ |
968 |
SourceCodeManagerUtilities yesToAllNotification raiseWith:true. |
|
969 |
answer := true. |
|
970 |
]. |
|
851
fcf26a083242
better confirm, when asking for other package methods
Claus Gittinger <cg@exept.de>
parents:
844
diff
changeset
|
971 |
|
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
972 |
"/ ok, move them over |
851
fcf26a083242
better confirm, when asking for other package methods
Claus Gittinger <cg@exept.de>
parents:
844
diff
changeset
|
973 |
answer == true ifTrue:[ |
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
974 |
"/ change all method's packageID to the classes packageId |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
975 |
aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
2208
a66ff7ef9153
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
2202
diff
changeset
|
976 |
mthd package == PackageId noProjectID ifTrue:[ |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
977 |
mthd makeLocalStringSource. |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
978 |
mthd setPackage:clsPackage |
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
979 |
] |
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
816
diff
changeset
|
980 |
]. |
1027
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
981 |
aClass allPrivateClassesDo:[:eachPrivateClass | |
1028 | 982 |
aClass setPackage:clsPackage. |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1075
diff
changeset
|
983 |
eachPrivateClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
1454
b7617ab0033d
oops - care for extension method's sources
Claus Gittinger <cg@exept.de>
parents:
1451
diff
changeset
|
984 |
mthd makeLocalStringSource. |
1027
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
985 |
mthd setPackage:clsPackage |
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
986 |
] |
6c93b510b86d
update private class packages
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
987 |
]. |
980 | 988 |
aClass changed:#projectOrganization. |
1011
647a8c2fabc1
method category: and package: now send change notifications.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
989 |
Smalltalk changed:#projectOrganization with:(Array with:aClass). |
813 | 990 |
]. |
1518
c6b1f8da85f2
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
991 |
^ #base |
1112
c395948357d3
care for userPref-browser-setting (in browse-action)
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
992 |
|
2468 | 993 |
"Modified: / 24-07-2011 / 07:13:58 / cg" |
813 | 994 |
! |
995 |
||
2173 | 996 |
compileVersionMethod:methodName of:aClass for:newRevisionString |
997 |
||
2227
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
998 |
|cls mthd code| |
2173 | 999 |
|
1000 |
cls := aClass theMetaclass. |
|
1001 |
||
2183 | 1002 |
self assert: cls programmingLanguage isSmalltalk. |
1003 |
||
2227
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
1004 |
code := |
2173 | 1005 |
methodName , ' |
1006 |
^ ''' , newRevisionString , ''' |
|
2227
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
1007 |
'. |
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
1008 |
|
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
1009 |
mthd := Compiler |
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
1010 |
compile:code |
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
1011 |
forClass:cls |
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
1012 |
inCategory:#documentation |
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
1013 |
notifying:nil |
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
1014 |
install:true |
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
1015 |
skipIfSame:false |
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
1016 |
silent:true. |
2173 | 1017 |
|
1018 |
mthd notNil ifTrue:[ |
|
1019 |
mthd setPackage:aClass package |
|
1020 |
] |
|
1021 |
! |
|
1022 |
||
179 | 1023 |
containerFromSourceInfo:info |
472 | 1024 |
"given a sourceInfo, return the classes container" |
1025 |
||
179 | 1026 |
(info includesKey:#fileName) ifTrue:[ |
1027 |
^ info at:#fileName |
|
1028 |
]. |
|
1029 |
(info includesKey:#expectedFileName) ifTrue:[ |
|
1030 |
^ info at:#expectedFileName |
|
1031 |
]. |
|
1032 |
^ (info at:#classFileNameBase) , '.st' |
|
1033 |
||
472 | 1034 |
"Modified: 12.9.1996 / 02:31:52 / cg" |
179 | 1035 |
! |
1036 |
||
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1037 |
directoryFromContainerPath:containerPath forClass:aClass |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1038 |
"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
|
1039 |
extract the directory (i.e. package)." |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1040 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1041 |
^ self directoryFromContainerPath:containerPath forPackage:(aClass package) |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1042 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1043 |
" |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1044 |
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
|
1045 |
" |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1046 |
! |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1047 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1048 |
directoryFromContainerPath:containerPath forPackage:packageID |
721
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1049 |
"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
|
1050 |
extract the directory (i.e. package)." |
148 | 1051 |
|
96 | 1052 |
|path idx| |
1053 |
||
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1054 |
path := self pathInRepositoryFrom:containerPath forPackage:packageID. |
704 | 1055 |
path isNil ifTrue:[^ nil]. |
1056 |
||
1057 |
"/ these are always UNIX filenames ... |
|
1058 |
idx := path indexOf:$/. |
|
1059 |
idx ~~ 0 ifTrue:[ |
|
1060 |
path := path copyFrom:(idx + 1) |
|
96 | 1061 |
]. |
721
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1062 |
|
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1063 |
"/ the code below used to be: |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1064 |
"/ ^ path asFilename directoryName |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1065 |
"/ however, that only works under UNIX, since |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1066 |
"/ we MUST return a unix pathname here. |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1067 |
"/ therefore, do what unix would do here ... |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1068 |
|
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1069 |
idx := path lastIndexOf:$/. |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1070 |
idx == 0 ifTrue:[ |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1071 |
"/ huh ? |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1072 |
^ path |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1073 |
]. |
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1074 |
^ path copyTo:(idx - 1) |
96 | 1075 |
|
1076 |
" |
|
721
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1077 |
CVSSourceCodeManager directoryFromContainerPath:'/files/CVS/stx/libbasic/Array.st' |
96 | 1078 |
" |
1079 |
||
721
5a2a1f8dc18e
always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1080 |
"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
|
1081 |
"Modified: / 25.9.1998 / 15:38:59 / cg" |
96 | 1082 |
! |
1083 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1084 |
directoryFromSourceInfo:info |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1085 |
"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
|
1086 |
|
2485 | 1087 |
^ info at:#directory ifAbsent:nil. |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1088 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1089 |
"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
|
1090 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1091 |
|
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1092 |
moduleFromContainerPath:containerPath forClass:aClass |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1093 |
"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
|
1094 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1095 |
^ self moduleFromContainerPath:containerPath forPackage:aClass package |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1096 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1097 |
" |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1098 |
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
|
1099 |
" |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1100 |
! |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1101 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1102 |
moduleFromContainerPath:containerPath forPackage:packageID |
148 | 1103 |
"given a full path as in an RCS header, extract the module." |
1104 |
||
96 | 1105 |
|path idx| |
1106 |
||
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1107 |
path := self pathInRepositoryFrom:containerPath forPackage:packageID. |
704 | 1108 |
path isNil ifTrue:[^ nil]. |
1109 |
||
1110 |
"/ these are always UNIX filenames |
|
1111 |
idx := path indexOf:$/. |
|
1112 |
idx == 0 ifTrue:[^ path]. |
|
1113 |
^ path copyTo:(idx - 1) |
|
96 | 1114 |
|
1115 |
" |
|
1116 |
SourceCodeManager moduleFromContainerPath:'/files/CVS/stx/libbasic/Array.st' |
|
1117 |
" |
|
1118 |
||
704 | 1119 |
"Created: / 25.11.1995 / 18:42:20 / cg" |
1120 |
"Modified: / 11.8.1998 / 23:01:24 / cg" |
|
96 | 1121 |
! |
1122 |
||
179 | 1123 |
moduleFromSourceInfo:info |
472 | 1124 |
"given a sourceInfo, return the classes module directory" |
1125 |
||
179 | 1126 |
^ info at:#module. "/ use the modules name as CVS module |
1127 |
||
1128 |
"Created: 6.2.1996 / 17:26:38 / cg" |
|
472 | 1129 |
"Modified: 12.9.1996 / 02:32:23 / cg" |
179 | 1130 |
! |
1131 |
||
1132 |
packageFromSourceInfo:info |
|
472 | 1133 |
"given a sourceInfo, return the classes package directory" |
1134 |
||
1881 | 1135 |
<resource: #obsolete> |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1136 |
self obsoleteMethodWarning. |
179 | 1137 |
^ info at:#directory. |
1138 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
1139 |
"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
|
1140 |
"Modified: / 23-08-2006 / 14:11:18 / cg" |
179 | 1141 |
! |
1142 |
||
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1143 |
pathInRepositoryFrom:containerPath forPackage:packageID |
2915
f0e6c9528a5e
added: #isRevision:sameOfAfter:
Claus Gittinger <cg@exept.de>
parents:
2866
diff
changeset
|
1144 |
"this tries to extract the path within a repository, |
f0e6c9528a5e
added: #isRevision:sameOfAfter:
Claus Gittinger <cg@exept.de>
parents:
2866
diff
changeset
|
1145 |
given some path as present in an RCS Header string. |
148 | 1146 |
Typically, this ought to be that string directly; |
1147 |
however, if the repository directory is accessed via a symbolic link during |
|
1148 |
ci/co, some systems extract different strings with co. |
|
1149 |
One such system here had a symbolic link from /phys/ibm/CVS... to /file/CVS, |
|
1150 |
and extracted sources had /phys/ibm/CVS in their header. |
|
1151 |
Do not depend on the code below to work correctly all the time." |
|
1152 |
||
501 | 1153 |
|top lastTop idx| |
96 | 1154 |
|
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1155 |
containerPath isNil ifTrue:[^ nil]. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1156 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1157 |
packageID notNil ifTrue:[ |
1348 | 1158 |
idx := containerPath lastIndexOfSubCollection:(packageID copyReplaceAll:$: with:$/). |
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1159 |
idx ~~ 0 ifTrue:[ |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1160 |
^ containerPath copyFrom:idx. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1161 |
]. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1162 |
]. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1163 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1164 |
"/ |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1165 |
"/ 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
|
1166 |
"/ (should not be required) |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1167 |
"/ |
1499 | 1168 |
top := self repositoryTopDirectoryFromCVSRoot. |
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1169 |
top notNil ifTrue:[ |
148 | 1170 |
|
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1171 |
(containerPath startsWith:(top , '/')) ifTrue:[ |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1172 |
^ containerPath copyFrom:(top size + 2). |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1173 |
]. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1174 |
(containerPath startsWith:(top)) ifTrue:[ |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1175 |
^ containerPath copyFrom:(top size + 1). |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1176 |
]. |
148 | 1177 |
|
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1178 |
"/ hardcase - the repository-filename in the versionInfo |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1179 |
"/ does not match my repository top. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1180 |
"/ 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
|
1181 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1182 |
lastTop := '/' , top asFilename baseName, '/'. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1183 |
idx := containerPath indexOfSubCollection:lastTop. |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1184 |
idx ~~ 0 ifTrue:[ |
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1185 |
('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
|
1186 |
'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
|
1187 |
^ containerPath copyFrom:(idx + lastTop size). |
148 | 1188 |
] |
96 | 1189 |
]. |
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1190 |
|
501 | 1191 |
^ nil |
96 | 1192 |
|
1193 |
" |
|
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1194 |
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
|
1195 |
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
|
1196 |
|
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1197 |
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
|
1198 |
SourceCodeManager pathInRepositoryFrom:'/phys/ibm/CVS/stx/libbasic/Array.st' forPackage:nil |
96 | 1199 |
" |
1200 |
||
1498 | 1201 |
"Created: / 25-11-1995 / 18:42:20 / cg" |
1202 |
"Modified: / 21-06-2006 / 12:06:14 / cg" |
|
2915
f0e6c9528a5e
added: #isRevision:sameOfAfter:
Claus Gittinger <cg@exept.de>
parents:
2866
diff
changeset
|
1203 |
"Modified (comment): / 24-09-2012 / 11:10:50 / cg" |
96 | 1204 |
! |
1205 |
||
1091
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
1206 |
postCheckInClass:aClass |
871 | 1207 |
"invoked after a checkIn" |
870 | 1208 |
|
928 | 1209 |
|p| |
1210 |
||
1211 |
(p := Project current) notNil ifTrue:[ |
|
1212 |
p condenseChangesForClassCheckin:aClass. |
|
2241
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1213 |
]. |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1214 |
|
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1215 |
"/ |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1216 |
"/ Set the source code for every method of the checked in class |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1217 |
"/ Ensure that the source code for the compiled methods is the original one |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1218 |
"/ Done to avoid checking out from the repository using binaryRevision and sourcePosition |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1219 |
"/ |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1220 |
aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1221 |
mthd makeLocalStringSource. |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1222 |
]. |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1223 |
aClass allPrivateClassesDo:[:eachPrivateClass | |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1224 |
eachPrivateClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1225 |
mthd makeLocalStringSource. |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1226 |
] |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1227 |
]. |
1091
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
1228 |
! |
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
1229 |
|
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
1230 |
postCheckInExtensionsForPackage:aPackageId |
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
1231 |
"invoked after a checkIn" |
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
1232 |
|
2241
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1233 |
|p extensionMethods| |
1091
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
1234 |
|
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
1235 |
(p := Project current) notNil ifTrue:[ |
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
1236 |
p condenseChangesForExtensionsCheckInInPackage:aPackageId. |
2241
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1237 |
]. |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1238 |
|
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1239 |
"/ |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1240 |
"/ Set the source code for every extension method of the checked in aPackageId |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1241 |
"/ Ensure that the source code for the compiled methods is the original one |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1242 |
"/ Done to avoid checking out from the repository |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1243 |
"/ |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1244 |
extensionMethods := Smalltalk allExtensionsForPackage:aPackageId. |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1245 |
extensionMethods do:[:mthd | |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1246 |
mthd makeLocalStringSource. |
891d18a71bbf
After check-in, set the source code for every method of the checked in class or extensions
fm
parents:
2240
diff
changeset
|
1247 |
]. |
870 | 1248 |
! |
1249 |
||
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1250 |
reportError:msg |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1251 |
|fullMsg| |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1252 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1253 |
fullMsg := self class name,' [error]: ',msg. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1254 |
fullMsg errorPrintCR. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1255 |
SourceCodeManagerError raiseErrorString:fullMsg. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1256 |
|
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1257 |
"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
|
1258 |
! |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1259 |
|
96 | 1260 |
repositoryTopDirectory |
472 | 1261 |
"return the name of the repository" |
1262 |
||
96 | 1263 |
^ nil |
1264 |
||
1265 |
"Created: 25.11.1995 / 18:38:59 / cg" |
|
472 | 1266 |
"Modified: 12.9.1996 / 02:32:40 / cg" |
96 | 1267 |
! |
1268 |
||
71 | 1269 |
sourceCacheDirectory |
472 | 1270 |
"return the sourceCache directories name" |
1271 |
||
71 | 1272 |
|dir nm| |
1273 |
||
1274 |
(nm := self cacheDirectoryName) isNil ifTrue:[^ nil]. |
|
69 | 1275 |
|
71 | 1276 |
(dir := nm asFilename) exists ifFalse:[ |
1467 | 1277 |
OperatingSystem errorSignal catch:[ |
2232
ee754b28809e
changed: #sourceCacheDirectory
Claus Gittinger <cg@exept.de>
parents:
2231
diff
changeset
|
1278 |
dir recursiveMakeDirectory. |
1060 | 1279 |
]. |
173
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
1280 |
dir exists ifFalse:[ |
2232
ee754b28809e
changed: #sourceCacheDirectory
Claus Gittinger <cg@exept.de>
parents:
2231
diff
changeset
|
1281 |
('SourceCodeManager [warning]: could not create cache dir "',CacheDirectoryName,'"') errorPrintCR. |
173
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
1282 |
^ nil |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
1283 |
]. |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
1284 |
"/ |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
1285 |
"/ make it read/writable for everyone |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
1286 |
"/ |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
1287 |
dir makeReadableForAll. |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
1288 |
dir makeWritableForAll. |
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
1289 |
dir makeExecutableForAll. |
71 | 1290 |
]. |
1291 |
^ dir |
|
173
d73d61190510
make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents:
160
diff
changeset
|
1292 |
|
535 | 1293 |
"Modified: 10.1.1997 / 15:13:20 / cg" |
71 | 1294 |
! |
69 | 1295 |
|
96 | 1296 |
sourceInfoOfClass:aClass |
751 | 1297 |
"helper: return a classes sourceCodeInfo by extracting its |
1298 |
versionString components." |
|
96 | 1299 |
|
752 | 1300 |
|cls packageInfo revInfo actualSourceFileName classFileNameBase |
501 | 1301 |
newInfo container expectedFileName |
752 | 1302 |
directoryFromVersion moduleFromVersion fileNameFromVersion |
1303 |
directoryFromPackage moduleFromPackage| |
|
96 | 1304 |
|
1091
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1077
diff
changeset
|
1305 |
cls := aClass theNonMetaclass. |
96 | 1306 |
|
179 | 1307 |
newInfo := IdentityDictionary new. |
1308 |
||
96 | 1309 |
"/ |
1310 |
"/ the info given by the classes source ... |
|
752 | 1311 |
"/ (i.e. its revisionString) |
96 | 1312 |
"/ |
2838 | 1313 |
revInfo := cls revisionInfoOfManager: self. |
179 | 1314 |
revInfo notNil ifTrue:[ |
1315 |
revInfo keysAndValuesDo:[:key :value | |
|
1316 |
newInfo at:key put:value |
|
1317 |
] |
|
1318 |
]. |
|
96 | 1319 |
|
1320 |
"/ |
|
1321 |
"/ the info given by the classes binary ... |
|
752 | 1322 |
"/ (i.e. its package-ID) |
96 | 1323 |
"/ if present, we better trust that one. |
752 | 1324 |
"/ however, it only contains partial information (module:directory:libName). |
179 | 1325 |
"/ (but is available even without a source) |
96 | 1326 |
"/ |
752 | 1327 |
packageInfo := cls packageSourceCodeInfo. |
1328 |
packageInfo notNil ifTrue:[ |
|
1329 |
packageInfo keysAndValuesDo:[:key :value | |
|
179 | 1330 |
newInfo at:key put:value |
160 | 1331 |
] |
96 | 1332 |
]. |
1333 |
||
179 | 1334 |
"/ |
1335 |
"/ no information |
|
1336 |
"/ |
|
752 | 1337 |
(packageInfo isNil and:[revInfo isNil]) ifTrue:[ |
1223 | 1338 |
('SourceCodeManager [warning]: class `' , cls name , ''' has neither source nor compiled-in info') infoPrintCR. |
179 | 1339 |
^ nil |
1340 |
]. |
|
96 | 1341 |
|
1342 |
"/ |
|
179 | 1343 |
"/ validate for conflicts |
1344 |
"/ trust binary if in doubt |
|
1345 |
"/ (in case some cheater edited the version string) |
|
752 | 1346 |
"/ |
179 | 1347 |
revInfo notNil ifTrue:[ |
2030
ed856e774120
versionInfo migrates from Dictionary to an object proper
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
1348 |
container := revInfo at:#repositoryPathName ifAbsent:nil. |
ed856e774120
versionInfo migrates from Dictionary to an object proper
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
1349 |
(container notNil) ifTrue:[ |
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1350 |
moduleFromVersion := self moduleFromContainerPath:container forClass:aClass. |
1125 | 1351 |
moduleFromVersion notNil ifTrue:[ |
1352 |
newInfo at:#module put:moduleFromVersion. |
|
1353 |
]. |
|
1346
8657706d79ba
generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents:
1330
diff
changeset
|
1354 |
directoryFromVersion := self directoryFromContainerPath:container forClass:aClass. |
752 | 1355 |
directoryFromVersion notNil ifTrue:[ |
1356 |
newInfo at:#directory put:directoryFromVersion. |
|
704 | 1357 |
]. |
752 | 1358 |
fileNameFromVersion := container asFilename baseName. |
1359 |
(fileNameFromVersion endsWith:',v') ifTrue:[ |
|
1360 |
fileNameFromVersion := fileNameFromVersion copyWithoutLast:2. |
|
704 | 1361 |
]. |
752 | 1362 |
newInfo at:#fileName put:fileNameFromVersion. |
179 | 1363 |
|
752 | 1364 |
packageInfo notNil ifTrue:[ |
1365 |
(packageInfo includesKey:#directory) ifTrue:[ |
|
1366 |
directoryFromPackage := packageInfo at:#directory. |
|
1367 |
moduleFromPackage := packageInfo at:#module. |
|
96 | 1368 |
|
752 | 1369 |
(directoryFromPackage ~= directoryFromVersion |
1370 |
or:[moduleFromPackage ~= moduleFromVersion]) ifTrue:[ |
|
1371 |
(directoryFromVersion isNil or:[moduleFromVersion isNil]) ifTrue:[ |
|
1372 |
directoryFromPackage ~= 'no package' ifTrue:[ |
|
1125 | 1373 |
moduleFromVersion notNil ifTrue:[ |
1374 |
('SourceCodeManager [warning]: conflicting source infos (binary: ' |
|
1375 |
, (moduleFromPackage ? 'nil') , '/' , (directoryFromPackage ? 'nil') |
|
1376 |
, ' vs. source:' |
|
1377 |
, (moduleFromVersion ? 'nil') , '/' , (directoryFromVersion ? 'nil') |
|
1378 |
, ')') infoPrintCR. |
|
1379 |
('SourceCodeManager [info]: using binary info: ' |
|
1380 |
, moduleFromPackage , '/' , directoryFromPackage |
|
1381 |
) infoPrintCR. |
|
1382 |
]. |
|
752 | 1383 |
newInfo at:#directory put:directoryFromPackage. |
1384 |
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
|
1385 |
] |
187
fdda79120bbb
in sourceInfoOfClass: be prepared for binInfo present, but no sourceInfo
Claus Gittinger <cg@exept.de>
parents:
185
diff
changeset
|
1386 |
] ifFalse:[ |
752 | 1387 |
directoryFromPackage ~= 'no package' ifTrue:[ |
581
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
1388 |
('SourceCodeManager [warning]: conflicting source infos (binary: ' |
752 | 1389 |
, moduleFromPackage , '/' , directoryFromPackage |
581
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
1390 |
, ' vs. source:' |
752 | 1391 |
, moduleFromVersion , '/' , directoryFromVersion |
581
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
1392 |
, ')') infoPrintCR. |
2f96268045cb
avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents:
558
diff
changeset
|
1393 |
] |
583
aeb05843bd69
suppress annoying warning message about binary vs. source info,
Claus Gittinger <cg@exept.de>
parents:
582
diff
changeset
|
1394 |
] |
179 | 1395 |
] |
1396 |
] |
|
1397 |
]. |
|
1398 |
] |
|
1399 |
]. |
|
1400 |
||
1401 |
"/ |
|
1402 |
"/ the filename I'd expect from its name ... |
|
1403 |
"/ |
|
1863 | 1404 |
classFileNameBase := cls classBaseFilename. |
179 | 1405 |
|
1406 |
(newInfo includesKey:#fileName) ifFalse:[ |
|
1856
1b69eec9b150
care for filename in classFilename,
Claus Gittinger <cg@exept.de>
parents:
1838
diff
changeset
|
1407 |
newInfo at:#fileName put:classFileNameBase |
179 | 1408 |
]. |
1409 |
||
1410 |
"/ guess on the container |
|
1461 | 1411 |
((newInfo includesKey:#directory) and:[newInfo includesKey:#module]) ifTrue:[ |
1412 |
|pathInRepository| |
|
1413 |
||
1414 |
container isNil ifTrue:[ |
|
1415 |
container := (newInfo at:#module) |
|
1416 |
, '/' |
|
1417 |
, (newInfo at:#directory) |
|
1418 |
, '/' |
|
1856
1b69eec9b150
care for filename in classFilename,
Claus Gittinger <cg@exept.de>
parents:
1838
diff
changeset
|
1419 |
, classFileNameBase , ',v'. |
1461 | 1420 |
]. |
1421 |
pathInRepository := (newInfo at:#module) |
|
1422 |
, '/' |
|
1423 |
, (newInfo at:#directory) |
|
1424 |
, '/' |
|
1856
1b69eec9b150
care for filename in classFilename,
Claus Gittinger <cg@exept.de>
parents:
1838
diff
changeset
|
1425 |
, classFileNameBase. |
1461 | 1426 |
newInfo at:#pathInRepository put:pathInRepository. |
179 | 1427 |
]. |
1428 |
||
1429 |
container notNil ifTrue:[ |
|
1430 |
newInfo at:#repositoryPathName put:container. |
|
96 | 1431 |
]. |
1432 |
||
1433 |
"/ check .. |
|
1434 |
revInfo notNil ifTrue:[ |
|
160 | 1435 |
actualSourceFileName := revInfo at:#fileName ifAbsent:nil. |
1436 |
actualSourceFileName notNil ifTrue:[ |
|
1856
1b69eec9b150
care for filename in classFilename,
Claus Gittinger <cg@exept.de>
parents:
1838
diff
changeset
|
1437 |
expectedFileName := classFileNameBase. |
179 | 1438 |
actualSourceFileName ~= expectedFileName ifTrue:[ |
1223 | 1439 |
('SourceCodeManager [warning]: source of class ' , cls name , ' in ' , actualSourceFileName , ';') infoPrintCR. |
535 | 1440 |
('SourceCodeManager [info]: (expected: ' , expectedFileName , '); renamed or missing abbreviation ?') infoPrintCR. |
1441 |
('SourceCodeManager [info]: This may fail to autoload later if left unchanged.') infoPrintCR. |
|
179 | 1442 |
newInfo at:#expectedFileName put:expectedFileName. |
160 | 1443 |
newInfo at:#renamed put:true. |
1856
1b69eec9b150
care for filename in classFilename,
Claus Gittinger <cg@exept.de>
parents:
1838
diff
changeset
|
1444 |
classFileNameBase := actualSourceFileName |
160 | 1445 |
] |
1446 |
] |
|
96 | 1447 |
]. |
1448 |
||
1888 | 1449 |
newInfo at:#classFileNameBase put:(classFileNameBase asFilename nameWithoutSuffix). |
96 | 1450 |
^ newInfo |
1451 |
||
704 | 1452 |
" |
1453 |
self sourceInfoOfClass:Array |
|
1454 |
" |
|
1455 |
||
2030
ed856e774120
versionInfo migrates from Dictionary to an object proper
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
1456 |
"Modified: / 22-10-2008 / 20:49:15 / cg" |
2838 | 1457 |
"Modified: / 19-07-2012 / 13:38:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2173 | 1458 |
! |
1459 |
||
2638
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1460 |
updateVersionMethod:selector of:aClass for:newRevisionString |
2173 | 1461 |
"{ Pragma: +optSpace }" |
1462 |
||
1463 |
"helper for the checkin procedure. |
|
1464 |
Update my #version_XXX method, to now return newRevisionString." |
|
1465 |
||
1466 |
Class methodRedefinitionNotification answer:#keep do:[ |
|
1467 |
Class withoutUpdatingChangesDo:[ |
|
2543
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
1468 |
|oldVersion| |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
1469 |
|
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
1470 |
"/ "/ must preserve the binary version, as methods still have the offsets into the old source file inside |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
1471 |
"/ oldVersion := aClass revision. |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
1472 |
"/ aClass setBinaryRevision:oldVersion. |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
1473 |
|
2638
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1474 |
self compileVersionMethod:selector of:aClass for:newRevisionString. |
2173 | 1475 |
] |
1476 |
]. |
|
1477 |
||
2543
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
1478 |
"Modified: / 29-09-2011 / 21:59:41 / cg" |
2638
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1479 |
"Created: / 02-12-2011 / 14:18:14 / cg" |
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1480 |
! |
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1481 |
|
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1482 |
updateVersionMethodOf:aClass for:newRevisionString |
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1483 |
"{ Pragma: +optSpace }" |
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1484 |
|
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1485 |
"helper for the checkin procedure. |
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1486 |
Update my #version_XXX method, to now return newRevisionString." |
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1487 |
|
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1488 |
self updateVersionMethod:(self nameOfVersionMethodInClasses) of:aClass for:newRevisionString. |
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1489 |
|
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1490 |
"Updates the old method #version (if present)" |
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1491 |
true "(aClass theMetaclass includesSelector: Class nameOfOldVersionMethod)" ifTrue: [ |
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1492 |
self updateVersionMethod:(Class nameOfOldVersionMethod) of:aClass for:newRevisionString. |
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1493 |
]. |
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1494 |
|
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
1495 |
"Modified: / 02-12-2011 / 14:19:37 / cg" |
95 | 1496 |
! ! |
1497 |
||
1893 | 1498 |
!AbstractSourceCodeManager class methodsFor:'queries'! |
1499 |
||
2730 | 1500 |
enabled |
1501 |
||
1502 |
"JV@2012-01-19: Quick hack, see senders. Is that what you mean?" |
|
1503 |
||
1504 |
^self askFor:#shownInBrowserMenus |
|
1505 |
||
1506 |
"Created: / 19-01-2012 / 10:39:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1507 |
! |
|
1508 |
||
2649 | 1509 |
isContainerBased |
1510 |
"true, if the SCM uses some kind of source container (,v files). |
|
1511 |
False, if it is like a database or filesystem." |
|
1512 |
||
1513 |
^ true |
|
1514 |
||
1515 |
"Created: / 21-12-2011 / 18:53:49 / cg" |
|
1516 |
! |
|
1517 |
||
2199 | 1518 |
isExperimental |
1519 |
^ false |
|
1520 |
||
1521 |
"Created: / 16-08-2006 / 11:22:47 / cg" |
|
1522 |
! |
|
1523 |
||
2763
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1524 |
isExtensionsVersionMethodSelector: selector |
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1525 |
"true if the given selector is for one of the manager's extensions version methods. |
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1526 |
These are all named extensionVersion_XXX, where XXX is manager-specific (CVS, P4, SVN etc.). |
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1527 |
For backward compatibility (times, when there was only one CVS sourcecode manager, |
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1528 |
the selector named 'extensionsVersion' alone also counts as a version method |
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1529 |
(which might be a somewhat bad idea in the long term...)." |
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1530 |
|
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1531 |
selector isNil ifTrue: [^ false]. |
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1532 |
|
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1533 |
^ selector == self nameOfVersionMethodForExtensions |
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1534 |
or:[selector startsWith: self prefixOfVersionMethodForExtensionsSelector] |
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1535 |
|
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1536 |
"Modified (comment): / 09-07-2011 / 12:31:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1537 |
"Created: / 26-01-2012 / 14:30:45 / cg" |
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1538 |
! |
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
1539 |
|
1893 | 1540 |
isResponsibleForModule:module |
1541 |
^ self repositoryInfoPerModule keys includes:module |
|
1542 |
||
1543 |
"Created: / 09-11-2006 / 15:24:57 / cg" |
|
2140
48a3fb6d338d
added nameOfVersionMethodInClasses
Claus Gittinger <cg@exept.de>
parents:
2100
diff
changeset
|
1544 |
! |
48a3fb6d338d
added nameOfVersionMethodInClasses
Claus Gittinger <cg@exept.de>
parents:
2100
diff
changeset
|
1545 |
|
2445 | 1546 |
isResponsibleForPackage:aStringOrSymbol |
2565 | 1547 |
"Returns true if the manager can handle source code for given package. |
1548 |
||
1549 |
Answering true does not imply that receiver is configured default |
|
1550 |
manager for that package, it only means that it has a repository |
|
1551 |
configured for given package." |
|
1552 |
||
2445 | 1553 |
self subclassResponsibility |
1554 |
||
2565 | 1555 |
"Modified (comment): / 11-10-2011 / 11:58:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2634
865f10de3c93
comment/format in: #isResponsibleForPackage:
Claus Gittinger <cg@exept.de>
parents:
2623
diff
changeset
|
1556 |
"Modified (format): / 01-12-2011 / 20:56:32 / cg" |
2259
dfb8e835c7d3
added: #isResponsibleForPackage:
Claus Gittinger <cg@exept.de>
parents:
2241
diff
changeset
|
1557 |
! |
dfb8e835c7d3
added: #isResponsibleForPackage:
Claus Gittinger <cg@exept.de>
parents:
2241
diff
changeset
|
1558 |
|
2665
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1559 |
isRevision:revision1 after:revision2 |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1560 |
"true, if the dotted revision string revision1 is > than revision2" |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1561 |
|
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1562 |
|idx1 idx2 nr1 nr2 rest1 rest2| |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1563 |
|
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1564 |
idx1 := revision1 indexOf:$.. |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1565 |
idx1 == 0 ifTrue:[ |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1566 |
nr1 := Integer readFrom:revision1. |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1567 |
] ifFalse:[ |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1568 |
nr1 := Integer readFrom:(revision1 copyTo:idx1-1). |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1569 |
rest1 := revision1 copyFrom:idx1+1. |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1570 |
]. |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1571 |
|
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1572 |
idx2 := revision2 indexOf:$.. |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1573 |
idx2 == 0 ifTrue:[ |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1574 |
nr2 := Integer readFrom:revision2. |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1575 |
] ifFalse:[ |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1576 |
nr2 := Integer readFrom:(revision2 copyTo:idx2-1). |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1577 |
rest2 := revision2 copyFrom:idx2+1. |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1578 |
]. |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1579 |
nr1 = nr2 ifFalse:[ |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1580 |
^ nr1 > nr2 |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1581 |
]. |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1582 |
|
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1583 |
"/ advance... |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1584 |
rest1 isEmptyOrNil ifTrue:[ |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1585 |
^ false |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1586 |
]. |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1587 |
rest2 isEmptyOrNil ifTrue:[ |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1588 |
^ true |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1589 |
]. |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1590 |
^ self isRevision:rest1 after:rest2 |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1591 |
|
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1592 |
" |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1593 |
SourceCodeManager isRevision:'1' after:'2' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1594 |
SourceCodeManager isRevision:'2' after:'1' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1595 |
SourceCodeManager isRevision:'1.1' after:'2.1.2' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1596 |
SourceCodeManager isRevision:'2.1' after:'1.2.3' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1597 |
SourceCodeManager isRevision:'1' after:'1.1' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1598 |
SourceCodeManager isRevision:'1.1' after:'1' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1599 |
SourceCodeManager isRevision:'1.1' after:'1.2' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1600 |
SourceCodeManager isRevision:'1.2' after:'1.1' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1601 |
SourceCodeManager isRevision:'1.2.3.4' after:'1.2.3.5' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1602 |
SourceCodeManager isRevision:'1.2.3.4' after:'1.2.3.3' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1603 |
SourceCodeManager isRevision:'1.2.3.4' after:'1.2.3' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1604 |
SourceCodeManager isRevision:'1.2.3.4' after:'1.2.3.4' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1605 |
" |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1606 |
|
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1607 |
"Created: / 21-12-2011 / 19:15:35 / cg" |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1608 |
! |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1609 |
|
2915
f0e6c9528a5e
added: #isRevision:sameOfAfter:
Claus Gittinger <cg@exept.de>
parents:
2866
diff
changeset
|
1610 |
isRevision:revision1 sameOfAfter:revision2 |
f0e6c9528a5e
added: #isRevision:sameOfAfter:
Claus Gittinger <cg@exept.de>
parents:
2866
diff
changeset
|
1611 |
"true, if the dotted revision string revision1 is >= than revision2" |
f0e6c9528a5e
added: #isRevision:sameOfAfter:
Claus Gittinger <cg@exept.de>
parents:
2866
diff
changeset
|
1612 |
|
f0e6c9528a5e
added: #isRevision:sameOfAfter:
Claus Gittinger <cg@exept.de>
parents:
2866
diff
changeset
|
1613 |
revision1 = revision2 ifTrue:[^ true]. |
f0e6c9528a5e
added: #isRevision:sameOfAfter:
Claus Gittinger <cg@exept.de>
parents:
2866
diff
changeset
|
1614 |
^ self isRevision:revision1 after:revision2 |
f0e6c9528a5e
added: #isRevision:sameOfAfter:
Claus Gittinger <cg@exept.de>
parents:
2866
diff
changeset
|
1615 |
|
f0e6c9528a5e
added: #isRevision:sameOfAfter:
Claus Gittinger <cg@exept.de>
parents:
2866
diff
changeset
|
1616 |
"Created: / 26-09-2012 / 18:09:36 / cg" |
f0e6c9528a5e
added: #isRevision:sameOfAfter:
Claus Gittinger <cg@exept.de>
parents:
2866
diff
changeset
|
1617 |
! |
f0e6c9528a5e
added: #isRevision:sameOfAfter:
Claus Gittinger <cg@exept.de>
parents:
2866
diff
changeset
|
1618 |
|
2916
259d582b2131
added: #isRevision:sameOrAfter:
Claus Gittinger <cg@exept.de>
parents:
2915
diff
changeset
|
1619 |
isRevision:revision1 sameOrAfter:revision2 |
259d582b2131
added: #isRevision:sameOrAfter:
Claus Gittinger <cg@exept.de>
parents:
2915
diff
changeset
|
1620 |
"true, if the dotted revision string revision1 is >= than revision2" |
259d582b2131
added: #isRevision:sameOrAfter:
Claus Gittinger <cg@exept.de>
parents:
2915
diff
changeset
|
1621 |
|
259d582b2131
added: #isRevision:sameOrAfter:
Claus Gittinger <cg@exept.de>
parents:
2915
diff
changeset
|
1622 |
revision1 = revision2 ifTrue:[^ true]. |
259d582b2131
added: #isRevision:sameOrAfter:
Claus Gittinger <cg@exept.de>
parents:
2915
diff
changeset
|
1623 |
^ self isRevision:revision1 after:revision2 |
259d582b2131
added: #isRevision:sameOrAfter:
Claus Gittinger <cg@exept.de>
parents:
2915
diff
changeset
|
1624 |
|
259d582b2131
added: #isRevision:sameOrAfter:
Claus Gittinger <cg@exept.de>
parents:
2915
diff
changeset
|
1625 |
"Created: / 26-09-2012 / 18:15:58 / cg" |
259d582b2131
added: #isRevision:sameOrAfter:
Claus Gittinger <cg@exept.de>
parents:
2915
diff
changeset
|
1626 |
! |
259d582b2131
added: #isRevision:sameOrAfter:
Claus Gittinger <cg@exept.de>
parents:
2915
diff
changeset
|
1627 |
|
2764
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1628 |
isVersionMethodForExtensionsSelector: selector |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1629 |
"true if the given selector is for one of the manager's extensions version methods. |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1630 |
These are all named extensionVersion_XXX, where XXX is manager-specific (CVS, P4, SVN etc.). |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1631 |
For backward compatibility (times, when there was only one CVS sourcecode manager, |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1632 |
the selector named 'version' alone also counts as a version method |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1633 |
(which might be a somewhat bad idea in the long term...)." |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1634 |
|
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1635 |
selector isNil ifTrue: [^ false]. |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1636 |
|
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1637 |
^ selector == self nameOfVersionMethodForExtensions |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1638 |
or:[selector startsWith: self prefixOfVersionMethodForExtensionsSelector] |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1639 |
|
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1640 |
"Modified (comment): / 09-07-2011 / 12:31:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1641 |
"Modified (format): / 29-09-2011 / 14:56:15 / cg" |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1642 |
"Created: / 26-01-2012 / 14:53:34 / cg" |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1643 |
! |
c3849e8e0f31
added: #isVersionMethodForExtensionsSelector:
Claus Gittinger <cg@exept.de>
parents:
2763
diff
changeset
|
1644 |
|
2183 | 1645 |
isVersionMethodSelector: selector |
2342
9b43866e85b5
changed: #isVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2329
diff
changeset
|
1646 |
"true if the given selector is for one of the manager's version methods. |
2445 | 1647 |
These are all named version_XXX, where XXX is manager-specific (CVS, P4, SVN etc.). |
2342
9b43866e85b5
changed: #isVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2329
diff
changeset
|
1648 |
For backward compatibility (times, when there was only one CVS sourcecode manager, |
9b43866e85b5
changed: #isVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2329
diff
changeset
|
1649 |
the selector named 'version' alone also counts as a version method |
9b43866e85b5
changed: #isVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2329
diff
changeset
|
1650 |
(which might be a somewhat bad idea in the long term...)." |
2183 | 1651 |
|
2195 | 1652 |
selector isNil ifTrue: [^ false]. |
1653 |
||
2529
302c2c58caa7
changed: #isVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2528
diff
changeset
|
1654 |
^ selector == self nameOfVersionMethodInClasses |
2530
331e4ee893f7
comment/format in: #isVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2529
diff
changeset
|
1655 |
or:[selector startsWith: self prefixOfVersionMethodSelector] |
2529
302c2c58caa7
changed: #isVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2528
diff
changeset
|
1656 |
|
2445 | 1657 |
"Modified (comment): / 09-07-2011 / 12:31:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2530
331e4ee893f7
comment/format in: #isVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2529
diff
changeset
|
1658 |
"Modified (format): / 29-09-2011 / 14:56:15 / cg" |
2183 | 1659 |
! |
1660 |
||
2552
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1661 |
managerTypeName |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1662 |
|
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1663 |
"Answers version manager name suitable for UI, |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1664 |
i,e., CVS, SubVersion, Perforce" |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1665 |
|
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1666 |
^ self subclassResponsibility |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1667 |
|
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1668 |
"Modified (comment): / 03-10-2011 / 13:27:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1669 |
! |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1670 |
|
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1671 |
managerTypeNameShort |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1672 |
|
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1673 |
"Answers short version manager name suitable for UI, |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1674 |
i,e., CVS, SVN, P4. Used in cases where sorter strings |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1675 |
are preferred. Defaults to #managerTypeName" |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1676 |
|
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1677 |
^self managerTypeName |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1678 |
|
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1679 |
"Created: / 03-10-2011 / 13:28:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1680 |
! |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
1681 |
|
2199 | 1682 |
nameOfVersionMethodForExtensions |
2528
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1683 |
"that is the old name; now, we use extensionsVersion_<SCM>" |
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1684 |
|
2199 | 1685 |
^ #'extensionsVersion' |
2528
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1686 |
|
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1687 |
"Modified (comment): / 29-09-2011 / 13:27:04 / cg" |
2199 | 1688 |
! |
1689 |
||
2140
48a3fb6d338d
added nameOfVersionMethodInClasses
Claus Gittinger <cg@exept.de>
parents:
2100
diff
changeset
|
1690 |
nameOfVersionMethodInClasses |
2528
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1691 |
"that is the old name; now, we use version_<SCM>" |
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1692 |
|
2140
48a3fb6d338d
added nameOfVersionMethodInClasses
Claus Gittinger <cg@exept.de>
parents:
2100
diff
changeset
|
1693 |
^ #'version' |
2528
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1694 |
|
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1695 |
"Modified (comment): / 29-09-2011 / 13:27:09 / cg" |
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1696 |
! |
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1697 |
|
2838 | 1698 |
performsCompilabilityChecks |
1699 |
"Should return true, if the manager itself performs |
|
1700 |
compilability checks, false otherwise. |
|
1701 |
||
1702 |
Basically a hack, see my senders..." |
|
1703 |
||
1704 |
^false"/by default |
|
1705 |
||
1706 |
"Created: / 11-04-2012 / 16:54:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1707 |
! |
|
1708 |
||
2762 | 1709 |
prefixOfVersionMethodForExtensionsSelector |
1710 |
"all scm-extensionsVersion methods start with this prefix" |
|
1711 |
||
1712 |
^ 'extensionsVersion_' |
|
1713 |
||
1714 |
"Created: / 26-01-2012 / 14:29:32 / cg" |
|
1715 |
! |
|
1716 |
||
2528
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1717 |
prefixOfVersionMethodSelector |
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1718 |
"all scm-version methods start with this prefix" |
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1719 |
|
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1720 |
^ 'version_' |
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1721 |
|
fb5b84f165d4
added: #prefixOfVersionMethodSelector
Claus Gittinger <cg@exept.de>
parents:
2527
diff
changeset
|
1722 |
"Created: / 29-09-2011 / 13:26:29 / cg" |
2199 | 1723 |
! |
1724 |
||
2665
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1725 |
revisionAfter:aRevisionString |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1726 |
"generate the next revision number after the given number" |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1727 |
|
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1728 |
|idx| |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1729 |
|
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1730 |
idx := aRevisionString lastIndexOf:$.. |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1731 |
idx == 0 ifTrue:[ |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1732 |
^ ((Integer readFrom:aRevisionString) + 1) printString |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1733 |
]. |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1734 |
|
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1735 |
^ (aRevisionString copyTo:idx) , ((Integer readFrom:(aRevisionString copyFrom:(idx+1)))+1) printString |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1736 |
|
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1737 |
" |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1738 |
SourceCodeManager revisionAfter:'1.2.3.4' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1739 |
SourceCodeManager revisionAfter:'123' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1740 |
SourceCodeManager revisionAfter:'1.24' |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1741 |
" |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1742 |
|
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1743 |
"Created: 20.11.1995 / 12:54:05 / cg" |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1744 |
"Modified: 12.9.1996 / 02:33:03 / cg" |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1745 |
! |
279ad76d9372
comment/format in: #utilities
Claus Gittinger <cg@exept.de>
parents:
2654
diff
changeset
|
1746 |
|
2347 | 1747 |
settingsApplicationClass |
2350
161df39dbbbb
added: #settingsApplicationClass
Claus Gittinger <cg@exept.de>
parents:
2347
diff
changeset
|
1748 |
"link to my settings application (needed for the settings dialog" |
161df39dbbbb
added: #settingsApplicationClass
Claus Gittinger <cg@exept.de>
parents:
2347
diff
changeset
|
1749 |
|
2347 | 1750 |
self subclassResponsibility |
1751 |
||
1752 |
"Created: / 19-04-2011 / 12:43:54 / cg" |
|
2350
161df39dbbbb
added: #settingsApplicationClass
Claus Gittinger <cg@exept.de>
parents:
2347
diff
changeset
|
1753 |
"Modified: / 19-04-2011 / 13:52:45 / cg" |
2347 | 1754 |
! |
1755 |
||
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1756 |
sourceCodeManagerForPackage:aPackageID |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1757 |
|module mgr| |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1758 |
|
2743 | 1759 |
"JV@2012-01-23: If source code management is disabled, return #(). Following code |
1760 |
is hack since there is no global boolean flag, sigh" |
|
1761 |
(Smalltalk at:#SourceCodeManager) isNil ifTrue:[ ^ nil ]. |
|
1762 |
||
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1763 |
aPackageID notNil ifTrue:[ |
2259
dfb8e835c7d3
added: #isResponsibleForPackage:
Claus Gittinger <cg@exept.de>
parents:
2241
diff
changeset
|
1764 |
"/ see if there is a package-specific manager |
2743 | 1765 |
(mgr := self managerForPackage:aPackageID) notNil ifTrue:[^ mgr]. |
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1766 |
|
2445 | 1767 |
"/ more or less obsolete now - I know which manager is to be used per package |
1768 |
"/ self availableManagers do:[:mgr | |
|
1769 |
"/ (mgr isResponsibleForPackage:aPackageID) ifTrue:[^ mgr ]. |
|
1770 |
"/ ]. |
|
2259
dfb8e835c7d3
added: #isResponsibleForPackage:
Claus Gittinger <cg@exept.de>
parents:
2241
diff
changeset
|
1771 |
|
dfb8e835c7d3
added: #isResponsibleForPackage:
Claus Gittinger <cg@exept.de>
parents:
2241
diff
changeset
|
1772 |
"/ old stuff: see if there is a module-specific manager |
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1773 |
module := aPackageID upTo:$:. |
2225 | 1774 |
self availableManagers do:[:mgr | |
1775 |
(mgr isResponsibleForModule:module) ifTrue:[^ mgr ]. |
|
1776 |
] |
|
1777 |
]. |
|
1778 |
^ Smalltalk at:#SourceCodeManager |
|
2329
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1779 |
|
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1780 |
" |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1781 |
self sourceCodeManagerForPackage:'stx:libbasic'. |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1782 |
self sourceCodeManagerForPackage:'stx:libboss'. |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1783 |
self managerForMatchingModule:'stx:libba*' put:SVNSourceCodeManager. |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1784 |
self sourceCodeManagerForPackage:'stx:libbasic'. |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1785 |
self sourceCodeManagerForPackage:'stx:libboss'. |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1786 |
" |
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1787 |
|
2fc2fbd7a63c
per package-id-match repository managers
Claus Gittinger <cg@exept.de>
parents:
2324
diff
changeset
|
1788 |
"Modified: / 18-04-2011 / 19:53:03 / cg" |
2743 | 1789 |
"Modified: / 23-01-2012 / 19:44:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2225 | 1790 |
! |
1791 |
||
2649 | 1792 |
supportsCheckinLogMessages |
1793 |
"true, if log-messages are supported" |
|
1794 |
||
1795 |
^ true |
|
1796 |
||
1797 |
"Created: / 21-12-2011 / 18:02:34 / cg" |
|
1798 |
! |
|
1799 |
||
2527
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1800 |
versionMethodKeyword |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1801 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1802 |
"Answers the keyword used by the version management system to |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1803 |
expand a current version in a file (_without_ dollars). For |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1804 |
CVS it is 'Header', for SVN 'Id', others may use different |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1805 |
keywords. If nil is returned, then the version management does |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1806 |
not use any keyword." |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1807 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1808 |
"/TODO: Now, 'Header' is returned for backward compatibility. In future |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1809 |
"/it should be changed to self subclassResponsibility |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1810 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1811 |
^'Header' |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1812 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1813 |
"Created: / 27-09-2011 / 14:52:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1814 |
! |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1815 |
|
2476 | 1816 |
versionMethodTemplateForJavaScript |
1817 |
^ self versionMethodTemplateForJavaScriptFor:(self nameOfVersionMethodInClasses) |
|
1818 |
||
1819 |
" |
|
1820 |
CVSSourceCodeManager versionMethodTemplateForJavaScript |
|
1821 |
" |
|
1822 |
||
1823 |
"Created: / 19-08-2011 / 01:20:28 / cg" |
|
1824 |
! |
|
1825 |
||
1826 |
versionMethodTemplateForJavaScriptFor:aSelector |
|
1827 |
"do not make the thing below a single string - otherwise |
|
1828 |
it would get expanded by the sourcecodemanager, which we do not want here" |
|
1829 |
||
1830 |
^ |
|
1831 |
'function ',aSelector,'() { |
|
1832 |
return "$' , 'Header' , '$" |
|
1833 |
}' |
|
1834 |
||
1835 |
"Created: / 19-08-2011 / 01:20:56 / cg" |
|
1836 |
! |
|
1837 |
||
2199 | 1838 |
versionMethodTemplateForRuby |
1839 |
^ self versionMethodTemplateForRubyFor:(self nameOfVersionMethodInClasses) |
|
1840 |
||
1841 |
" |
|
1842 |
CVSSourceCodeManager versionMethodTemplateForRuby |
|
1843 |
" |
|
1844 |
! |
|
1845 |
||
1846 |
versionMethodTemplateForRubyFor:aSelector |
|
2476 | 1847 |
"do not make the thing below a single string - otherwise |
1848 |
it would get expanded by the sourcecodemanager, which we do not want here" |
|
1849 |
||
2199 | 1850 |
^ |
1851 |
'def self.',aSelector,'() |
|
2527
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1852 |
return "$' , self versionMethodKeyword , '$" |
2199 | 1853 |
end' |
2476 | 1854 |
|
1855 |
"Modified (comment): / 19-08-2011 / 01:19:40 / cg" |
|
2527
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1856 |
"Modified: / 27-09-2011 / 16:46:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2199 | 1857 |
! |
1858 |
||
1859 |
versionMethodTemplateForSmalltalk |
|
1860 |
^ self versionMethodTemplateForSmalltalkFor:(self nameOfVersionMethodInClasses) |
|
1861 |
||
1862 |
" |
|
1863 |
CVSSourceCodeManager versionMethodTemplateForSmalltalk |
|
1864 |
" |
|
1865 |
! |
|
1866 |
||
1867 |
versionMethodTemplateForSmalltalkFor:aSelector |
|
2476 | 1868 |
"do not make the thing below a single string - otherwise |
1869 |
it would get expanded by the sourcecodemanager, which we do not want here" |
|
1870 |
||
2199 | 1871 |
^ |
1872 |
aSelector,' |
|
2527
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1873 |
^ ''$', self versionMethodKeyword , '$'' |
2199 | 1874 |
' |
2476 | 1875 |
|
1876 |
"Modified (comment): / 19-08-2011 / 01:19:08 / cg" |
|
2527
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
1877 |
"Modified: / 27-09-2011 / 16:46:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1893 | 1878 |
! ! |
1879 |
||
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
1880 |
!AbstractSourceCodeManager class methodsFor:'source code access'! |
95 | 1881 |
|
2654
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1882 |
basicCheckinClass:aClass fileName:classFileName directory:packageDir module:moduleDir logMessage:logMessage force:force |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1883 |
"low level checkin of a class into the source repository. Does not deal with anz version method updates, |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1884 |
only does the checkin, using a temporary file. |
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
1885 |
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
|
1886 |
|
2851
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
1887 |
^ self |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
1888 |
withClass:aClass |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
1889 |
classFileName:classFileName |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
1890 |
filedOutToTemporaryFileDo:[:tempFile | |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
1891 |
self |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
1892 |
checkinClass:aClass |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
1893 |
fileName:classFileName |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
1894 |
directory:packageDir |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
1895 |
module:moduleDir |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
1896 |
source:(tempFile name) |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
1897 |
logMessage:logMessage |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
1898 |
force:force. |
114
bb18f2290ec6
dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents:
112
diff
changeset
|
1899 |
]. |
71 | 1900 |
|
1901 |
" |
|
1902 |
SourceCodeManager checkinClass:Array |
|
1903 |
" |
|
1904 |
||
2654
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1905 |
"Modified: / 25-09-1997 / 12:16:00 / stefan" |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1906 |
"Created: / 21-12-2011 / 19:30:06 / cg" |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1907 |
! |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1908 |
|
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1909 |
checkinClass:aClass fileName:classFileName directory:packageDir module:moduleDir logMessage:logMessage |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1910 |
"checkin of a class into the source repository. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1911 |
Return true if ok, false if not." |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1912 |
|
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1913 |
^ self |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1914 |
checkinClass:aClass |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1915 |
fileName:classFileName |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1916 |
directory:packageDir |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1917 |
module:moduleDir |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1918 |
logMessage:logMessage |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1919 |
force:false |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1920 |
|
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1921 |
"Modified: 11.9.1996 / 16:15:43 / cg" |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1922 |
! |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1923 |
|
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1924 |
checkinClass:aClass fileName:classFileName directory:packageDir module:moduleDir logMessage:logMessage force:force |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1925 |
"checkin of a class into the source repository. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1926 |
Return true if ok, false if not." |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1927 |
|
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1928 |
|className answer allLabel allValue |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1929 |
nameOfVersionMethodInClasses| |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1930 |
|
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1931 |
className := aClass name. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1932 |
nameOfVersionMethodInClasses := self nameOfVersionMethodInClasses. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1933 |
|
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1934 |
aClass revision isNil ifTrue:[ |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1935 |
force ifFalse:[ |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1936 |
('CVSSourceCodeManager [warning]: class ' , className, ' has no revision string') errorPrintCR. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1937 |
|
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1938 |
AbortAllOperationWantedQuery query ifTrue:[ |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1939 |
allLabel := #('Cancel All'). |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1940 |
allValue := #(cancelAll). |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1941 |
] ifFalse:[ |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1942 |
allLabel := #(). |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1943 |
allValue := #(). |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1944 |
]. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1945 |
|
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1946 |
((aClass theMetaclass includesSelector:#version) |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1947 |
or:[aClass theMetaclass includesSelector: nameOfVersionMethodInClasses]) ifTrue:[ |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1948 |
answer := OptionBox |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1949 |
request:('Class %1 has no (usable) revision string.\\Check in as newest ?' bindWith:className allBold) withCRs |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1950 |
label:'Confirm' |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1951 |
buttonLabels:(allLabel , #('Cancel' 'CheckIn')) |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1952 |
values:(allValue , #(false #checkIn)) |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1953 |
default:#checkIn. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1954 |
] ifFalse:[ |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1955 |
answer := OptionBox |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1956 |
request:('Class %1 has no revision string.\\Check in as newest ?' bindWith:className allBold) withCRs |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1957 |
label:'Confirm' |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1958 |
buttonLabels:(allLabel , #('Cancel' 'CheckIn' 'Create & CheckIn')) |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1959 |
values:(allValue , #(false #checkIn #create)) |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1960 |
default:#create. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1961 |
]. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1962 |
answer == false ifTrue:[ AbortSignal raise. ^ false ]. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1963 |
answer == #cancelAll ifTrue:[ AbortAllSignal raise. ^ false ]. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1964 |
answer == #create ifTrue:[ |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1965 |
self updateVersionMethodOf:aClass for:'$' , 'Header' , '$'. "/ concatenated to avoid RCS expansion |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1966 |
]. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1967 |
] |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1968 |
]. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1969 |
|
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1970 |
"Ensure that the method #version_XXX is present before checking in XXX. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1971 |
It will be missing when checking in classes with only the old method #version" |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1972 |
"/ this is wrong - it would add the SVN-id as CVS id... |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1973 |
"/ (aClass theMetaclass includesSelector: nameOfVersionMethodInClasses) ifFalse: [ |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1974 |
"/ versionAsKnownBefore := aClass revisionString. "/ looks in the old version (non-repository based) |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1975 |
"/ |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1976 |
"/ self |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1977 |
"/ compileVersionMethod:nameOfVersionMethodInClasses |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1978 |
"/ of:aClass |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1979 |
"/ for:(versionAsKnownBefore ? ('$' , 'Header' , '$')). "/ concatenated to avoid RCS expansion |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1980 |
"/ ]. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1981 |
|
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1982 |
^ self basicCheckinClass:aClass fileName:classFileName directory:packageDir module:moduleDir logMessage:logMessage force:force. |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1983 |
|
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1984 |
" |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1985 |
SourceCodeManager checkinClass:Array |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1986 |
" |
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1987 |
|
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
1988 |
"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
|
1989 |
"Modified: / 25-09-1997 / 12:16:00 / stefan" |
2654
6cb5bc656e8c
added: #basicCheckinClass:fileName:directory:module:logMessage:force:
Claus Gittinger <cg@exept.de>
parents:
2649
diff
changeset
|
1990 |
"Modified: / 21-12-2011 / 19:30:38 / cg" |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1991 |
! |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1992 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1993 |
checkinClass:aClass logMessage:logMessage |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1994 |
"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
|
1995 |
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
|
1996 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1997 |
|sourceInfo packageDir moduleDir classFileName| |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1998 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
1999 |
sourceInfo := self sourceInfoOfClass:aClass. |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2000 |
sourceInfo isNil ifTrue:[ |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
2001 |
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
|
2002 |
^ false |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2003 |
]. |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2004 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2005 |
packageDir := self directoryFromSourceInfo:sourceInfo. |
179 | 2006 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
2007 |
classFileName := self containerFromSourceInfo:sourceInfo. |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2008 |
|
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2009 |
^ self |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2010 |
checkinClass:aClass |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2011 |
fileName:classFileName |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2012 |
directory:packageDir |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2013 |
module:moduleDir |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2014 |
logMessage:logMessage |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2015 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2016 |
|
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2017 |
" |
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2018 |
SourceCodeManager checkinClass:Array logMessage:'foo' |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2019 |
" |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2020 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2021 |
"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
|
2022 |
"Modified: / 29-08-2006 / 12:46:28 / cg" |
71 | 2023 |
! |
2024 |
||
1780 | 2025 |
getFile:fileName revision:revision directory:packageDir module:moduleDir |
2026 |
|s contents| |
|
2027 |
||
2028 |
s := self |
|
2029 |
streamForFile:fileName |
|
2030 |
revision:revision |
|
2031 |
directory:packageDir |
|
2032 |
module:moduleDir. |
|
2033 |
s isNil ifTrue:[^ nil]. |
|
2034 |
contents := s contentsOfEntireFile. |
|
2035 |
s close. |
|
2036 |
^ contents |
|
2037 |
||
2038 |
" |
|
2039 |
SourceCodeManager |
|
2040 |
getFile:'Make.spec' |
|
2041 |
revision:#newest |
|
2042 |
directory:'libbasic2' |
|
2043 |
module:'stx' |
|
2044 |
" |
|
2045 |
||
2046 |
"Created: / 29-08-2006 / 15:47:08 / cg" |
|
2047 |
! |
|
2048 |
||
493
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
2049 |
getMostRecentSourceStreamForClassNamed:aClassName |
472 | 2050 |
"given a class, return an open stream to its most recent source |
2051 |
(not knowing anything about its version). |
|
2052 |
Used when autoloading classes." |
|
2053 |
||
745
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
2054 |
^ self |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
2055 |
getMostRecentSourceStreamForClassNamed:aClassName |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
2056 |
inPackage:nil |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
2057 |
! |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
2058 |
|
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
2059 |
getMostRecentSourceStreamForClassNamed:aClassName inPackage:forcedPackage |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
2060 |
"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
|
2061 |
(not knowing anything about its version). |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
2062 |
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
|
2063 |
recent found in the repostitory. |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
2064 |
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
|
2065 |
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
|
2066 |
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
|
2067 |
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
|
2068 |
|
1205 | 2069 |
|cls sourceInfo classFileName packageDir moduleDir s components i| |
71 | 2070 |
|
133 | 2071 |
cls := Smalltalk classNamed:aClassName. |
2072 |
cls notNil ifTrue:[ |
|
2073 |
sourceInfo := self sourceInfoOfClass:cls. |
|
2074 |
]. |
|
2075 |
sourceInfo notNil ifTrue:[ |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2076 |
packageDir := self directoryFromSourceInfo:sourceInfo. |
179 | 2077 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
2078 |
classFileName := self containerFromSourceInfo:sourceInfo. |
|
133 | 2079 |
] ifFalse:[ |
1838 | 2080 |
classFileName := (Smalltalk fileNameForClass:aClassName), '.st'. |
133 | 2081 |
packageDir := Smalltalk sourceDirectoryNameOfClass:aClassName. |
769 | 2082 |
packageDir notNil ifTrue:[ |
2083 |
(packageDir startsWith:'stx/') ifTrue:[ |
|
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
2084 |
"this is a backward compatibility leftover - will vanish" |
769 | 2085 |
packageDir := packageDir copyFrom:5. |
2086 |
] ifFalse:[ |
|
2087 |
i := packageDir indexOf:$:. |
|
2088 |
i ~~ 0 ifTrue:[ |
|
2089 |
moduleDir := packageDir copyTo:i-1. |
|
2090 |
packageDir := packageDir copyFrom:i+1 |
|
2091 |
] |
|
2092 |
] |
|
744 | 2093 |
]. |
769 | 2094 |
moduleDir isNil ifTrue:[ |
2095 |
moduleDir := 'stx' |
|
2096 |
]. |
|
133 | 2097 |
]. |
2098 |
||
2099 |
packageDir isNil ifTrue:[ |
|
745
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
2100 |
forcedPackage isNil ifTrue:[ |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
2101 |
'SourceCodeManager [warning]: could not extract packageDir' errorPrintCR. |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
2102 |
^ nil |
a17a530bb089
fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
2103 |
]. |
1777
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
2104 |
moduleDir := forcedPackage asPackageId module. |
9ae57293c00f
sourceCache organized as package-hierarchy to prevent
Claus Gittinger <cg@exept.de>
parents:
1729
diff
changeset
|
2105 |
packageDir := forcedPackage asPackageId directory. |
133 | 2106 |
]. |
71 | 2107 |
|
557
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2108 |
s := self |
133 | 2109 |
streamForClass:nil |
2110 |
fileName:classFileName |
|
2111 |
revision:#newest |
|
2112 |
directory:packageDir |
|
2113 |
module:moduleDir |
|
557
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2114 |
cache:false. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2115 |
|
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2116 |
s isNil ifTrue:[ |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2117 |
"/ guessed moduleDir ? |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2118 |
|
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2119 |
sourceInfo isNil ifTrue:[ |
1417
2707849f626a
No need to use Filename>>#concreteClass
Stefan Vogel <sv@exept.de>
parents:
1392
diff
changeset
|
2120 |
components := Filename components:packageDir. |
557
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2121 |
moduleDir := components first. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2122 |
packageDir := (Filename fromComponents:(components copyFrom:2)) asString. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2123 |
s := self |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2124 |
streamForClass:nil |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2125 |
fileName:classFileName |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2126 |
revision:#newest |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2127 |
directory:packageDir |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2128 |
module:moduleDir |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2129 |
cache:false. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2130 |
] |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2131 |
]. |
8466accf9276
if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents:
550
diff
changeset
|
2132 |
^ s. |
71 | 2133 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2134 |
"Created: / 12-10-1996 / 17:22:54 / cg" |
1838 | 2135 |
"Modified: / 06-10-2006 / 16:17:33 / cg" |
71 | 2136 |
! |
2137 |
||
1594 | 2138 |
getMostRecentSourceStreamForFile:aFileName inPackage:aPackage |
2139 |
"given a filename, return an open stream to its most recent contents |
|
2140 |
(not knowing anything about its version). |
|
2141 |
Used when autoloading extensions or to compare a classes source with the most |
|
2142 |
recent found in the repostitory." |
|
2143 |
||
1780 | 2144 |
|directory module| |
1594 | 2145 |
|
2146 |
module := aPackage asPackageId module. |
|
2147 |
directory := aPackage asPackageId directory. |
|
2148 |
||
1780 | 2149 |
^ self |
2150 |
streamForFile:aFileName |
|
1594 | 2151 |
revision:#newest |
2152 |
directory:directory |
|
1780 | 2153 |
module:module. |
2154 |
||
2155 |
"Created: / 12-10-1996 / 17:22:54 / cg" |
|
2156 |
"Modified: / 29-08-2006 / 15:49:02 / cg" |
|
1594 | 2157 |
! |
2158 |
||
493
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
2159 |
getSourceStreamFor:aClass |
58 | 2160 |
"extract a classes source code and return an open readStream on it. |
2161 |
The classes source code is extracted using the revision and the sourceCodeInfo, |
|
2162 |
which itself is extracted from the classes packageString." |
|
2163 |
||
493
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
2164 |
^ self getSourceStreamFor:aClass revision:nil |
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
2165 |
|
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
2166 |
"Created: 12.10.1996 / 17:21:03 / cg" |
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
2167 |
"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
|
2168 |
! |
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
2169 |
|
493
ec81df138d8f
had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents:
482
diff
changeset
|
2170 |
getSourceStreamFor:aClass revision:aRevisionStringOrNil |
83
250202dc956e
added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents:
77
diff
changeset
|
2171 |
"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
|
2172 |
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
|
2173 |
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
|
2174 |
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
|
2175 |
|
2543
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2176 |
|classFileName binaryRevision revision revisionUsed |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2177 |
packageDir moduleDir sourceInfo revForMeOrNil| |
58 | 2178 |
|
943 | 2179 |
aRevisionStringOrNil == #newest ifTrue:[ |
2180 |
^ self getMostRecentSourceStreamForClassNamed:(aClass theNonMetaclass name). |
|
2181 |
]. |
|
2182 |
||
2543
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2183 |
(revisionUsed := aRevisionStringOrNil) isNil ifTrue:[ |
2510
45b4c466a799
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2505
diff
changeset
|
2184 |
revision := aClass revisionOfManager:self. |
2543
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2185 |
binaryRevision := aClass binaryRevision. |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2186 |
binaryRevision isNil ifTrue:[ |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2187 |
revision isNil ifTrue:[ |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2188 |
('SourceCodeManager [warning]: class "%1" has no revision string' bindWith:aClass name) infoPrintCR. |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2189 |
^ nil. |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2190 |
]. |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2191 |
revisionUsed := revision |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2192 |
] ifFalse:[ |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2193 |
"/ see if this is a versionString for me (i.e. if I can extract my version string from it) |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2194 |
revForMeOrNil := self revisionInfoFromString:aClass binaryRevisionString. |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2195 |
revForMeOrNil isNil ifTrue:[ |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2196 |
revision isNil ifTrue:[ |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2197 |
('SourceCodeManager [info]: binary revision "%3" of "%1" is not for %4 - cannot extract version' |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2198 |
bindWith:aClass name |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2199 |
with:revision with:binaryRevision |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2200 |
with:self name) infoPrintCR. |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2201 |
] ifFalse:[ |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2202 |
('SourceCodeManager [info]: binary revision "%3" of "%1" is not for %4 - trusting revision %2' |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2203 |
bindWith:aClass name |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2204 |
with:revision with:binaryRevision |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2205 |
with:self name) infoPrintCR. |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2206 |
]. |
2546
be9e1b778210
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2543
diff
changeset
|
2207 |
^ nil |
2543
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2208 |
] ifFalse:[ |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2209 |
revision ~= binaryRevision ifTrue:[ |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2210 |
('SourceCodeManager [info]: "%1" has %4-revision (%2) vs. binary revision (%3) - trusting binaryRevision' |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2211 |
bindWith:aClass name |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2212 |
with:revision with:binaryRevision |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2213 |
with:self name) infoPrintCR. |
2547
ccb236fb305e
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2546
diff
changeset
|
2214 |
"/ self halt. |
2543
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2215 |
]. |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2216 |
revisionUsed := binaryRevision. |
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2217 |
]. |
179 | 2218 |
] |
58 | 2219 |
]. |
2220 |
||
95 | 2221 |
sourceInfo := self sourceInfoOfClass:aClass. |
1066
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
2222 |
sourceInfo isNil ifTrue:[ |
2238
76eca50b4734
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2232
diff
changeset
|
2223 |
('SourceCodeManager [warning]: no sourceInfo for class "%1"' bindWith:aClass name) infoPrintCR. |
1066
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
2224 |
^ nil |
683643ad5544
better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents:
1060
diff
changeset
|
2225 |
]. |
58 | 2226 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2227 |
packageDir := self directoryFromSourceInfo:sourceInfo. |
179 | 2228 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
2229 |
classFileName := self containerFromSourceInfo:sourceInfo. |
|
58 | 2230 |
^ self |
179 | 2231 |
streamForClass:aClass |
2232 |
fileName:classFileName |
|
2543
fee92873f0c6
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2530
diff
changeset
|
2233 |
revision:revisionUsed |
179 | 2234 |
directory:packageDir |
2235 |
module:moduleDir |
|
2236 |
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
|
2237 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2238 |
"Created: / 12-10-1996 / 17:21:52 / cg" |
2547
ccb236fb305e
changed: #getSourceStreamFor:revision:
Claus Gittinger <cg@exept.de>
parents:
2546
diff
changeset
|
2239 |
"Modified: / 29-09-2011 / 22:02:55 / cg" |
1780 | 2240 |
! |
2241 |
||
2225 | 2242 |
loadPackageWithId: aPackageId fromRepositoryAsAutoloaded: doLoadAsAutoloaded |
2243 |
||
2226
eab85424d4ff
changed: #loadPackageWithId:fromRepositoryAsAutoloaded:
fm
parents:
2225
diff
changeset
|
2244 |
"Should be redefined by sub classes. |
eab85424d4ff
changed: #loadPackageWithId:fromRepositoryAsAutoloaded:
fm
parents:
2225
diff
changeset
|
2245 |
Return true if loaded, false otherwise." |
eab85424d4ff
changed: #loadPackageWithId:fromRepositoryAsAutoloaded:
fm
parents:
2225
diff
changeset
|
2246 |
|
eab85424d4ff
changed: #loadPackageWithId:fromRepositoryAsAutoloaded:
fm
parents:
2225
diff
changeset
|
2247 |
^ false |
2225 | 2248 |
! |
2249 |
||
1780 | 2250 |
streamForFile:fileName revision:revision directory:packageDir module:moduleDir |
2251 |
^ self |
|
2252 |
streamForClass:nil |
|
2253 |
fileName:fileName |
|
2254 |
revision:revision |
|
2255 |
directory:packageDir |
|
2256 |
module:moduleDir |
|
2257 |
cache:true |
|
2258 |
||
2259 |
" |
|
2260 |
SourceCodeManager |
|
2261 |
streamForFile:'Make.spec' |
|
2262 |
revision:#newest |
|
2263 |
directory:'libbasic2' |
|
2264 |
module:'stx' |
|
2265 |
" |
|
2266 |
||
2267 |
"Created: / 29-08-2006 / 15:41:43 / cg" |
|
2851
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2268 |
! |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2269 |
|
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2270 |
withClass:aClass classFileName:classFileName filedOutToTemporaryFileDo:aBlock |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2271 |
"helper. fileout and eval aBlock" |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2272 |
|
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2273 |
|tempDir tempFile ok packageMode filter| |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2274 |
|
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2275 |
packageMode := self checkMethodPackagesOf:aClass. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2276 |
packageMode == #base ifTrue:[ |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2277 |
filter := [:mthd | mthd package = aClass package]. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2278 |
]. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2279 |
|
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2280 |
tempDir := Filename newTemporaryDirectory. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2281 |
ok := false. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2282 |
[ |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2283 |
|aStream| |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2284 |
|
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2285 |
tempFile := tempDir construct:classFileName. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2286 |
[ |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2287 |
aStream := tempFile writeStream. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2288 |
] on:FileStream openErrorSignal do:[:ex| |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2289 |
self reportError:('temporary fileout failed'). |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2290 |
^ false |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2291 |
]. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2292 |
|
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2293 |
Method flushSourceStreamCache. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2294 |
Class fileOutErrorSignal handle:[:ex | |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2295 |
aStream close. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2296 |
self reportError:('fileout failed (',ex description,')'). |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2297 |
^ false |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2298 |
] do:[ |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2299 |
self |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2300 |
fileOutSourceCodeOf:aClass |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2301 |
on:aStream |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2302 |
withTimeStamp:false |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2303 |
withInitialize:true |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2304 |
withDefinition:true |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2305 |
methodFilter:filter. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2306 |
]. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2307 |
aStream close. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2308 |
|
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2309 |
tempFile exists ifFalse:[ |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2310 |
self reportError:'temporary fileout failed'. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2311 |
^ false. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2312 |
]. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2313 |
ok := aBlock value:tempFile |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2314 |
] ensure:[ |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2315 |
tempDir recursiveRemove |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2316 |
]. |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2317 |
^ ok |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2318 |
|
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2319 |
" |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2320 |
SourceCodeManager checkinClass:Array |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2321 |
" |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2322 |
|
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2323 |
"Modified: / 25-09-1997 / 12:16:00 / stefan" |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2324 |
"Modified: / 20-08-2011 / 14:52:01 / cg" |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
2325 |
"Created: / 25-07-2012 / 19:38:23 / cg" |
58 | 2326 |
! ! |
2327 |
||
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
2328 |
!AbstractSourceCodeManager class methodsFor:'source code administration'! |
59
3bb0b97dffa2
reorganized; shared methods into AbstractSCMMgr
Claus Gittinger <cg@exept.de>
parents:
58
diff
changeset
|
2329 |
|
2173 | 2330 |
ensureDollarsInVersionMethod:aString |
2331 |
"given the source code of my version method, ensure that it contains dollars for |
|
2332 |
proper keyword expansion" |
|
2333 |
||
2191 | 2334 |
|versionString| |
2335 |
||
2336 |
versionString := aString copyWithout: $§. |
|
2337 |
^ self ensureKeywordExpansionWith: $$ inVersionMethod:versionString. |
|
2338 |
||
2339 |
" |
|
2340 |
self ensureDollarsInVersionMethod:'foo ^ ''hello'' ' |
|
2341 |
self ensureDollarsInVersionMethod:'foo ^ ''§hello§'' ' |
|
2342 |
self ensureDollarsInVersionMethod:'foo ^ '' hello '' ' |
|
2227
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
2343 |
self ensureDollarsInVersionMethod:'foo ^ ''$','Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.228 2009/10/20 09:55:58 fm Exp $'' ' |
2191 | 2344 |
-- errors: |
2345 |
self ensureDollarsInVersionMethod:'foo ^ ''$Head'' ' |
|
2346 |
self ensureDollarsInVersionMethod:'foo ^ ''Header$'' ' |
|
2347 |
" |
|
2348 |
! |
|
2349 |
||
2527
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2350 |
ensureKeyword: keyword inVersionMethod: source |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2351 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2352 |
| startQuote endQuote doubleColon | |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2353 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2354 |
"/nil keyword means that given source code management system |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2355 |
"/does not expand keywords (StORE or Monticello, for example) |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2356 |
keyword isNil ifTrue:[ |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2357 |
^source. |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2358 |
]. |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2359 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2360 |
startQuote := source indexOf: $'. |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2361 |
startQuote == 0 ifTrue:[ |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2362 |
self error:'Does not seem to be a valid version method source. Invalid source?' |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2363 |
]. |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2364 |
(source at: startQuote + 1) == $$ ifFalse:[ |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2365 |
self error:'Does not seem to be a valid version method source. Invalid source?' |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2366 |
]. |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2367 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2368 |
endQuote := source lastIndexOf: $'. |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2369 |
startQuote == endQuote ifTrue:[ |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2370 |
self error:'Does not seem to be a valid version method source. Invalid source?' |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2371 |
]. |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2372 |
(source at: endQuote - 1) == $$ ifFalse:[ |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2373 |
self error:'Does not seem to be a valid version method source. Invalid source?' |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2374 |
]. |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2375 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2376 |
doubleColon := source indexOf: $: startingAt: startQuote + 2. |
2763
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
2377 |
"/ There may be no double colon at all, if the version method |
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
2378 |
"/ is fresh, like 'dollar-Header-dollar' (no real dollar here, as cvs expands the string) |
2527
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2379 |
(doubleColon == 0 or:[doubleColon > endQuote]) ifTrue:[ |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2380 |
doubleColon := endQuote - 1. |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2381 |
]. |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2382 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2383 |
(source copyFrom: startQuote + 2 to: doubleColon - 1) = keyword ifTrue:[ |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2384 |
"/ Good, desired keyword is already there |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2385 |
^source |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2386 |
]. |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2387 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2388 |
^(source copyTo: startQuote + 1) , keyword , (source copyFrom: doubleColon) |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2389 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2390 |
"Created: / 27-09-2011 / 15:00:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2763
38380a8ec471
added: #isExtensionsVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2762
diff
changeset
|
2391 |
"Modified (comment): / 26-01-2012 / 14:52:19 / cg" |
2527
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2392 |
! |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2393 |
|
2191 | 2394 |
ensureKeywordExpansionWith: aCharacter inVersionMethod:aString |
2395 |
"given the source code of my version method, ensure that it contains aCharacter for |
|
2396 |
proper keyword expansion" |
|
2397 |
||
2173 | 2398 |
|indexOfFirstQuote indexOfNextAfterFirstQuote indexOfSecondDollar indexOfNextAfterSecondDollar indexOfLastQuote| |
2399 |
||
2400 |
indexOfFirstQuote := aString indexOf:$'. |
|
2401 |
indexOfFirstQuote == 0 ifTrue:[ |
|
2402 |
"/ no ' found - mhmh is this a valid version method's source ? |
|
2403 |
^ aString |
|
2404 |
]. |
|
2405 |
indexOfNextAfterFirstQuote := aString indexOfNonSeparatorStartingAt:indexOfFirstQuote+1. |
|
2191 | 2406 |
(aString at:indexOfNextAfterFirstQuote) = aCharacter ifTrue:[ |
2407 |
indexOfSecondDollar := aString indexOf:aCharacter startingAt:indexOfNextAfterFirstQuote+1. |
|
2173 | 2408 |
((indexOfSecondDollar == 0) |
2409 |
or:[ indexOfNextAfterSecondDollar := aString indexOfNonSeparatorStartingAt:indexOfSecondDollar+1. |
|
2410 |
(aString at:indexOfNextAfterSecondDollar) ~= $' |
|
2411 |
]) ifTrue:[ |
|
2412 |
self error:'invalid source (no valid version method string)' |
|
2413 |
]. |
|
2414 |
"/ fine |
|
2415 |
^ aString |
|
2416 |
]. |
|
2417 |
||
2418 |
indexOfLastQuote := aString lastIndexOf:$'. |
|
2419 |
||
2420 |
^ (aString copyTo:indexOfFirstQuote) |
|
2191 | 2421 |
, aCharacter asString |
2173 | 2422 |
,(aString copyFrom:indexOfFirstQuote+1 to:indexOfLastQuote-1) |
2191 | 2423 |
,aCharacter asString ,(aString copyFrom:indexOfLastQuote) |
2173 | 2424 |
|
2425 |
" |
|
2191 | 2426 |
self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''hello'' ' |
2427 |
self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ '' hello '' ' |
|
2428 |
self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''§Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.218 2009/10/07 12:12:30 fm Exp §'' ' |
|
2429 |
||
2430 |
self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''hello'' ' |
|
2431 |
self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ '' hello '' ' |
|
2227
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
2432 |
self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''$','Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.228 2009/10/20 09:55:58 fm Exp $'' ' |
2191 | 2433 |
|
2173 | 2434 |
-- errors: |
2191 | 2435 |
self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''§Head'' ' |
2436 |
self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''Header§'' ' |
|
2173 | 2437 |
" |
2438 |
! |
|
2439 |
||
2527
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2440 |
ensureKeywordInVersionMethod: source |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2441 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2442 |
^self ensureKeyword: self versionMethodKeyword inVersionMethod: source |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2443 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2444 |
"Created: / 27-09-2011 / 14:50:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2445 |
! |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
2446 |
|
2173 | 2447 |
ensureNoDollarsInVersionMethod:aString |
2448 |
"given the source code of another manager's version method, ensure that it does NOT |
|
2191 | 2449 |
contain dollars and add $§ instead, to avoid that CVS expands keywords in it" |
2450 |
||
2451 |
|versionString| |
|
2452 |
||
2453 |
versionString := aString copyWithout: $$. |
|
2454 |
^ self ensureKeywordExpansionWith: $§ inVersionMethod:versionString. |
|
2173 | 2455 |
|
2456 |
" |
|
2227
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
2457 |
self ensureNoDollarsInVersionMethod:'foo ^ ''$','Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.228 2009/10/20 09:55:58 fm Exp $'' ' |
355f0bf86adc
changed: #compileVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2226
diff
changeset
|
2458 |
self ensureNoDollarsInVersionMethod:'foo ^ ''$','Head'' ' |
2173 | 2459 |
self ensureNoDollarsInVersionMethod:'foo ^ ''Header$'' ' |
2191 | 2460 |
self ensureNoDollarsInVersionMethod:'foo ^ ''§Header§'' ' |
2461 |
||
2462 |
-- errors: |
|
2463 |
||
2464 |
self ensureNoDollarsInVersionMethod:'foo ^ ''§Header'' ' |
|
2465 |
self ensureNoDollarsInVersionMethod:'foo ^ ''Header§'' ' |
|
2466 |
||
2173 | 2467 |
" |
2468 |
! |
|
2469 |
||
2838 | 2470 |
fileOutSourceCodeExtensions: extensions package: package on: stream |
2471 |
"File out extension methods for given package on stream. |
|
2472 |
Not programming-language safe - can handle smalltalk methods. |
|
2473 |
||
2474 |
NOTE: method body taken from |
|
2475 |
SourceCodeManagerUtilities>>checkinExtensionMethods:forPackage:withInfo: |
|
2476 |
CVS revision 1.240 |
|
2477 |
" |
|
2478 |
||
2479 |
| methodsSortedByName defClass | |
|
2480 |
||
2481 |
self withSourceRewriteHandlerDo:[ |
|
2482 |
stream nextPutAll:'"{ Package: '''. |
|
2483 |
stream nextPutAll:package asString. |
|
2484 |
stream nextPutAll:''' }"'; nextPutChunkSeparator; cr; cr. |
|
2485 |
||
2486 |
"/ s nextPutAll:(Smalltalk timeStamp). |
|
2487 |
"/ s nextPutChunkSeparator. |
|
2488 |
"/ s cr; cr. |
|
2489 |
||
2490 |
"/ sort them by name (to avoid conflict due to CVS merge) |
|
2491 |
methodsSortedByName := extensions asOrderedCollection. |
|
2492 |
methodsSortedByName sort:[:a :b | |
|
2493 |
|clsA clsB| |
|
2494 |
||
2495 |
clsA := a mclass name. |
|
2496 |
clsB := b mclass name. |
|
2497 |
clsA < clsB ifTrue:[ |
|
2498 |
true |
|
2499 |
] ifFalse:[ |
|
2500 |
clsA > clsB ifTrue:[ |
|
2501 |
false |
|
2502 |
] ifFalse:[ |
|
2503 |
a selector < b selector |
|
2504 |
] |
|
2505 |
] |
|
2506 |
]. |
|
2507 |
methodsSortedByName do:[:aMethod | |
|
2508 |
self assert: aMethod package = package. |
|
2509 |
self assert: aMethod programmingLanguage isSmalltalk. |
|
2510 |
aMethod mclass fileOutMethod:aMethod on:stream. |
|
2511 |
stream cr. |
|
2512 |
]. |
|
2513 |
||
2514 |
defClass := ProjectDefinition definitionClassForPackage:package. |
|
2515 |
defClass notNil ifTrue:[ |
|
2516 |
"/ make sure, an extensionVersion_XXX method is included... |
|
2517 |
"/ (notice: no need to support a secondary backward compatible non-manager related version method here) |
|
2518 |
(methodsSortedByName contains:[:aMethod | aMethod selector == self nameOfVersionMethodForExtensions]) ifFalse:[ |
|
2519 |
stream nextPutLine:('!!%1 class methodsFor:''documentation''!!' bindWith:defClass name). |
|
2520 |
stream cr. |
|
2521 |
stream nextChunkPut: |
|
2522 |
(self versionMethodTemplateForSmalltalkFor:(self nameOfVersionMethodForExtensions)). |
|
2523 |
stream space; nextPutChunkSeparator. |
|
2524 |
]. |
|
2525 |
]. |
|
2526 |
]. |
|
2527 |
||
2528 |
"Created: / 02-02-2012 / 15:30:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2529 |
! |
|
2530 |
||
2173 | 2531 |
fileOutSourceCodeOf:aClass on:aStream |
2532 |
||
2533 |
self withSourceRewriteHandlerDo:[ |
|
2534 |
aClass fileOutOn:aStream withTimeStamp:false. |
|
2535 |
]. |
|
2536 |
! |
|
2537 |
||
2380
d17747baf9e9
comment/format in: #fileOutSourceCodeOf:on:withTimeStamp:withInitialize:withDefinition:methodFilter:
Claus Gittinger <cg@exept.de>
parents:
2350
diff
changeset
|
2538 |
fileOutSourceCodeOf:aClass on:aStream |
d17747baf9e9
comment/format in: #fileOutSourceCodeOf:on:withTimeStamp:withInitialize:withDefinition:methodFilter:
Claus Gittinger <cg@exept.de>
parents:
2350
diff
changeset
|
2539 |
withTimeStamp:withTimeStamp withInitialize:withInitialize withDefinition:withDefinition |
d17747baf9e9
comment/format in: #fileOutSourceCodeOf:on:withTimeStamp:withInitialize:withDefinition:methodFilter:
Claus Gittinger <cg@exept.de>
parents:
2350
diff
changeset
|
2540 |
methodFilter:methodFilter |
2173 | 2541 |
|
2838 | 2542 |
| filter | |
2543 |
"JV@2012-02-02: Do not fileout extensionVersion methods, that one is filed out |
|
2544 |
when extensions are filed out." |
|
2545 |
(aClass inheritsFrom: ProjectDefinition) ifTrue:[ |
|
2546 |
filter := [:m| (methodFilter value: m) and:[m selector ~~ self nameOfVersionMethodForExtensions] ] |
|
2547 |
] ifFalse:[ |
|
2548 |
filter := methodFilter. |
|
2549 |
]. |
|
2550 |
||
2173 | 2551 |
self withSourceRewriteHandlerDo:[ |
2552 |
aClass fileOutOn:aStream |
|
2553 |
withTimeStamp:withTimeStamp |
|
2554 |
withInitialize:withInitialize |
|
2555 |
withDefinition:withDefinition |
|
2838 | 2556 |
methodFilter:filter. |
2173 | 2557 |
]. |
2838 | 2558 |
|
2559 |
"Modified: / 02-02-2012 / 15:53:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2173 | 2560 |
! |
2561 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2562 |
getExistingContainersInModule:aModule directory:aPackage |
677 | 2563 |
"{ Pragma: +optSpace }" |
2564 |
||
2565 |
"return a collection containing the names of existing containers" |
|
2566 |
||
2567 |
^ self subclassResponsibility |
|
2568 |
||
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2569 |
"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
|
2570 |
! |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2571 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2572 |
getExistingDirectoriesInModule:aModule |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2573 |
"{ Pragma: +optSpace }" |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2574 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2575 |
"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
|
2576 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2577 |
^ self subclassResponsibility |
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2578 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2579 |
"Created: / 23-08-2006 / 14:13:52 / cg" |
677 | 2580 |
! |
2581 |
||
676 | 2582 |
getExistingModules |
2583 |
"{ Pragma: +optSpace }" |
|
2584 |
||
2585 |
"return a collection containing the names of existing modules" |
|
2586 |
||
2587 |
^ self subclassResponsibility |
|
2588 |
||
2589 |
"Modified: / 29.1.1997 / 18:57:29 / cg" |
|
2590 |
"Created: / 20.5.1998 / 19:38:23 / cg" |
|
2591 |
! |
|
2592 |
||
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2593 |
initialRCSRevisionStringFor:aClass in:dir container:fileName |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2594 |
"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
|
2595 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2596 |
"/ do not make the string below into one string; |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2597 |
"/ 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
|
2598 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2599 |
|nm oldRev idx special| |
472 | 2600 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2601 |
nm := fileName. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2602 |
(nm endsWith:',v') ifTrue:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2603 |
nm := nm copyWithoutLast:2 |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2604 |
]. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2605 |
(nm endsWith:'.st') ifFalse:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2606 |
nm := nm , '.st' |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2607 |
]. |
122
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
2608 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2609 |
oldRev := aClass revisionString. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2610 |
special := ''. |
122
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
2611 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2612 |
oldRev notNil ifTrue:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2613 |
idx := oldRev lastIndexOf:$[. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2614 |
idx ~~ 0 ifTrue:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2615 |
idx := oldRev indexOf:$[ startingAt:idx+1. |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2616 |
idx ~~ 0 ifTrue:[ |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2617 |
special := ' ' , (oldRev copyFrom:idx). |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2618 |
] |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2619 |
] |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2620 |
]. |
122
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
2621 |
|
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
2622 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2623 |
^ '$' , 'Header: ' , dir , '/' , fileName , ',v $' |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2624 |
, special |
472 | 2625 |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2626 |
"Modified: 17.9.1996 / 15:57:15 / cg" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
2627 |
"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
|
2628 |
! |
4dd60cb14bc6
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
2629 |
|
2320
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2630 |
knownTagsAndRevisionsFor:aClass |
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2631 |
"retrieve a list of symbolic tags -> versionNr associations |
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2632 |
known for that class. |
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2633 |
I.e. which tags/symbolic versions exist, and which revision-nr is attached to it" |
2319 | 2634 |
|
2635 |
|log| |
|
2636 |
||
2637 |
log := aClass sourceCodeManager revisionLogOf:aClass fromRevision:nil toRevision:nil finishAfter:20. |
|
2638 |
log isNil ifTrue:[ |
|
2639 |
SourceCodeManagerError |
|
2640 |
raiseRequestWith:aClass |
|
2641 |
errorString: 'Could not fetch log (cvs connection error?)'. |
|
2642 |
^ #() |
|
2643 |
]. |
|
2827
f473f55da102
**** new version from Christian
Claus Gittinger <cg@exept.de>
parents:
2821
diff
changeset
|
2644 |
^ (log at:#symbolicNames ifAbsent:[ #() ]). |
2320
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2645 |
|
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2646 |
"Created: / 08-02-2011 / 10:18:00 / cg" |
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2647 |
! |
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2648 |
|
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2649 |
knownTagsFor:aClass |
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2650 |
"retrieve a list of symbolic tags known for that class. |
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2651 |
I.e. which tags/symbolic versions exist" |
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2652 |
|
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2653 |
|tagRevisionMapping| |
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2654 |
|
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2655 |
tagRevisionMapping := self knownTagsAndRevisionsFor:aClass. |
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2656 |
tagRevisionMapping isEmptyOrNil ifTrue:[^ tagRevisionMapping]. |
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2657 |
^ tagRevisionMapping keys |
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2658 |
|
82c54c399a28
added: #knownTagsAndRevisionsFor:
Claus Gittinger <cg@exept.de>
parents:
2319
diff
changeset
|
2659 |
"Modified: / 08-02-2011 / 10:18:34 / cg" |
2319 | 2660 |
! |
2661 |
||
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2662 |
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
|
2663 |
"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
|
2664 |
Return nil on failure." |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2665 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2666 |
|log| |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2667 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2668 |
log := self |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2669 |
revisionLogOf:nil |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2670 |
fromRevision:0 |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2671 |
toRevision:0 |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2672 |
fileName:classFileName |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2673 |
directory:packageDir |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2674 |
module:moduleDir. |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2675 |
|
460
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2676 |
log isNil ifTrue:[^ nil]. |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2677 |
^ 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
|
2678 |
|
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2679 |
" |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2680 |
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
|
2681 |
" |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2682 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2683 |
"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
|
2684 |
! |
06d089e12054
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
2685 |
|
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2686 |
newestRevisionLogEntryOf:aClass |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2687 |
"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
|
2688 |
Return nil on failure." |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2689 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2690 |
^ 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
|
2691 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2692 |
" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2693 |
SourceCodeManager newestRevisionLogEntryOf:Array |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2694 |
SourceCodeManager newestRevisionLogEntryOf:Connection |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2695 |
" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2696 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2697 |
"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
|
2698 |
"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
|
2699 |
! |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2700 |
|
207
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
2701 |
newestRevisionOf:aClass |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
2702 |
"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
|
2703 |
Return nil on failure." |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
2704 |
|
1205 | 2705 |
|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
|
2706 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
2707 |
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
|
2708 |
sourceInfo isNil ifTrue:[^ nil]. |
207
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
2709 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
2710 |
packageDir := self directoryFromSourceInfo:sourceInfo. |
2485 | 2711 |
packageDir isNil ifTrue:[^ nil]. |
1005
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
2712 |
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
|
2713 |
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
|
2714 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
2715 |
^ 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
|
2716 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
2717 |
"/ |log| |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
2718 |
"/ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
980
diff
changeset
|
2719 |
"/ 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
|
2720 |
"/ 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
|
2721 |
"/ ^ log at:#newestRevision ifAbsent:nil |
207
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
2722 |
|
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
2723 |
" |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
2724 |
SourceCodeManager newestRevisionOf:Array |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
2725 |
SourceCodeManager newestRevisionOf:Connection |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
2726 |
" |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
2727 |
|
2485 | 2728 |
"Modified: / 20-08-2011 / 14:56:04 / cg" |
207
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
2729 |
! |
9366df6c32ea
added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
2730 |
|
2683
fb2a7157540a
added subclass reponsibility: #removeContainer:inModule:directory:
vrany
parents:
2668
diff
changeset
|
2731 |
removeContainer: container inModule: module directory: directory |
fb2a7157540a
added subclass reponsibility: #removeContainer:inModule:directory:
vrany
parents:
2668
diff
changeset
|
2732 |
"remove a container" |
fb2a7157540a
added subclass reponsibility: #removeContainer:inModule:directory:
vrany
parents:
2668
diff
changeset
|
2733 |
|
fb2a7157540a
added subclass reponsibility: #removeContainer:inModule:directory:
vrany
parents:
2668
diff
changeset
|
2734 |
^ self subclassResponsibility |
fb2a7157540a
added subclass reponsibility: #removeContainer:inModule:directory:
vrany
parents:
2668
diff
changeset
|
2735 |
|
fb2a7157540a
added subclass reponsibility: #removeContainer:inModule:directory:
vrany
parents:
2668
diff
changeset
|
2736 |
"Modified (comment): / 23-12-2011 / 19:03:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fb2a7157540a
added subclass reponsibility: #removeContainer:inModule:directory:
vrany
parents:
2668
diff
changeset
|
2737 |
! |
fb2a7157540a
added subclass reponsibility: #removeContainer:inModule:directory:
vrany
parents:
2668
diff
changeset
|
2738 |
|
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2739 |
revisionInfoFromRCSString:aString |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2740 |
"{ Pragma: +optSpace }" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2741 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2742 |
"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
|
2743 |
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
|
2744 |
|
2030
ed856e774120
versionInfo migrates from Dictionary to an object proper
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
2745 |
^ CVSVersionInfo fromRCSString:aString. |
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2746 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2747 |
" |
968 | 2748 |
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
|
2749 |
SourceCodeManager revisionInfoFromString:(SourceCodeManager version) |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2750 |
" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2751 |
|
2030
ed856e774120
versionInfo migrates from Dictionary to an object proper
Claus Gittinger <cg@exept.de>
parents:
1980
diff
changeset
|
2752 |
"Modified: / 22-10-2008 / 20:18:58 / cg" |
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2753 |
! |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2754 |
|
2842
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2755 |
revisionInfoFromStandardVersionString:aString |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2756 |
"{ Pragma: +optSpace }" |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2757 |
|
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2758 |
"return a VersionInfo object filled with revision info. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2759 |
This extracts the relevant info from aString which is in the format as created |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2760 |
by standardRevisionStringFor:...." |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2761 |
|
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2762 |
|info path version user ts timeStamp idx1 idx2| |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2763 |
|
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2764 |
"/ 'Path: stx/libbasic/Array.st, Version: 123, User: cg, Time: 2011-12-21T21:03:08.826' |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2765 |
|
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2766 |
idx1 := aString indexOfSubCollection:'Path: '. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2767 |
idx1 ~~ 0 ifTrue:[ |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2768 |
idx1 := idx1 + 'Path: ' size. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2769 |
idx2 := aString indexOfSubCollection:', ' startingAt:idx1. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2770 |
path := aString copyFrom:idx1 to:idx2-1. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2771 |
]. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2772 |
idx1 := aString indexOfSubCollection:'Version: '. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2773 |
idx1 ~~ 0 ifTrue:[ |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2774 |
idx1 := idx1 + 'Version: ' size. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2775 |
idx2 := aString indexOfSubCollection:', ' startingAt:idx1. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2776 |
idx2 == 0 ifTrue:[ |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2777 |
version := aString copyFrom:idx1 |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2778 |
] ifFalse:[ |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2779 |
version := aString copyFrom:idx1 to:idx2-1. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2780 |
]. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2781 |
]. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2782 |
idx1 := aString indexOfSubCollection:'User: '. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2783 |
idx1 ~~ 0 ifTrue:[ |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2784 |
idx1 := idx1 + 'User: ' size. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2785 |
idx2 := aString indexOfSubCollection:', ' startingAt:idx1. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2786 |
idx2 == 0 ifTrue:[ |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2787 |
user := aString copyFrom:idx1 |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2788 |
] ifFalse:[ |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2789 |
user := aString copyFrom:idx1 to:idx2-1. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2790 |
]. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2791 |
]. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2792 |
idx1 := aString indexOfSubCollection:'Time: '. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2793 |
idx1 ~~ 0 ifTrue:[ |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2794 |
idx1 := idx1 + 'Time: ' size. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2795 |
idx2 := aString indexOfSubCollection:', ' startingAt:idx1. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2796 |
idx2 == 0 ifTrue:[ |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2797 |
ts := aString copyFrom:idx1 |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2798 |
] ifFalse:[ |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2799 |
ts := aString copyFrom:idx1 to:idx2-1. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2800 |
]. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2801 |
timeStamp := Timestamp readIso8601FormatFrom:ts |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2802 |
]. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2803 |
|
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2804 |
info := VersionInfo new. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2805 |
path notNil ifTrue:[ info fileName:(path asFilename baseName) ]. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2806 |
info revision:version. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2807 |
user notNil ifTrue:[ info user:user ]. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2808 |
timeStamp notNil ifTrue:[ info timeStamp:timeStamp ]. |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2809 |
^ info |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2810 |
|
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2811 |
" |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2812 |
self revisionInfoFromString:'Path: stx/libbasic/Array.st, Version: 123, User: cg, Time: 2011-12-21T21:03:08.826' |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2813 |
" |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2814 |
|
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2815 |
"Created: / 23-07-2012 / 18:45:41 / cg" |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2816 |
! |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
2817 |
|
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2818 |
revisionInfoFromString:aString |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2819 |
"{ Pragma: +optSpace }" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2820 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2821 |
"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
|
2822 |
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
|
2823 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2824 |
^ self subclassResponsibility |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2825 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2826 |
"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
|
2827 |
"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
|
2828 |
! |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
2829 |
|
2552
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
2830 |
revisionInfoFromString: vsnString inClass: class |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
2831 |
|
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
2832 |
^self revisionInfoFromString: vsnString |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
2833 |
|
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
2834 |
"Modified: / 03-10-2011 / 13:05:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
2835 |
! |
a7095d9ae297
- more subclassReponsibilities to AbstractSourceCodeManager
vrany
parents:
2550
diff
changeset
|
2836 |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2837 |
revisionLogOf:aClass |
95 | 2838 |
"return info about the repository container and |
2839 |
the revisionlog as a collection of revision entries. |
|
2840 |
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
|
2841 |
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
|
2842 |
filled with: |
1863 | 2843 |
#container -> the RCS container file name |
2844 |
#filename -> the actual source file name |
|
2845 |
#newestRevision -> the revisionString of the newest revision |
|
2846 |
#numberOfRevisions -> the number of revisions in the container |
|
2847 |
#revisions -> collection of per-revision info |
|
2848 |
||
2849 |
per revision info consists of one record per revision: |
|
2850 |
||
2851 |
#revision -> the revision string |
|
2852 |
#author -> who checked that revision into the repository |
|
2853 |
#date -> when was it checked in |
|
2854 |
#state -> the RCS state |
|
2855 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
|
2856 |
||
2857 |
revisions are ordered newest first |
|
2858 |
(i.e. the last entry is for the initial revision; the first for the most recent one) |
|
2859 |
" |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2860 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2861 |
^ self |
1863 | 2862 |
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
|
2863 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2864 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2865 |
SourceCodeManager revisionLogOf:Array |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2866 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2867 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2868 |
"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
|
2869 |
"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
|
2870 |
! |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2871 |
|
110 | 2872 |
revisionLogOf:aClass fromRevision:rev1 |
2873 |
"return info about the repository container and |
|
2874 |
(part of) the revisionlog as a collection of revision entries. |
|
2875 |
Return nil on failure. |
|
2876 |
||
2877 |
The returned information is a structure (IdentityDictionary) |
|
2878 |
filled with: |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2879 |
#container -> the RCS container file name |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2880 |
#filename -> the actual source file name |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2881 |
#newestRevision -> the revisionString of the newest revision |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2882 |
#numberOfRevisions -> the number of revisions in the container |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2883 |
#revisions -> collection of per-revision info (see below) |
110 | 2884 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2885 |
for some classes, additional info is returned: |
110 | 2886 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2887 |
#renamed -> true if the class has been renamed or copied |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2888 |
and the sourceInfo is from the previous one |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2889 |
#expectedFileName -> the filename we would expect (i.e. for the new class) |
110 | 2890 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2891 |
rev1 specifies from which revisions a logEntry is wanted: |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2892 |
If rev1 is nil, the first revision is the initial revision |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2893 |
otherwise, the log starts with that revision. |
110 | 2894 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2895 |
per revision info consists of one record per revision: |
110 | 2896 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2897 |
#revision -> the revision string |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2898 |
#author -> who checked that revision into the repository |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2899 |
#date -> when was it checked in |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2900 |
#state -> the RCS state |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2901 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
110 | 2902 |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2903 |
revisions are ordered newest first |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2904 |
(i.e. the last entry is for the initial revision; |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2905 |
the first for the most recent one) |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2906 |
" |
110 | 2907 |
|
2908 |
^ self revisionLogOf:aClass fromRevision:rev1 toRevision:nil |
|
2909 |
||
2910 |
" |
|
2911 |
SourceCodeManager revisionLogOf:Array fromRevision:'1.40' |
|
2912 |
" |
|
2913 |
||
2914 |
"Created: 6.11.1995 / 18:56:00 / cg" |
|
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2915 |
"Modified: 10.1.1997 / 13:29:50 / cg" |
110 | 2916 |
! |
2917 |
||
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2918 |
revisionLogOf:aClass fromRevision:rev1 toRevision:rev2 |
95 | 2919 |
"return info about the repository container and |
2920 |
(part of) the revisionlog as a collection of revision entries. |
|
2921 |
Return nil on failure. |
|
2922 |
||
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2923 |
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
|
2924 |
filled with: |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2925 |
#container -> the RCS container file name |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2926 |
#filename -> the actual source file name |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2927 |
#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
|
2928 |
#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
|
2929 |
#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
|
2930 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2931 |
for some classes, additional info is returned: |
96 | 2932 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2933 |
#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
|
2934 |
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
|
2935 |
#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
|
2936 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2937 |
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
|
2938 |
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
|
2939 |
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
|
2940 |
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
|
2941 |
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
|
2942 |
If both are nil, no logEntries are extracted (i.e. only the header). |
96 | 2943 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2944 |
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
|
2945 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2946 |
#revision -> the revision string |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2947 |
#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
|
2948 |
#date -> when was it checked in |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2949 |
#state -> the RCS state |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2950 |
#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
|
2951 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
2952 |
revisions are ordered newest first |
534
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2953 |
(i.e. the last entry is for the initial revision; |
73fc19a1169e
commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
2954 |
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
|
2955 |
" |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
2956 |
|
2052
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2957 |
^ self |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2958 |
revisionLogOf:aClass fromRevision:rev1 toRevision:rev2 |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2959 |
finishAfter:nil |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2960 |
! |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2961 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2962 |
revisionLogOf:aClass fromRevision:rev1 toRevision:rev2 finishAfter:maxCountOrNil |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2963 |
"return info about the repository container and |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2964 |
(part of) the revisionlog as a collection of revision entries. |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2965 |
Return nil on failure. |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2966 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2967 |
The returned information is a structure (IdentityDictionary) |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2968 |
filled with: |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2969 |
#container -> the RCS container file name |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2970 |
#filename -> the actual source file name |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2971 |
#newestRevision -> the revisionString of the newest revision |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2972 |
#numberOfRevisions -> the number of revisions in the container |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2973 |
#revisions -> collection of per-revision info (see below) |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2974 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2975 |
for some classes, additional info is returned: |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2976 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2977 |
#renamed -> true if the class has been renamed or copied |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2978 |
and the sourceInfo is from the previous one |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2979 |
#expectedFileName -> the filename we would expect (i.e. for the new class) |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2980 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2981 |
rev1 / rev2 specify from which revisions a logEntry is wanted: |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2982 |
If rev1 is nil, the first revision is the initial revision |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2983 |
otherwise, the log starts with that revision. |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2984 |
If rev2 is nil, the last revision is the newest revision |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2985 |
otherwise, the log ends with that revision. |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2986 |
If both are nil, no logEntries are extracted (i.e. only the header). |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2987 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2988 |
per revision info consists of one record per revision: |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2989 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2990 |
#revision -> the revision string |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2991 |
#author -> who checked that revision into the repository |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2992 |
#date -> when was it checked in |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2993 |
#state -> the RCS state |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2994 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2995 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2996 |
revisions are ordered newest first |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2997 |
(i.e. the last entry is for the initial revision; |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2998 |
the first for the most recent one) |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
2999 |
" |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3000 |
|
501 | 3001 |
|sourceInfo packageDir moduleDir classFileName info| |
95 | 3002 |
|
3003 |
sourceInfo := self sourceInfoOfClass:aClass. |
|
3004 |
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
|
3005 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
3006 |
packageDir := self directoryFromSourceInfo:sourceInfo. |
179 | 3007 |
moduleDir := self moduleFromSourceInfo:sourceInfo. "/ use the modules name as CVS module |
3008 |
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
|
3009 |
|
96 | 3010 |
info := self |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
3011 |
revisionLogOf:aClass |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
3012 |
fromRevision:rev1 |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
3013 |
toRevision:rev2 |
2052
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3014 |
numberOfRevisions:maxCountOrNil |
179 | 3015 |
fileName:classFileName |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
3016 |
directory:packageDir |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
3017 |
module:moduleDir. |
96 | 3018 |
|
3019 |
info notNil ifTrue:[ |
|
179 | 3020 |
"/ (sourceInfo includesKey:#renamed) ifTrue:[ |
3021 |
"/ info at:#renamed put:(sourceInfo at:#renamed) |
|
3022 |
"/ ]. |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
3023 |
(sourceInfo includesKey:#expectedFileName) ifTrue:[ |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
3024 |
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
|
3025 |
] |
96 | 3026 |
]. |
3027 |
^ info |
|
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
3028 |
|
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
3029 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
3030 |
SourceCodeManager revisionLogOf:Array fromRevision:'1.40' toRevision:'1.43' |
96 | 3031 |
SourceCodeManager revisionLogOf:XtBoxNew |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
3032 |
" |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
3033 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
3034 |
"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
|
3035 |
"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
|
3036 |
! |
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
3037 |
|
935
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3038 |
revisionLogOf:aClass numberOfRevisions:numRevisions |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3039 |
"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
|
3040 |
(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
|
3041 |
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
|
3042 |
Return nil on failure. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3043 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3044 |
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
|
3045 |
filled with: |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3046 |
#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
|
3047 |
#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
|
3048 |
#newestRevision -> the revisionString of the newest revision |
1069 | 3049 |
#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
|
3050 |
#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
|
3051 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3052 |
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
|
3053 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3054 |
#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
|
3055 |
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
|
3056 |
#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
|
3057 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3058 |
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
|
3059 |
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
|
3060 |
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
|
3061 |
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
|
3062 |
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
|
3063 |
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
|
3064 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3065 |
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
|
3066 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3067 |
#revision -> the revision string |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3068 |
#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
|
3069 |
#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
|
3070 |
#state -> the RCS state |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3071 |
#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
|
3072 |
#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
|
3073 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3074 |
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
|
3075 |
(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
|
3076 |
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
|
3077 |
" |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3078 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3079 |
|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
|
3080 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3081 |
sourceInfo := self sourceInfoOfClass:aClass. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3082 |
sourceInfo isNil ifTrue:[^ nil]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3083 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
3084 |
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
|
3085 |
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
|
3086 |
classFileName := self containerFromSourceInfo:sourceInfo. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3087 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3088 |
info := self |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3089 |
revisionLogOf:aClass |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3090 |
numberOfRevisions:numRevisions |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3091 |
fileName:classFileName |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3092 |
directory:packageDir |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3093 |
module:moduleDir. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3094 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3095 |
info notNil ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3096 |
"/ (sourceInfo includesKey:#renamed) ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3097 |
"/ 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
|
3098 |
"/ ]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3099 |
(sourceInfo includesKey:#expectedFileName) ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3100 |
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
|
3101 |
] |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3102 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3103 |
^ info |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3104 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3105 |
" |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3106 |
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
|
3107 |
" |
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
3108 |
|
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
3109 |
"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
|
3110 |
! |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
928
diff
changeset
|
3111 |
|
2600
893edc47b308
copy-pasted method pushed up to AbstractSourceCodeManager
vrany
parents:
2592
diff
changeset
|
3112 |
revisionLogOf:clsOrNil numberOfRevisions:numRevisions fileName:classFileName directory:packageDir module:moduleDir |
893edc47b308
copy-pasted method pushed up to AbstractSourceCodeManager
vrany
parents:
2592
diff
changeset
|
3113 |
^ self |
893edc47b308
copy-pasted method pushed up to AbstractSourceCodeManager
vrany
parents:
2592
diff
changeset
|
3114 |
revisionLogOf:clsOrNil |
893edc47b308
copy-pasted method pushed up to AbstractSourceCodeManager
vrany
parents:
2592
diff
changeset
|
3115 |
fromRevision:nil |
893edc47b308
copy-pasted method pushed up to AbstractSourceCodeManager
vrany
parents:
2592
diff
changeset
|
3116 |
toRevision:nil |
893edc47b308
copy-pasted method pushed up to AbstractSourceCodeManager
vrany
parents:
2592
diff
changeset
|
3117 |
numberOfRevisions:numRevisions |
893edc47b308
copy-pasted method pushed up to AbstractSourceCodeManager
vrany
parents:
2592
diff
changeset
|
3118 |
fileName:classFileName |
893edc47b308
copy-pasted method pushed up to AbstractSourceCodeManager
vrany
parents:
2592
diff
changeset
|
3119 |
directory:packageDir |
893edc47b308
copy-pasted method pushed up to AbstractSourceCodeManager
vrany
parents:
2592
diff
changeset
|
3120 |
module:moduleDir |
893edc47b308
copy-pasted method pushed up to AbstractSourceCodeManager
vrany
parents:
2592
diff
changeset
|
3121 |
! |
893edc47b308
copy-pasted method pushed up to AbstractSourceCodeManager
vrany
parents:
2592
diff
changeset
|
3122 |
|
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3123 |
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
|
3124 |
"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
|
3125 |
(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
|
3126 |
Return nil on failure. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3127 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3128 |
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
|
3129 |
filled with: |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3130 |
#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
|
3131 |
#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
|
3132 |
#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
|
3133 |
#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
|
3134 |
#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
|
3135 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3136 |
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
|
3137 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3138 |
#revision -> the revision string |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3139 |
#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
|
3140 |
#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
|
3141 |
#state -> the RCS state |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3142 |
#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
|
3143 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3144 |
revisions are ordered newest first |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3145 |
(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
|
3146 |
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
|
3147 |
" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3148 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3149 |
^ self |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3150 |
revisionLogOf:nil |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3151 |
fromRevision:nil |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3152 |
toRevision:nil |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3153 |
fileName:classFileName |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3154 |
directory:packageDir |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3155 |
module:moduleDir |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3156 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3157 |
" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3158 |
CVSSourceCodeManager |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3159 |
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
|
3160 |
" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3161 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3162 |
"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
|
3163 |
! |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3164 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
3165 |
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
|
3166 |
"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
|
3167 |
(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
|
3168 |
Return nil on failure. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3169 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3170 |
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
|
3171 |
filled with: |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3172 |
#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
|
3173 |
#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
|
3174 |
#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
|
3175 |
#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
|
3176 |
#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
|
3177 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3178 |
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
|
3179 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3180 |
#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
|
3181 |
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
|
3182 |
#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
|
3183 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3184 |
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
|
3185 |
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
|
3186 |
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
|
3187 |
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
|
3188 |
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
|
3189 |
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
|
3190 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3191 |
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
|
3192 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3193 |
#revision -> the revision string |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3194 |
#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
|
3195 |
#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
|
3196 |
#state -> the RCS state |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3197 |
#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
|
3198 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3199 |
revisions are ordered newest first |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3200 |
(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
|
3201 |
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
|
3202 |
" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3203 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3204 |
|info| |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3205 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3206 |
info := self |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3207 |
revisionLogOf:nil |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3208 |
fromRevision:rev1 |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3209 |
toRevision:rev2 |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3210 |
fileName:fileName |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3211 |
directory:packageDir |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3212 |
module:moduleDir. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3213 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3214 |
^ info |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3215 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3216 |
" |
1980 | 3217 |
SourceCodeManager |
3218 |
revisionLogOfContainer:'Array.st' |
|
3219 |
module:'stx' |
|
3220 |
directory:'libbasic' |
|
3221 |
fromRevision:'1.1' |
|
3222 |
toRevision:nil |
|
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3223 |
" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3224 |
|
1663
12a85dc6e7ef
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1594
diff
changeset
|
3225 |
"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
|
3226 |
! |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
3227 |
|
213 | 3228 |
revisionsOf:aClass |
3229 |
"return a collection of revisions (as strings) found in the repository. |
|
3230 |
The most recent (newest) revision will be the first in the list. |
|
3231 |
Return nil on failure." |
|
3232 |
||
3233 |
|log revisions| |
|
3234 |
||
3235 |
log := self revisionLogOf:aClass. |
|
3236 |
log isNil ifTrue:[^ nil]. |
|
3237 |
revisions := log at:#revisions ifAbsent:nil. |
|
3238 |
revisions isNil ifTrue:[^ nil]. |
|
3239 |
^ revisions collect:[:rev | rev at:#revision]. |
|
3240 |
||
3241 |
" |
|
3242 |
SourceCodeManager revisionsOf:Array |
|
3243 |
SourceCodeManager newestRevisionOf:Array |
|
3244 |
" |
|
3245 |
||
3246 |
"Modified: 10.4.1996 / 23:14:24 / cg" |
|
3247 |
"Created: 19.4.1996 / 17:24:34 / cg" |
|
3248 |
! |
|
3249 |
||
2842
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3250 |
standardRevisionStringFor:aClass inModule:moduleDir directory:packageDir container:fileName revision:revisionString |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3251 |
"utility function: return a string usable as initial revision string" |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3252 |
|
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3253 |
^ 'Path: %1/%2/%3, Version: %4, User: %5, Time: %6' |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3254 |
bindWith:moduleDir |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3255 |
with:packageDir |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3256 |
with:fileName |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3257 |
with:revisionString |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3258 |
with:(OperatingSystem getLoginName) |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3259 |
with:(Timestamp now printStringIso8601Format) |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3260 |
|
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3261 |
" |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3262 |
self |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3263 |
revisionStringFor:Array |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3264 |
inModule:'stx' |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3265 |
directory:'libbasic' |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3266 |
container:'Array.st' |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3267 |
revision:'123' |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3268 |
" |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3269 |
|
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3270 |
"Created: / 23-07-2012 / 18:46:29 / cg" |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3271 |
! |
e707972b6af6
comment/format in: #createContainerFor:inModule:package:container:
Claus Gittinger <cg@exept.de>
parents:
2838
diff
changeset
|
3272 |
|
2173 | 3273 |
withSourceRewriteHandlerDo:aBlock |
2380
d17747baf9e9
comment/format in: #fileOutSourceCodeOf:on:withTimeStamp:withInitialize:withDefinition:methodFilter:
Claus Gittinger <cg@exept.de>
parents:
2350
diff
changeset
|
3274 |
"hook for just-in-time rewriting of a method's sourceCode while filing out |
d17747baf9e9
comment/format in: #fileOutSourceCodeOf:on:withTimeStamp:withInitialize:withDefinition:methodFilter:
Claus Gittinger <cg@exept.de>
parents:
2350
diff
changeset
|
3275 |
used when saving version_XXX methods in a non-XXX sourceCodeManager" |
2173 | 3276 |
|
3277 |
AbstractSourceFileWriter methodSourceRewriteQuery handle:[:rewriteQuery | |
|
3278 |
|m newSource | |
|
3279 |
||
3280 |
m := rewriteQuery method. |
|
3281 |
m isVersionMethod ifFalse:[ |
|
3282 |
rewriteQuery proceedWith:rewriteQuery source. |
|
3283 |
]. |
|
2380
d17747baf9e9
comment/format in: #fileOutSourceCodeOf:on:withTimeStamp:withInitialize:withDefinition:methodFilter:
Claus Gittinger <cg@exept.de>
parents:
2350
diff
changeset
|
3284 |
(m selector = self nameOfVersionMethodInClasses |
d17747baf9e9
comment/format in: #fileOutSourceCodeOf:on:withTimeStamp:withInitialize:withDefinition:methodFilter:
Claus Gittinger <cg@exept.de>
parents:
2350
diff
changeset
|
3285 |
or:[m selector = self nameOfVersionMethodForExtensions |
d17747baf9e9
comment/format in: #fileOutSourceCodeOf:on:withTimeStamp:withInitialize:withDefinition:methodFilter:
Claus Gittinger <cg@exept.de>
parents:
2350
diff
changeset
|
3286 |
or:[m selector = Class nameOfOldVersionMethod]]) ifTrue:[ |
2173 | 3287 |
"/ it's my version method - make sure that it has $'s around... |
3288 |
newSource := self ensureDollarsInVersionMethod:rewriteQuery source. |
|
2527
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
3289 |
(m selector = Class nameOfOldVersionMethod) ifTrue:[ |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
3290 |
"/ #version method: make sure that it contains proper |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
3291 |
"/ keyword (Header for CVS/P4, Id for SVN... |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
3292 |
newSource := self ensureKeywordInVersionMethod: newSource. |
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
3293 |
] |
2173 | 3294 |
] ifFalse:[ |
3295 |
"/ it's another manager's version method - make sure that it has NONONO $'s around... |
|
3296 |
newSource := self ensureNoDollarsInVersionMethod:rewriteQuery source. |
|
3297 |
]. |
|
3298 |
rewriteQuery proceedWith:newSource |
|
3299 |
] do:aBlock. |
|
2527
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
3300 |
|
a466b74c0db4
When rewriting #version method source, a keyword is also rewritten (CVS and SVN uses different keywords)
vrany
parents:
2510
diff
changeset
|
3301 |
"Modified: / 27-09-2011 / 16:48:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2173 | 3302 |
! |
3303 |
||
2100 | 3304 |
writeHistoryLogSince:timeGoal filterSTSources:filterSTSourcesBoolean 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
|
3305 |
"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
|
3306 |
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
|
3307 |
|
1784 | 3308 |
|projectFilter goalString prevUser prevCvsRoot | |
3309 |
||
3310 |
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
|
3311 |
|
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3312 |
goalString := ''. |
1784 | 3313 |
projectFilter notNil ifTrue:[ |
3314 |
projectFilter size == 1 ifTrue:[ |
|
3315 |
goalString := goalString , 'of ',projectFilter first. |
|
3316 |
] ifFalse:[ |
|
3317 |
projectFilter size == 2 ifTrue:[ |
|
3318 |
goalString := goalString , 'of ',projectFilter first,' and ',projectFilter second. |
|
3319 |
] ifFalse:[ |
|
3320 |
goalString := goalString , 'of ',projectFilter size printString,' projects'. |
|
3321 |
]. |
|
3322 |
]. |
|
3323 |
goalString := goalString,' ' |
|
3324 |
]. |
|
1447
2ac1cf09722b
isEmptyOrNil / notEmptyOrNil refactoring
Claus Gittinger <cg@exept.de>
parents:
1432
diff
changeset
|
3325 |
(timeGoal notEmptyOrNil) ifTrue:[ |
1784 | 3326 |
goalString := goalString , 'since ' , timeGoal,' '. |
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3327 |
]. |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3328 |
userFilter notNil ifTrue:[ |
1220 | 3329 |
userFilter isString ifTrue:[ |
1784 | 3330 |
goalString := 'by user ',userFilter |
1220 | 3331 |
] ifFalse:[ |
3332 |
userFilter size == 1 ifTrue:[ |
|
1784 | 3333 |
goalString := 'by user ',(userFilter first) |
1220 | 3334 |
] ifFalse:[ |
1784 | 3335 |
goalString := 'by users ',(userFilter first),'...',(userFilter last) |
1220 | 3336 |
] |
3337 |
]. |
|
1784 | 3338 |
goalString := goalString,' '. |
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3339 |
]. |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3340 |
|
1784 | 3341 |
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
|
3342 |
aStream cr. |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3343 |
|
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3344 |
self |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3345 |
reportHistoryLogSince:timeGoal |
2100 | 3346 |
filterSTSources:filterSTSourcesBoolean |
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3347 |
filterUser:userFilter |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3348 |
filterRepository:repositoryFilter |
1038 | 3349 |
filterModules:moduleFilter |
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3350 |
inTo:[:info | |
1784 | 3351 |
|user recordType fileName date time rev pkgDir |
3352 |
module directory pkg |
|
3353 |
clsName cvsRoot cls clsRev revInfo| |
|
3354 |
||
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3355 |
pkgDir := info at:#directory ifAbsent:'?'. |
1784 | 3356 |
module := pkgDir upTo:$/. |
3357 |
directory := pkgDir copyFrom:(module size+2). |
|
1910 | 3358 |
pkg := (PackageId module:module directory:directory) asString. |
1784 | 3359 |
|
3360 |
(projectFilter isEmptyOrNil |
|
3361 |
or:[ projectFilter includes:pkg ]) ifTrue:[ |
|
3362 |
||
3363 |
user := info at:#user ifAbsent:'?'. |
|
3364 |
recordType := info at:#cvsRecordType ifAbsent:'?'. |
|
3365 |
fileName := info at:#fileName ifAbsent:'?'. |
|
3366 |
date := info at:#date ifAbsent:'?'. |
|
3367 |
time := info at:#time ifAbsent:'?'. |
|
3368 |
rev := info at:#revision ifAbsent:'?'. |
|
3369 |
||
3370 |
clsName := info at:#className ifAbsent:'?'. |
|
3371 |
cvsRoot := info at:#cvsRoot ifAbsent:'?'. |
|
3372 |
||
3373 |
cvsRoot ~= prevCvsRoot ifTrue:[ |
|
3374 |
aStream cr. |
|
3375 |
aStream nextPutLine:'>>>> repository: ' , cvsRoot , ' <<<<'. |
|
3376 |
aStream cr; cr. |
|
3377 |
aStream nextPutLine:' Date Time User Rev File Package'. |
|
3378 |
prevUser := nil. |
|
3379 |
prevCvsRoot := cvsRoot. |
|
3380 |
]. |
|
3381 |
prevUser ~= user ifTrue:[ |
|
3382 |
aStream cr. |
|
3383 |
prevUser := user. |
|
3384 |
]. |
|
3385 |
aStream |
|
3386 |
nextPutAll:recordType; space; |
|
3387 |
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
|
3388 |
nextPutAll:(user leftPaddedTo:10); space; |
1784 | 3389 |
nextPutAll:(rev decimalPaddedTo:8 and:4 at:$. withLeft:(Character space) right:nil); tab; |
3390 |
nextPutAll:(fileName paddedTo:30); space; |
|
3391 |
nextPutAll:pkg. |
|
3392 |
||
3393 |
"/ |
|
3394 |
"/ for your convenience: |
|
3395 |
"/ check what the actual version is in the image |
|
3396 |
"/ |
|
3397 |
clsName notNil ifTrue:[ |
|
3398 |
revInfo := nil. |
|
3399 |
cls := Smalltalk classNamed:clsName. |
|
3400 |
(cls notNil and:[(clsRev := cls revision) notNil]) ifTrue:[ |
|
3401 |
rev ~= clsRev ifTrue:[ |
|
3402 |
revInfo := (' current: ' , clsRev) |
|
3403 |
] |
|
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3404 |
] ifFalse:[ |
1784 | 3405 |
cls isNil ifTrue:[ |
3406 |
revInfo := (' current: ** none **') |
|
1480 | 3407 |
] ifFalse:[ |
1784 | 3408 |
cls isLoaded ifTrue:[ |
3409 |
revInfo := (' current: ** no revision info **') |
|
3410 |
] ifFalse:[ |
|
3411 |
revInfo := (' current: ** not loaded **') |
|
3412 |
] |
|
3413 |
] |
|
3414 |
]. |
|
3415 |
revInfo notNil ifTrue:[ |
|
3416 |
aStream nextPutAll:revInfo |
|
3417 |
]. |
|
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3418 |
]. |
1784 | 3419 |
aStream cr |
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3420 |
]. |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3421 |
]. |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3422 |
|
1784 | 3423 |
"Created: / 12-09-2006 / 15:18:35 / cg" |
1910 | 3424 |
"Modified: / 18-11-2006 / 17:09:55 / cg" |
1784 | 3425 |
! |
3426 |
||
3427 |
writeHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter filterRepository:repositoryFilter filterModules:moduleFilter to:aStream |
|
3428 |
"send a full historyLog to some stream. |
|
3429 |
This walks over all possible repository roots." |
|
3430 |
||
3431 |
self |
|
3432 |
writeHistoryLogSince:timeGoal |
|
3433 |
filterSTSources:filter |
|
3434 |
filterUser:userFilter |
|
3435 |
filterRepository:repositoryFilter |
|
3436 |
filterModules:moduleFilter |
|
3437 |
filterProjects:nil |
|
3438 |
to:aStream |
|
3439 |
||
3440 |
"Modified: / 12-09-2006 / 15:19:11 / cg" |
|
1038 | 3441 |
! |
3442 |
||
3443 |
writeHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter filterRepository:repositoryFilter to:aStream |
|
3444 |
"send a full historyLog to some stream. |
|
3445 |
This walks over all possible repository roots." |
|
3446 |
||
3447 |
^self |
|
3448 |
writeHistoryLogSince:timeGoal |
|
3449 |
filterSTSources:filter |
|
3450 |
filterUser:userFilter |
|
3451 |
filterRepository:repositoryFilter |
|
3452 |
filterModules:nil to:aStream |
|
3453 |
||
3454 |
"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
|
3455 |
! |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3456 |
|
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3457 |
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
|
3458 |
"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
|
3459 |
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
|
3460 |
|
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3461 |
^ self |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3462 |
writeHistoryLogSince:timeGoal |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3463 |
filterSTSources:filter |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3464 |
filterUser:userFilter |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3465 |
filterRepository:nil |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3466 |
to:aStream |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3467 |
! |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3468 |
|
147 | 3469 |
writeHistoryLogSince:timeGoal filterSTSources:filter to:aStream |
472 | 3470 |
"send a repositories historyLog to some stream" |
3471 |
||
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3472 |
^ self |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3473 |
writeHistoryLogSince:timeGoal |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3474 |
filterSTSources:filter |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3475 |
filterUser:nil |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3476 |
filterRepository:nil |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3477 |
to:aStream |
147 | 3478 |
|
472 | 3479 |
"Modified: 12.9.1996 / 02:36:32 / cg" |
147 | 3480 |
! |
3481 |
||
3482 |
writeHistoryLogSince:timeGoal to:aStream |
|
472 | 3483 |
"send a repositories historyLog to some stream" |
3484 |
||
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3485 |
^ self |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3486 |
writeHistoryLogSince:timeGoal |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3487 |
filterSTSources:true |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3488 |
filterUser:nil |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3489 |
filterRepository:nil |
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3490 |
to:aStream |
147 | 3491 |
|
3492 |
"Created: 13.12.1995 / 10:28:27 / cg" |
|
472 | 3493 |
"Modified: 12.9.1996 / 02:36:38 / cg" |
147 | 3494 |
! |
3495 |
||
96 | 3496 |
writeRevisionLogMessagesFrom:log to:aStream |
3497 |
"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
|
3498 |
|
855
ba84e3e5572d
made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
853
diff
changeset
|
3499 |
^ 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
|
3500 |
|
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
3501 |
"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
|
3502 |
! |
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
3503 |
|
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
3504 |
writeRevisionLogMessagesFrom:log withHeader:header to:aStream |
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
3505 |
"helper; send the revisionlog to aStream" |
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
3506 |
|
1451 | 3507 |
|tags| |
3508 |
||
138
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
3509 |
header ifTrue:[ |
179 | 3510 |
"/ (log at:#renamed ifAbsent:false) ifTrue:[ |
3511 |
"/ aStream nextPutAll:' Class was probably renamed; revision info is from original class.'. |
|
3512 |
"/ aStream cr; nextPutAll:' You may have to create a new container for it.'. |
|
3513 |
"/ aStream cr; cr. |
|
3514 |
"/ ]. |
|
138
386f2d831989
optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents:
135
diff
changeset
|
3515 |
|
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
3516 |
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
|
3517 |
aStream nextPutAll:' Newest revision: '; nextPutLine:(log at:#newestRevision) printString. |
1451 | 3518 |
tags := log at:#symbolicNames ifAbsent:nil. |
3519 |
tags notNil ifTrue:[ |
|
3520 |
aStream nextPutAll:' Stable revision: '; nextPutAll:(tags at:'stable' ifAbsent:'none'); cr. |
|
3521 |
aStream nextPutAll:' Symbolic names: '; cr. |
|
3522 |
"sort tags by tag name" |
|
3523 |
tags := tags associations sort:[:a :b| a key < b key]. |
|
3524 |
tags do:[:eachAssociation| |
|
3525 |
aStream tab; nextPutAll:eachAssociation key; |
|
3526 |
nextPutAll:': '; |
|
3527 |
nextPutAll:eachAssociation value; cr. |
|
3528 |
] |
|
3529 |
]. |
|
96 | 3530 |
]. |
93
83042eccb8d1
revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
3531 |
|
2821
687ec021401e
changed: #writeRevisionLogMessagesFrom:withHeader:to:
Stefan Vogel <sv@exept.de>
parents:
2788
diff
changeset
|
3532 |
(log at:#revisions ifAbsent:#()) do:[:entry | |
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
3533 |
|logMsg| |
96 | 3534 |
|
127
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
3535 |
aStream cr. |
2668 | 3536 |
aStream nextPutAll:' revision '; |
3537 |
show:(entry at:#revision); tab. |
|
3538 |
aStream nextPutAll:' date: '; |
|
3539 |
show:((entry at:#date ifAbsent:nil) ? '?'); space; |
|
3540 |
show:((entry at:#time ifAbsent:nil) ? '?'); tab. |
|
3541 |
aStream nextPutAll:' author: '; |
|
3542 |
show:(entry at:#author ifAbsent:nil) ? '?'; tab. |
|
3543 |
aStream nextPutAll:' lines: '; |
|
3544 |
show:(entry at:#numberOfChangedLines ifAbsent:nil) ? '?'; cr. |
|
3545 |
||
3546 |
logMsg := entry at:#logMessage ifAbsent:''. |
|
1467 | 3547 |
(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
|
3548 |
logMsg := '*** empty log message ***' |
7686a4413407
more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents:
123
diff
changeset
|
3549 |
]. |
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
3550 |
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
|
3551 |
]. |
96 | 3552 |
|
2668 | 3553 |
"Created: / 16-11-1995 / 13:25:30 / cg" |
3554 |
"Modified: / 27-11-1996 / 18:26:30 / stefan" |
|
3555 |
"Modified: / 21-12-2011 / 23:33:53 / cg" |
|
73 | 3556 |
! |
3557 |
||
2052
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3558 |
writeRevisionLogOf:aClass fromRevision:rev1 toRevision:rev2 finishAfter:maxCount to:aStream |
73 | 3559 |
"extract a classes log and append it to aStream." |
3560 |
||
96 | 3561 |
|log | |
73 | 3562 |
|
2052
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3563 |
log := self revisionLogOf:aClass fromRevision:rev1 toRevision:rev2 finishAfter:maxCount. |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
3564 |
log isNil ifTrue:[ |
1024
7344e4e24b1c
missing repository-log message beautified
Claus Gittinger <cg@exept.de>
parents:
1021
diff
changeset
|
3565 |
aStream cr; nextPutAll:' ** No revision log available **'. |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
3566 |
^ false |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
3567 |
]. |
96 | 3568 |
|
3569 |
self writeRevisionLogMessagesFrom:log to:aStream. |
|
3570 |
^ true |
|
73 | 3571 |
|
3572 |
" |
|
77 | 3573 |
SourceCodeManager writeRevisionLogOf:Array fromRevision:'1.40' toRevision:'1.43' to:Transcript |
73 | 3574 |
" |
3575 |
||
3576 |
"Created: 6.11.1995 / 18:56:00 / cg" |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
537
diff
changeset
|
3577 |
"Modified: 14.2.1997 / 21:11:57 / cg" |
77 | 3578 |
! |
3579 |
||
2052
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3580 |
writeRevisionLogOf:aClass fromRevision:rev1 toRevision:rev2 to:aStream |
87 | 3581 |
"extract a classes log and append it to aStream." |
3582 |
||
3583 |
^ self |
|
2052
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3584 |
writeRevisionLogOf:aClass |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3585 |
fromRevision:rev1 toRevision:rev2 |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3586 |
finishAfter:nil to:aStream |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3587 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3588 |
" |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3589 |
SourceCodeManager writeRevisionLogOf:Array fromRevision:'1.40' toRevision:'1.43' to:Transcript |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3590 |
" |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3591 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3592 |
"Created: 6.11.1995 / 18:56:00 / cg" |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3593 |
"Modified: 14.2.1997 / 21:11:57 / cg" |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3594 |
! |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3595 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3596 |
writeRevisionLogOf:aClass short:shortOrNot to:aStream |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3597 |
"extract a classes log and append it to aStream." |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3598 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3599 |
^ self |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3600 |
writeRevisionLogOf:aClass |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3601 |
fromRevision:nil |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3602 |
toRevision:nil |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3603 |
finishAfter:(shortOrNot ifTrue:20 ifFalse:nil) |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3604 |
to:aStream |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3605 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3606 |
" |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3607 |
SourceCodeManager writeRevisionLogOf:Array to:Transcript |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3608 |
" |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3609 |
! |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3610 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3611 |
writeRevisionLogOf:aClass to:aStream |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3612 |
"extract a classes log and append it to aStream." |
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3613 |
|
61be9856344e
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2043
diff
changeset
|
3614 |
^ self writeRevisionLogOf:aClass short:false to:aStream |
77 | 3615 |
|
87 | 3616 |
" |
3617 |
SourceCodeManager writeRevisionLogOf:Array to:Transcript |
|
3618 |
" |
|
3619 |
! ! |
|
77 | 3620 |
|
1205 | 3621 |
!AbstractSourceCodeManager class methodsFor:'subclass responsibility'! |
3622 |
||
3623 |
reportHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter |
|
3624 |
filterRepository:repositoryFilter filterModules:moduleFilter inTo:aBlock |
|
3625 |
||
3626 |
^ self subclassResponsibility |
|
3627 |
! ! |
|
3628 |
||
1527 | 3629 |
!AbstractSourceCodeManager class methodsFor:'testing'! |
3630 |
||
3631 |
isCVS |
|
3632 |
^ false |
|
3633 |
||
3634 |
"Created: / 16-08-2006 / 10:58:27 / cg" |
|
3635 |
! |
|
3636 |
||
2786 | 3637 |
isGit |
3638 |
^ false |
|
3639 |
||
3640 |
"Created: / 02-03-2012 / 16:44:02 / cg" |
|
3641 |
! |
|
3642 |
||
2725 | 3643 |
isMercurial |
3644 |
^ false |
|
3645 |
||
3646 |
"Created: / 14-01-2012 / 21:54:19 / cg" |
|
3647 |
! |
|
3648 |
||
2199 | 3649 |
isSVN |
1527 | 3650 |
^ false |
3651 |
||
2199 | 3652 |
"Created: / 16-08-2006 / 10:58:27 / cg" |
1527 | 3653 |
! |
3654 |
||
1890 | 3655 |
isSmallTeam |
1889 | 3656 |
^ false |
3657 |
||
1890 | 3658 |
"Created: / 09-11-2006 / 14:30:22 / cg" |
1889 | 3659 |
! |
3660 |
||
1527 | 3661 |
isStore |
3662 |
^ false |
|
3663 |
||
3664 |
"Created: / 16-08-2006 / 10:59:26 / cg" |
|
3665 |
! ! |
|
3666 |
||
2445 | 3667 |
!AbstractSourceCodeManager::PackageAndManager class methodsFor:'instance creation'! |
3668 |
||
3669 |
package: package manager: manager |
|
3670 |
||
3671 |
^self new |
|
3672 |
package: package; |
|
3673 |
manager: manager. |
|
3674 |
||
3675 |
"Created: / 09-07-2011 / 13:58:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3676 |
! ! |
|
3677 |
||
3678 |
!AbstractSourceCodeManager::PackageAndManager methodsFor:'accessing'! |
|
3679 |
||
3680 |
manager |
|
3681 |
||
3682 |
^AbstractSourceCodeManager named: managerTypeName |
|
3683 |
||
3684 |
"Created: / 09-07-2011 / 13:52:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3685 |
! |
|
3686 |
||
3687 |
manager: aSourceCodeManager |
|
3688 |
||
3689 |
managerTypeName := aSourceCodeManager managerTypeName |
|
3690 |
||
3691 |
"Created: / 09-07-2011 / 13:59:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3692 |
! |
|
3693 |
||
3694 |
managerTypeName |
|
3695 |
^ managerTypeName |
|
3696 |
! |
|
3697 |
||
3698 |
managerTypeName:something |
|
3699 |
managerTypeName := something. |
|
3700 |
! |
|
3701 |
||
3702 |
package |
|
3703 |
^ package |
|
3704 |
! |
|
3705 |
||
3706 |
package:something |
|
3707 |
package := something. |
|
3708 |
! ! |
|
3709 |
||
2477 | 3710 |
!AbstractSourceCodeManager::PackageAndManager methodsFor:'comparing'! |
3711 |
||
3712 |
= aPackageAndManagerOrNil |
|
3713 |
aPackageAndManagerOrNil isNil ifTrue:[^ false]. |
|
3714 |
aPackageAndManagerOrNil package = package ifFalse:[^ false]. |
|
3715 |
aPackageAndManagerOrNil managerTypeName = managerTypeName ifFalse:[^ false]. |
|
3716 |
^ true |
|
3717 |
||
3718 |
"Created: / 19-08-2011 / 01:47:34 / cg" |
|
3719 |
! |
|
3720 |
||
3721 |
hash |
|
3722 |
^ package hash bitXor: managerTypeName hash |
|
3723 |
||
3724 |
"Created: / 19-08-2011 / 01:47:56 / cg" |
|
3725 |
! ! |
|
3726 |
||
2445 | 3727 |
!AbstractSourceCodeManager::PackageAndManager methodsFor:'displaying'! |
3728 |
||
3729 |
displayStringForManagerTypeName |
|
3730 |
^ self manager isNil |
|
3731 |
ifFalse:[ managerTypeName ] |
|
3732 |
ifTrue: |
|
3733 |
[ (managerTypeName , ' (unavailable)') asText colorizeAllWith:Color gray ]. |
|
3734 |
||
3735 |
"Created: / 09-07-2011 / 14:05:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3736 |
! |
|
3737 |
||
3738 |
displayStringForPackage |
|
3739 |
^ self manager isNil |
|
2638
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
3740 |
ifTrue:[ package asText colorizeAllWith:Color gray ] |
2445 | 3741 |
ifFalse:[ package ] |
3742 |
||
3743 |
"Created: / 09-07-2011 / 14:05:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2638
b987066502c4
added: #updateVersionMethod:of:for:
Claus Gittinger <cg@exept.de>
parents:
2634
diff
changeset
|
3744 |
"Modified: / 03-12-2011 / 11:31:49 / cg" |
2445 | 3745 |
! ! |
3746 |
||
2623
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3747 |
!AbstractSourceCodeManager::PackageAndManager methodsFor:'printing & storing'! |
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3748 |
|
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3749 |
printOn:aStream |
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3750 |
"append a printed representation if the receiver to the argument, aStream" |
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3751 |
|
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3752 |
super printOn:aStream. |
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3753 |
aStream nextPut: $(. |
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3754 |
package printOn:aStream. |
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3755 |
aStream nextPutAll:' -> '. |
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3756 |
managerTypeName printOn:aStream. |
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3757 |
aStream nextPut: $). |
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3758 |
|
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3759 |
"Modified: / 25-11-2011 / 18:35:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3760 |
! ! |
4ba16827aa35
added AbstractSourceCodeManager::PackageAndManager>>printOn:
vrany
parents:
2606
diff
changeset
|
3761 |
|
2445 | 3762 |
!AbstractSourceCodeManager::PackageAndManager methodsFor:'queries'! |
3763 |
||
3764 |
match: packageId |
|
3765 |
| manager | |
|
2606 | 3766 |
|
2445 | 3767 |
manager := self manager. |
2606 | 3768 |
manager isNil ifTrue:[^false]. |
3769 |
||
3770 |
^ (package match: packageId) |
|
2445 | 3771 |
and: [manager isResponsibleForPackage: packageId] |
3772 |
||
3773 |
" |
|
3774 |
self managerForModule:'stx:libbasic' |
|
3775 |
self managerForModule:'stx:libbasic2' |
|
3776 |
self managerForModule:'exept:expecco' |
|
3777 |
" |
|
3778 |
||
3779 |
"Created: / 09-07-2011 / 14:26:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2606 | 3780 |
"Modified (format): / 18-11-2011 / 14:07:53 / cg" |
2445 | 3781 |
! ! |
3782 |
||
513
10707a1c366f
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
507
diff
changeset
|
3783 |
!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
|
3784 |
|
2529
302c2c58caa7
changed: #isVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2528
diff
changeset
|
3785 |
version |
2916
259d582b2131
added: #isRevision:sameOrAfter:
Claus Gittinger <cg@exept.de>
parents:
2915
diff
changeset
|
3786 |
^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.298 2012-09-26 16:16:18 cg Exp $' |
2851
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
3787 |
! |
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
3788 |
|
3c62bf0dcacb
added: #withClass:classFileName:filedOutToTemporaryFileDo:
Claus Gittinger <cg@exept.de>
parents:
2842
diff
changeset
|
3789 |
version_CVS |
2916
259d582b2131
added: #isRevision:sameOrAfter:
Claus Gittinger <cg@exept.de>
parents:
2915
diff
changeset
|
3790 |
^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.298 2012-09-26 16:16:18 cg Exp $' |
2529
302c2c58caa7
changed: #isVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2528
diff
changeset
|
3791 |
! |
302c2c58caa7
changed: #isVersionMethodSelector:
Claus Gittinger <cg@exept.de>
parents:
2528
diff
changeset
|
3792 |
|
2838 | 3793 |
version_SVN |
3794 |
^ '§Id: AbstractSourceCodeManager.st 1925 2012-06-05 13:52:00Z vranyj1 §' |
|
123
9a1dff152656
dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents:
122
diff
changeset
|
3795 |
! ! |
1202 | 3796 |
|
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
148
diff
changeset
|
3797 |
AbstractSourceCodeManager initialize! |