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