author | Claus Gittinger <cg@exept.de> |
Wed, 08 May 2019 13:09:58 +0200 | |
changeset 4420 | 737b9f0a0022 |
parent 4400 | aeafd5d622d7 |
child 4516 | f5c862a086b3 |
permissions | -rw-r--r-- |
2848 | 1 |
" |
2 |
COPYRIGHT (c) 2012 eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
"{ Package: 'stx:libbasic3' }" |
|
13 |
||
3772
399ff1b46d41
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3651
diff
changeset
|
14 |
"{ NameSpace: Smalltalk }" |
399ff1b46d41
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3651
diff
changeset
|
15 |
|
2848 | 16 |
SourceCodeManagerUtilities subclass:#SourceCodeManagerUtilitiesForContainerBasedManagers |
17 |
instanceVariableNames:'' |
|
4202 | 18 |
classVariableNames:'' |
2848 | 19 |
poolDictionaries:'' |
20 |
category:'System-SourceCodeManagement' |
|
21 |
! |
|
22 |
||
23 |
!SourceCodeManagerUtilitiesForContainerBasedManagers class methodsFor:'documentation'! |
|
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 2012 eXept Software AG |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! ! |
|
38 |
||
39 |
!SourceCodeManagerUtilitiesForContainerBasedManagers methodsFor:'utilities-cvs'! |
|
40 |
||
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
41 |
checkinBuildSupportFilesForPackage:packageID withInfo:checkinInfo |
4277 | 42 |
^ self checkinBuildSupportFilesForPackage:packageID withInfo:checkinInfo onBranch:nil |
43 |
||
44 |
"Created: / 09-08-2006 / 18:59:42 / fm" |
|
45 |
"Modified: / 12-10-2011 / 11:36:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
46 |
"Modified: / 05-12-2017 / 20:31:34 / cg" |
|
47 |
! |
|
48 |
||
49 |
checkinBuildSupportFilesForPackage:packageID withInfo:checkinInfo onBranch:branchNameOrNil |
|
4333 | 50 |
|anyFailure module directory mgr defClass checkedInFiles| |
2848 | 51 |
|
52 |
mgr := self sourceCodeManagerFor: packageID. |
|
53 |
defClass := ProjectDefinition definitionClassForPackage: packageID. |
|
54 |
||
3141
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
55 |
"/ already done elsewhere now |
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
56 |
"/ defClass validateDescription. |
2848 | 57 |
|
58 |
anyFailure := false. |
|
4333 | 59 |
checkedInFiles := StringCollection new. |
2848 | 60 |
|
61 |
module := packageID asPackageId module. |
|
62 |
directory := packageID asPackageId directory. |
|
63 |
||
3819
7bf4e32e3685
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3772
diff
changeset
|
64 |
self activityNotification:(resources string:'Checking in build-support files...'). |
2848 | 65 |
(mgr checkForExistingModule:module directory:directory) ifFalse:[ |
66 |
mgr createModule:module directory:directory |
|
67 |
]. |
|
68 |
||
69 |
defClass forEachFileNameAndGeneratedContentsDo:[:fileName :fileContents | |
|
70 |
|realFileName realDirectory| |
|
71 |
||
72 |
"/ care for subdirectories |
|
73 |
(fileName includes:$/) ifTrue:[ |
|
74 |
realDirectory := (directory asFilename construct:(fileName asFilename directoryName)) name. |
|
75 |
realFileName := fileName asFilename baseName. |
|
76 |
] ifFalse:[ |
|
77 |
realDirectory := directory. |
|
78 |
realFileName := fileName. |
|
79 |
]. |
|
80 |
realDirectory := realDirectory replaceAll:$\ with:$/. |
|
81 |
||
3819
7bf4e32e3685
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3772
diff
changeset
|
82 |
self activityNotification:(resources string:'Checking in %1...' with:realFileName). |
2848 | 83 |
|
84 |
UserInformation |
|
85 |
handle:[:ex | Transcript showCR:ex description ] |
|
86 |
do:[ |
|
87 |
(mgr isContainerBased |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
88 |
and:[(mgr checkForExistingContainer:realFileName inModule:module directory:realDirectory) not] |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
89 |
) ifTrue:[ |
4282 | 90 |
"/ a new file |
2848 | 91 |
realDirectory ~= directory ifTrue:[ |
92 |
(mgr checkForExistingModule:module directory:realDirectory) ifFalse:[ |
|
93 |
mgr createModule:module directory:realDirectory |
|
94 |
]. |
|
95 |
]. |
|
3573
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
96 |
[:exit | |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
97 |
|answer| |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
98 |
|
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
99 |
(mgr |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
100 |
createContainerForText:fileContents |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
101 |
inModule:module |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
102 |
package:realDirectory |
4333 | 103 |
container:realFileName) ifTrue:[ |
104 |
"success" |
|
105 |
checkedInFiles add:fileName. |
|
106 |
exit value:nil |
|
107 |
]. |
|
3573
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
108 |
|
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
109 |
answer := Dialog |
4400 | 110 |
confirmWithRaiseAbortOnCancel:(resources |
3573
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
111 |
stringWithCRs:'Cannot create new container: ''%3'' (in %1:%2).\\Retry?' |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
112 |
with:module |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
113 |
with:realDirectory |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
114 |
with:realFileName). |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
115 |
|
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
116 |
answer == false ifTrue:[ exit value:nil ]. |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
117 |
] loopWithExit. |
2848 | 118 |
] ifFalse:[ |
4282 | 119 |
"/ an existing file |
2848 | 120 |
(mgr |
121 |
checkin:realFileName |
|
122 |
text:fileContents |
|
123 |
directory:realDirectory |
|
124 |
module:module |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
125 |
logMessage:checkinInfo logMessage |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
126 |
force:false |
4282 | 127 |
onBranch:branchNameOrNil |
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
128 |
) ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
129 |
checkinInfo isStable ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
130 |
self tagPath:(module, '/', realDirectory, '/', realFileName) as:#stable usingManager:mgr. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
131 |
]. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
132 |
checkinInfo tagIt ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
133 |
self tagPath:(module, '/', realDirectory, '/', realFileName) as:checkinInfo tag usingManager:mgr. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
134 |
]. |
4333 | 135 |
checkedInFiles add:fileName. |
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
136 |
] ifFalse:[ |
4400 | 137 |
Transcript showCR:'checkin of %1 failed' with:realFileName. |
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
138 |
anyFailure := true. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
139 |
]. |
2848 | 140 |
]. |
141 |
]. |
|
142 |
]. |
|
143 |
||
144 |
defClass instAndClassMethodsDo:[:m | m package:defClass package]. |
|
3991 | 145 |
[ |
146 |
self |
|
147 |
checkinClasses:(Array with:defClass) |
|
148 |
withInfo:checkinInfo |
|
149 |
withCheck:false |
|
150 |
usingManager:nil |
|
151 |
confirmNewContainer:false. |
|
152 |
] ifCurtailed:[ |
|
153 |
self activityNotification:'Checkin of build-support files aborted - see Transcript'. |
|
154 |
]. |
|
155 |
||
2848 | 156 |
anyFailure ifTrue:[ |
157 |
self warn:'Checkin failed - see Transcript.'. |
|
158 |
self activityNotification:'Checkin of build-support files failed - see Transcript.'. |
|
159 |
] ifFalse:[ |
|
4333 | 160 |
checkedInFiles isEmpty ifTrue:[ |
161 |
self activityNotification:'No build-support files were checked in.'. |
|
162 |
] ifFalse:[ |
|
163 |
self activityNotification:('Build-support files checked into the repository: %1.' bindWith:(checkedInFiles asStringWith:', ')). |
|
164 |
]. |
|
2848 | 165 |
]. |
166 |
||
4277 | 167 |
"Created: / 05-12-2017 / 20:31:18 / cg" |
4282 | 168 |
"Modified: / 05-12-2017 / 23:32:16 / cg" |
4400 | 169 |
"Modified: / 15-02-2019 / 09:36:53 / Claus Gittinger" |
2848 | 170 |
! |
171 |
||
172 |
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil |
|
173 |
"checkin a projects extensions into the source repository. |
|
174 |
If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message." |
|
175 |
||
4277 | 176 |
^ self checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil onBranch:nil |
177 |
||
178 |
"Modified: / 05-12-2017 / 20:13:21 / cg" |
|
179 |
! |
|
180 |
||
181 |
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil onBranch:branchNameOrNil |
|
182 |
"checkin a projects extensions into the source repository. |
|
183 |
If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message." |
|
184 |
||
3133 | 185 |
|logMessage checkinInfo mgr pri module directory containerFileName extensionsSource| |
2848 | 186 |
|
187 |
"/ the following is wrong - must ask the projectDefinition !! |
|
188 |
aPackageID asPackageId projectDefinitionClass notNil ifTrue:[ |
|
189 |
mgr := self sourceCodeManagerFor:aPackageID asPackageId projectDefinitionClass. |
|
190 |
] ifFalse:[ |
|
191 |
mgr := self sourceCodeManagerFor:aCollectionOfMethods first mclass. |
|
192 |
]. |
|
193 |
mgr isNil ifTrue:[ ^ false ]. |
|
194 |
||
195 |
module := aPackageID asPackageId module. |
|
196 |
directory := aPackageID asPackageId directory. |
|
197 |
containerFileName := self nameOfExtensionsContainer. |
|
198 |
||
199 |
aLogInfoOrStringOrNil isNil ifTrue:[ |
|
200 |
checkinInfo := self getCheckinInfoFor:containerFileName allBold initialAnswer:nil. |
|
201 |
checkinInfo isNil ifTrue:[^ false]. |
|
202 |
logMessage := checkinInfo logMessage. |
|
203 |
] ifFalse:[ |
|
204 |
aLogInfoOrStringOrNil isString ifTrue:[ |
|
205 |
logMessage := aLogInfoOrStringOrNil |
|
206 |
] ifFalse:[ |
|
207 |
checkinInfo := aLogInfoOrStringOrNil. |
|
208 |
logMessage := checkinInfo logMessage. |
|
209 |
]. |
|
210 |
]. |
|
211 |
||
212 |
(mgr checkForExistingContainer:containerFileName inModule:module directory:directory) ifFalse:[ |
|
213 |
(self checkForExistingModule:module usingManager:mgr allowCreate:true) ifFalse:[^ false]. |
|
214 |
LastModule := module. |
|
215 |
||
216 |
(self checkForExistingModule:module directory:directory usingManager:mgr allowCreate:true) ifFalse:[^ false]. |
|
217 |
LastPackage := directory. |
|
218 |
||
219 |
(self checkForExistingModule:module directory:directory container:containerFileName usingManager:mgr allowCreate:true) ifFalse:[^ false]. |
|
220 |
]. |
|
221 |
||
222 |
self activityNotification:(resources string:'Checking in %1' with:containerFileName). |
|
223 |
pri := Processor activePriority. |
|
224 |
Processor activeProcess |
|
225 |
withPriority:pri-1 to:pri |
|
226 |
do:[ |
|
3133 | 227 |
extensionsSource := self sourceCodeForExtensions:aCollectionOfMethods package:aPackageID forManager:mgr. |
228 |
"Care for non-ASCII/non-ISO-8859 characters in extension methods" |
|
229 |
extensionsSource isWideString ifTrue:[ |
|
230 |
extensionsSource := '"{ Encoding: utf8 }"' , Character cr asString , Character cr asString , extensionsSource. |
|
231 |
extensionsSource := extensionsSource utf8Encoded. |
|
232 |
]. |
|
2848 | 233 |
|
234 |
UserInformation handle:[:ex | |
|
235 |
Transcript showCR:ex description. |
|
236 |
ex proceed. |
|
237 |
] do:[ |
|
238 |
Transcript showCR:('checking in ',containerFileName,' ...'). |
|
239 |
(mgr |
|
240 |
checkin:containerFileName |
|
3133 | 241 |
text:extensionsSource |
2848 | 242 |
directory:directory |
243 |
module:module |
|
244 |
logMessage:logMessage |
|
245 |
force:false) |
|
246 |
ifFalse:[ |
|
247 |
Transcript showCR:'Checkin of ''' , containerFileName , ''' failed'. |
|
248 |
self warn:'Checkin of ''' , containerFileName allBold , ''' failed'. |
|
249 |
^ false. |
|
250 |
]. |
|
251 |
checkinInfo notNil ifTrue:[ |
|
252 |
|path| |
|
253 |
||
254 |
path := (module, '/', directory, '/', containerFileName). |
|
255 |
checkinInfo isStable ifTrue:[ |
|
256 |
"set stable tag for class that has been checked in" |
|
257 |
self tagPath:path as:#stable usingManager:mgr. |
|
258 |
]. |
|
259 |
checkinInfo tagIt ifTrue:[ |
|
260 |
"set an additional tag for class that has been checked in" |
|
261 |
self tagPath:path as:(checkinInfo tag) usingManager:mgr. |
|
262 |
]. |
|
263 |
]. |
|
264 |
mgr postCheckInExtensionsForPackage:aPackageID |
|
265 |
]. |
|
266 |
]. |
|
267 |
^ true |
|
268 |
||
4277 | 269 |
"Created: / 05-12-2017 / 20:12:50 / cg" |
2848 | 270 |
! |
271 |
||
4282 | 272 |
checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuildSupportFiles askForMethodsInOtherPackages:askForMethodsInOtherPackages onBranch:branchNameOrNil |
273 |
|mgr classesToCheckIn extensionMethodsToCheckIn methodsInPrjDef |
|
2848 | 274 |
methodsInOtherPackages looseMethods otherPackages |
3507
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
275 |
msg classesInChangeSet newClasses checkinInfo originalCheckinInfo classesToTag |
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
276 |
answer| |
2848 | 277 |
|
278 |
mgr := self sourceCodeManagerFor: packageToCheckIn. |
|
279 |
||
280 |
classesToCheckIn := IdentitySet new. |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
281 |
classesInChangeSet := IdentitySet new. |
4282 | 282 |
extensionMethodsToCheckIn := IdentitySet new. |
2848 | 283 |
methodsInOtherPackages := IdentitySet new. |
284 |
looseMethods := IdentitySet new. |
|
285 |
||
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
286 |
"/ collect classes and individual methods... |
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
287 |
(doClasses or:[doExtensions]) ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
288 |
Smalltalk allClassesDo:[:aClass | |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
289 |
|owner classPackage| |
3141
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
290 |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
291 |
(owner := aClass owningClass) notNil ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
292 |
classPackage := aClass topOwningClass package |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
293 |
] ifFalse:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
294 |
classPackage := aClass package |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
295 |
]. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
296 |
(classPackage = packageToCheckIn) ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
297 |
classesToCheckIn add:aClass. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
298 |
]. |
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
299 |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
300 |
doExtensions ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
301 |
aClass isMeta ifFalse:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
302 |
"/ ... whose class is not in the checkIn-set |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
303 |
(classesToCheckIn includes:aClass) ifFalse:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
304 |
aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
305 |
"/ methods in this project ... |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
306 |
(mthd package = packageToCheckIn) ifTrue:[ |
4282 | 307 |
extensionMethodsToCheckIn add:mthd |
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
308 |
] |
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
309 |
] |
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
310 |
]. |
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
311 |
]. |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
312 |
]. |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
313 |
]. |
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
314 |
|
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
315 |
"/ cg: O(n^2) algorithm |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
316 |
"/ classesInChangeSet := classesToCheckIn select:[:cls | cls hasUnsavedChanges]. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
317 |
"/ replaced by: O(n) algorithm |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
318 |
classesInChangeSet := ChangeSet current selectClassesForWhichIncludesChangeForClassOrMetaclassOrPrivateClassFrom:classesToCheckIn. |
2848 | 319 |
]. |
320 |
||
321 |
doExtensions ifTrue:[ |
|
4282 | 322 |
extensionMethodsToCheckIn notEmpty ifTrue:[ |
2848 | 323 |
doClasses ifTrue:[ |
324 |
msg := '%1 classes (%4 changed) '. |
|
325 |
] ifFalse:[ |
|
326 |
msg := ''. |
|
327 |
]. |
|
328 |
doExtensions ifTrue:[ |
|
329 |
doClasses ifTrue:[ |
|
330 |
msg := msg , 'and '. |
|
331 |
]. |
|
332 |
msg := msg , '%2 extensions '. |
|
333 |
]. |
|
334 |
msg := msg , 'of project "%3"'. |
|
335 |
||
336 |
checkinInfo := self |
|
337 |
getCheckinInfoFor:(msg |
|
338 |
bindWith:classesToCheckIn size |
|
4282 | 339 |
with:extensionMethodsToCheckIn size |
2848 | 340 |
with:packageToCheckIn allBold |
341 |
with:classesInChangeSet size) |
|
342 |
initialAnswer:nil |
|
3141
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
343 |
withQuickOption:(classesToCheckIn size > 0) |
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
344 |
withValidateConsistencyOption:true. |
2848 | 345 |
checkinInfo isNil ifTrue:[ |
346 |
^ self. |
|
347 |
]. |
|
3145
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
348 |
|
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
349 |
checkinInfo validateConsistency ifTrue:[ |
3772
399ff1b46d41
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3651
diff
changeset
|
350 |
|setInProjectDef setForCheckin onlyInPrjDef onlyForCheckin moreInfo| |
399ff1b46d41
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3651
diff
changeset
|
351 |
|
3145
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
352 |
self validateConsistencyOfPackage:packageToCheckIn doClasses:doClasses doExtensions:doExtensions. |
3196
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
353 |
"/ could have changed/recompiled methods... |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
354 |
"/ mhmh - should we checkin what is specified in the prj-def, |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
355 |
"/ or what is actually present in the image (in case user did not repair)??? |
4354 | 356 |
packageToCheckIn asPackageId projectDefinitionClass notNil ifTrue:[ |
357 |
methodsInPrjDef := packageToCheckIn asPackageId projectDefinitionClass extensionMethods. |
|
358 |
methodsInPrjDef := methodsInPrjDef reject:[:m | m isNil]. |
|
359 |
(setInProjectDef := methodsInPrjDef asSet) ~= (setForCheckin := extensionMethodsToCheckIn asSet) ifTrue:[ |
|
360 |
onlyInPrjDef := setInProjectDef copy removeAllFoundIn:setForCheckin. |
|
361 |
onlyForCheckin := setForCheckin copy removeAllFoundIn:setInProjectDef. |
|
362 |
moreInfo := ''. |
|
363 |
onlyInPrjDef notEmpty ifTrue:[ |
|
364 |
moreInfo := moreInfo , '\Only in Project: '. |
|
365 |
moreInfo := moreInfo , (((onlyInPrjDef asOrderedCollection copyTo:(5 min:onlyInPrjDef size)) |
|
366 |
collect:#whoString) asStringWith:', '). |
|
367 |
onlyInPrjDef size > 5 ifTrue:[ moreInfo := moreInfo , '...' ]. |
|
368 |
]. |
|
369 |
onlyForCheckin notEmpty ifTrue:[ |
|
370 |
moreInfo := moreInfo , '\Only in Image: '. |
|
371 |
moreInfo := moreInfo , (((onlyForCheckin asOrderedCollection copyTo:(5 min:onlyForCheckin size)) |
|
372 |
collect:#whoString) asStringWith:', '). |
|
373 |
onlyForCheckin size > 5 ifTrue:[ moreInfo := moreInfo , '...' ]. |
|
374 |
]. |
|
375 |
moreInfo notEmpty ifTrue:[ (moreInfo := moreInfo , '\') withCRs ]. |
|
376 |
self halt. |
|
377 |
answer:= Dialog |
|
378 |
confirmWithCancel:('The set of methods in image is different from what is specified in the project definition.\%1\You should probably make sure that all extension methods are all associated to the correct package.\\Check in image methods (%2) or definition methods (%3)?' |
|
379 |
bindWith: moreInfo |
|
380 |
with: extensionMethodsToCheckIn size |
|
381 |
with: methodsInPrjDef size) withCRs |
|
382 |
labels:#('Image Methods' 'Definition Methods' 'Cancel') |
|
383 |
values:#(true false nil) |
|
384 |
default:nil. |
|
385 |
||
386 |
"/ answer := Dialog |
|
387 |
"/ confirm:('Set of methods in image is different from what is specified in the project definition.\Check in image methods (%1) or definition methods (%2)?' |
|
388 |
"/ bindWith: extensionMethodsToCheckIn size |
|
389 |
"/ with: methodsInPrjDef size) |
|
390 |
"/ yesLabel:'Image Methods' |
|
391 |
"/ noLabel:'Definition Methods'. |
|
392 |
answer isNil ifTrue:[AbortOperationRequest raise]. |
|
393 |
answer ifFalse:[ |
|
394 |
extensionMethodsToCheckIn := methodsInPrjDef. |
|
395 |
]. |
|
3772
399ff1b46d41
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3651
diff
changeset
|
396 |
]. |
4354 | 397 |
|
398 |
"/ also need the extensionVersion methods in the projectDefinition class, |
|
399 |
"/ which are kept in the extensions container. (the reason is that we need the proper |
|
400 |
"/ CVS id for the extensions container, not for the projDefinition container. |
|
401 |
packageToCheckIn asPackageId projectDefinitionClass theMetaclass selectorsAndMethodsDo:[:sel :mthd | |
|
402 |
(AbstractSourceCodeManager isExtensionsVersionMethodSelector:sel) ifTrue:[ |
|
403 |
extensionMethodsToCheckIn add:mthd |
|
404 |
]. |
|
3196
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
405 |
]. |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
406 |
]. |
3145
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
407 |
]. |
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
408 |
|
2848 | 409 |
(self |
4282 | 410 |
checkinExtensionMethods:extensionMethodsToCheckIn |
2848 | 411 |
forPackage:packageToCheckIn |
4277 | 412 |
withInfo:checkinInfo |
413 |
onBranch:branchNameOrNil) |
|
2848 | 414 |
ifFalse:[ |
415 |
Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn). |
|
416 |
^ self. |
|
417 |
] |
|
418 |
] ifFalse:[ |
|
419 |
"/ there may have been extension-methods previously - if so, remove them |
|
420 |
(mgr |
|
421 |
checkForExistingContainer:'extensions.st' inPackage:packageToCheckIn) |
|
422 |
ifTrue:[ |
|
423 |
(self |
|
424 |
checkinExtensionMethods:#() |
|
425 |
forPackage:packageToCheckIn |
|
4277 | 426 |
withInfo:'No extensions any more' |
427 |
onBranch:branchNameOrNil) |
|
2848 | 428 |
ifFalse:[ |
429 |
Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn). |
|
430 |
^ self. |
|
431 |
] |
|
432 |
] |
|
433 |
]. |
|
434 |
]. |
|
435 |
||
436 |
checkinInfo isNil ifTrue:[ |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
437 |
|infoString| |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
438 |
|
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
439 |
doExtensions ifTrue:[ |
4282 | 440 |
extensionMethodsToCheckIn size == 0 ifTrue:[ |
441 |
infoString := '"%3": %1 classes (%4 changed)'. |
|
442 |
] ifFalse:[ |
|
443 |
infoString := '"%3": %1 classes (%4 changed), %2 extensions'. |
|
444 |
]. |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
445 |
] ifFalse:[doClasses ifTrue:[ |
4282 | 446 |
infoString := '"%3": %1 classes (%4 changed)'. |
447 |
] ifFalse:[doBuildSupportFiles ifTrue:[ |
|
448 |
infoString := '"%3": build support files'. |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
449 |
] ifFalse:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
450 |
infoString := 'I don''t know what I am doing'. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
451 |
]]]. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
452 |
|
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
453 |
infoString := infoString |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
454 |
bindWith:classesToCheckIn size |
4282 | 455 |
with:extensionMethodsToCheckIn size |
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
456 |
with:packageToCheckIn allBold |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
457 |
with:classesInChangeSet size. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
458 |
|
4271 | 459 |
mgr notNil ifTrue:[ |
460 |
mgr isCVS ifTrue:[ |
|
461 |
|repos| |
|
462 |
||
463 |
repos := mgr repositoryForPackage:packageToCheckIn. |
|
464 |
repos notNil ifTrue:[ |
|
465 |
infoString := infoString,Character cr,('CVS Repository: "%1"' bindWith:repos) |
|
466 |
]. |
|
467 |
]. |
|
468 |
]. |
|
4282 | 469 |
branchNameOrNil notNil ifTrue:[ |
470 |
infoString := infoString,Character cr,('Branch: "%1"' bindWith:branchNameOrNil) |
|
471 |
]. |
|
4271 | 472 |
|
2848 | 473 |
checkinInfo := self |
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
474 |
getCheckinInfoFor:infoString |
2848 | 475 |
initialAnswer:nil |
3141
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
476 |
withQuickOption:(classesToCheckIn size > 0) |
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
477 |
withValidateConsistencyOption:true. |
2848 | 478 |
checkinInfo isNil ifTrue:[ |
479 |
^ self. |
|
480 |
]. |
|
3145
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
481 |
checkinInfo validateConsistency ifTrue:[ |
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
482 |
self validateConsistencyOfPackage:packageToCheckIn doClasses:doClasses doExtensions:doExtensions. |
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
483 |
]. |
3141
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
484 |
]. |
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
485 |
|
2848 | 486 |
checkinInfo quickCheckIn ifTrue:[ |
487 |
(checkinInfo isStable or:[checkinInfo tagIt]) ifTrue:[ |
|
488 |
classesToTag := classesToCheckIn. |
|
489 |
originalCheckinInfo := checkinInfo. |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
490 |
checkinInfo := checkinInfo deepCopy. |
2848 | 491 |
checkinInfo isStable:false. |
492 |
checkinInfo tag:nil. |
|
493 |
]. |
|
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
494 |
"/ not only the one's in the changeSet; |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
495 |
"/ also those which have not been checked in before. |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
496 |
newClasses := classesToCheckIn select:[:class | (class revisionOfManager:mgr) isNil ]. |
4277 | 497 |
classesToCheckIn := Set new. |
498 |
classesToCheckIn addAll:classesInChangeSet; addAll:newClasses. |
|
2848 | 499 |
]. |
500 |
||
501 |
"/ check if any of the classes contains methods for other packages ... |
|
502 |
classesToCheckIn do:[:eachClass | |
|
503 |
eachClass instAndClassMethodsDo:[:eachMethod | |
|
504 |
|mPgk| |
|
505 |
||
506 |
mPgk := eachMethod package. |
|
507 |
(mPgk = packageToCheckIn) ifFalse:[ |
|
508 |
mPgk == PackageId noProjectID ifTrue:[ |
|
509 |
looseMethods add:eachMethod |
|
510 |
] ifFalse:[ |
|
511 |
methodsInOtherPackages add:eachMethod |
|
512 |
] |
|
513 |
] |
|
514 |
]. |
|
515 |
]. |
|
516 |
||
517 |
askForMethodsInOtherPackages ifTrue:[ |
|
518 |
methodsInOtherPackages notEmpty ifTrue:[ |
|
4004 | 519 |
|package2| |
520 |
||
2848 | 521 |
otherPackages := Set new. |
522 |
methodsInOtherPackages do:[:eachMethod | otherPackages add:eachMethod package]. |
|
523 |
||
524 |
methodsInOtherPackages size == 1 ifTrue:[ |
|
525 |
msg := 'The ''%4'' method in ''%5'' is contained in the ''%2'' package.'. |
|
526 |
msg := msg , '\\This method will remain in its package.'. |
|
527 |
] ifFalse:[ |
|
528 |
otherPackages size == 1 ifTrue:[ |
|
3651
d58c178282c0
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3603
diff
changeset
|
529 |
msg := 'The %1 methods from the %2 package will remain in their package.' |
2848 | 530 |
] ifFalse:[ |
4004 | 531 |
package2 := otherPackages second allBold. |
532 |
otherPackages size == 2 ifTrue:[ |
|
533 |
msg := 'The %1 methods from %3 other packages (%2, %6) will remain in their packages.'. |
|
534 |
] ifFalse:[ |
|
535 |
msg := 'The %1 methods from %3 other packages (%2, %6...) will remain in their packages.'. |
|
536 |
]. |
|
2848 | 537 |
]. |
4004 | 538 |
msg := msg , '\\Hint: if these are meant to belong to the %7 package,'. |
2848 | 539 |
msg := msg , '\move them first, then repeat the checkin operation.'. |
540 |
]. |
|
541 |
msg := msg withCRs. |
|
542 |
msg := msg bindWith:methodsInOtherPackages size |
|
543 |
with:otherPackages first allBold |
|
544 |
with:otherPackages size |
|
545 |
with:methodsInOtherPackages first selector allBold |
|
4004 | 546 |
with:methodsInOtherPackages first mclass name allBold |
547 |
with:package2 |
|
548 |
with:packageToCheckIn. |
|
4244 | 549 |
(Dialog confirm:msg yesLabel:'OK' noLabel:(resources string:'Cancel')) ifFalse:[^ self]. |
2848 | 550 |
]. |
551 |
]. |
|
552 |
||
553 |
doClasses ifTrue:[ |
|
554 |
classesToCheckIn notEmpty ifTrue:[ |
|
555 |
looseMethods notEmpty ifTrue:[ |
|
556 |
looseMethods size == 1 ifTrue:[ |
|
557 |
msg := 'The ''%2'' method in ''%3'' is unassigned (loose).'. |
|
558 |
msg := msg , '\\If you proceed, this method will be moved to the ''%4'' package'. |
|
559 |
msg := msg , '\\Hint: if this is meant to be an extension of another package,'. |
|
560 |
msg := msg , '\cancel and move it to the appropriate package first.'. |
|
561 |
] ifFalse:[ |
|
562 |
msg := 'There are %1 unassigned (loose) methods in classes from this project.'. |
|
563 |
msg := msg , '\\If you proceed, those will be moved to the ''%4'' package ?'. |
|
564 |
msg := msg , '\\Hint: if these are meant to be extensions of another package,'. |
|
565 |
msg := msg , '\cancel and move them to the appropriate package first.'. |
|
566 |
]. |
|
567 |
doClasses ifTrue:[ |
|
568 |
msg := msg , '\\If you answer with "No" here, you will be asked for each class individually.'. |
|
569 |
]. |
|
570 |
msg := msg withCRs. |
|
571 |
msg := msg bindWith:looseMethods size |
|
572 |
with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first selector allBold]) |
|
573 |
with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first mclass name allBold]) |
|
574 |
with:packageToCheckIn allBold. |
|
575 |
(Dialog confirm:msg noLabel:(resources string:'Cancel')) ifFalse:[^ self]. |
|
576 |
||
577 |
looseMethods do:[:mthd | |
|
578 |
mthd package:packageToCheckIn |
|
579 |
]. |
|
580 |
]. |
|
4277 | 581 |
self checkinClasses:classesToCheckIn withInfo:checkinInfo onBranch:branchNameOrNil. |
2848 | 582 |
]. |
583 |
||
584 |
originalCheckinInfo notNil ifTrue:[ |
|
585 |
originalCheckinInfo isStable ifTrue:[ |
|
4282 | 586 |
self tagClasses:classesToTag as:#stable. |
587 |
"/ classesToTag do:[:eachClass | |
|
588 |
"/ self tagClass:eachClass as:#stable |
|
589 |
"/ ]. |
|
2848 | 590 |
]. |
591 |
originalCheckinInfo tagIt ifTrue:[ |
|
4282 | 592 |
self tagClasses:classesToTag as:(originalCheckinInfo tag). |
593 |
"/ classesToTag do:[:eachClass | |
|
594 |
"/ self tagClass:eachClass as:(originalCheckinInfo tag) |
|
595 |
"/ ]. |
|
2848 | 596 |
]. |
597 |
]. |
|
598 |
]. |
|
599 |
||
4282 | 600 |
doBuildSupportFiles ifTrue:[ |
4277 | 601 |
self checkinBuildSupportFilesForPackage:packageToCheckIn withInfo:(originalCheckinInfo ? checkinInfo) onBranch:branchNameOrNil. |
2848 | 602 |
]. |
603 |
||
4277 | 604 |
"Created: / 05-12-2017 / 20:03:19 / cg" |
4282 | 605 |
"Modified: / 05-12-2017 / 23:15:52 / cg" |
4354 | 606 |
"Modified: / 23-09-2018 / 04:18:14 / Claus Gittinger" |
2848 | 607 |
! ! |
608 |
||
609 |
!SourceCodeManagerUtilitiesForContainerBasedManagers class methodsFor:'documentation'! |
|
610 |
||
611 |
version |
|
3905 | 612 |
^ '$Header$' |
2848 | 613 |
! |
614 |
||
615 |
version_CVS |
|
3905 | 616 |
^ '$Header$' |
2848 | 617 |
! ! |
3133 | 618 |