author | Claus Gittinger <cg@exept.de> |
Tue, 07 May 2013 14:18:56 +0200 | |
changeset 3250 | fe3f6d8ead83 |
parent 3196 | d91dbd26f40c |
child 3262 | 06320fb6453a |
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 |
||
14 |
SourceCodeManagerUtilities subclass:#SourceCodeManagerUtilitiesForContainerBasedManagers |
|
15 |
instanceVariableNames:'' |
|
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'System-SourceCodeManagement' |
|
19 |
! |
|
20 |
||
21 |
!SourceCodeManagerUtilitiesForContainerBasedManagers class methodsFor:'documentation'! |
|
22 |
||
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 2012 eXept Software AG |
|
26 |
All Rights Reserved |
|
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! ! |
|
36 |
||
37 |
!SourceCodeManagerUtilitiesForContainerBasedManagers methodsFor:'utilities-cvs'! |
|
38 |
||
39 |
checkinBuildSupportFilesForPackage:packageID |
|
40 |
|anyFailure module directory mgr defClass | |
|
41 |
||
42 |
mgr := self sourceCodeManagerFor: packageID. |
|
43 |
defClass := ProjectDefinition definitionClassForPackage: packageID. |
|
44 |
||
3141
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
45 |
"/ already done elsewhere now |
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
46 |
"/ defClass validateDescription. |
2848 | 47 |
|
48 |
anyFailure := false. |
|
49 |
||
50 |
module := packageID asPackageId module. |
|
51 |
directory := packageID asPackageId directory. |
|
52 |
||
53 |
self activityNotification:(resources string:'checking in build-support files...'). |
|
54 |
(mgr checkForExistingModule:module directory:directory) ifFalse:[ |
|
55 |
mgr createModule:module directory:directory |
|
56 |
]. |
|
57 |
||
58 |
defClass forEachFileNameAndGeneratedContentsDo:[:fileName :fileContents | |
|
59 |
|realFileName realDirectory| |
|
60 |
||
61 |
"/ care for subdirectories |
|
62 |
(fileName includes:$/) ifTrue:[ |
|
63 |
realDirectory := (directory asFilename construct:(fileName asFilename directoryName)) name. |
|
64 |
realFileName := fileName asFilename baseName. |
|
65 |
] ifFalse:[ |
|
66 |
realDirectory := directory. |
|
67 |
realFileName := fileName. |
|
68 |
]. |
|
69 |
realDirectory := realDirectory replaceAll:$\ with:$/. |
|
70 |
||
71 |
self activityNotification:(resources string:'checking in %1...' with:realFileName). |
|
72 |
||
73 |
UserInformation |
|
74 |
handle:[:ex | Transcript showCR:ex description ] |
|
75 |
do:[ |
|
76 |
(mgr isContainerBased |
|
77 |
and:[ |
|
78 |
(mgr checkForExistingContainer:realFileName inModule:module directory:realDirectory) not |
|
79 |
]) ifTrue:[ |
|
80 |
realDirectory ~= directory ifTrue:[ |
|
81 |
(mgr checkForExistingModule:module directory:realDirectory) ifFalse:[ |
|
82 |
mgr createModule:module directory:realDirectory |
|
83 |
]. |
|
84 |
]. |
|
85 |
(mgr |
|
86 |
createContainerForText:fileContents |
|
87 |
inModule:module |
|
88 |
package:realDirectory |
|
89 |
container:realFileName) |
|
90 |
ifFalse:[ |
|
91 |
Dialog warn:(resources |
|
92 |
stringWithCRs:'Cannot create new container: ''%3'' (in %1:%2)' |
|
93 |
with:module |
|
94 |
with:realDirectory |
|
95 |
with:realFileName) |
|
96 |
]. |
|
97 |
] ifFalse:[ |
|
98 |
(mgr |
|
99 |
checkin:realFileName |
|
100 |
text:fileContents |
|
101 |
directory:realDirectory |
|
102 |
module:module |
|
103 |
logMessage:'automatically generated by browser' |
|
104 |
force:false) |
|
105 |
ifFalse:[ |
|
106 |
Transcript showCR:'checkin of ' , realFileName , ' failed'. |
|
107 |
anyFailure := true. |
|
108 |
]. |
|
109 |
]. |
|
110 |
]. |
|
111 |
]. |
|
112 |
||
113 |
defClass instAndClassMethodsDo:[:m | m package:defClass package]. |
|
114 |
||
115 |
self |
|
116 |
checkinClasses:(Array with:defClass) |
|
117 |
withInfo:'automatic checkIn' |
|
118 |
withCheck:false. |
|
119 |
||
120 |
||
121 |
self activityNotification:nil. |
|
122 |
||
123 |
anyFailure ifTrue:[ |
|
124 |
self warn:'Checkin failed - see Transcript.'. |
|
125 |
self activityNotification:'Checkin of build-support files failed - see Transcript.'. |
|
126 |
] ifFalse:[ |
|
127 |
self activityNotification:'Build-support files checked into the repository.'. |
|
128 |
]. |
|
129 |
||
130 |
"Created: / 09-08-2006 / 18:59:42 / fm" |
|
131 |
"Modified: / 12-10-2011 / 11:36:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
132 |
"Modified: / 25-07-2012 / 14:27:30 / cg" |
|
133 |
"Modified (format): / 25-07-2012 / 22:25:48 / cg" |
|
134 |
! |
|
135 |
||
136 |
checkinClass:aClass |
|
137 |
"check a class into the source repository. |
|
138 |
Asks interactively for a log-message." |
|
139 |
||
140 |
^ self checkinClass:aClass withInfo:nil |
|
141 |
! |
|
142 |
||
143 |
checkinClass:aClass withInfo:aLogInfoOrNil |
|
144 |
"check a class into the source repository. |
|
145 |
If the argument, aLogInfoOrNil isNil, ask interactively for a log-message." |
|
146 |
||
147 |
^ self checkinClass:aClass withInfo:aLogInfoOrNil withCheck:true |
|
148 |
! |
|
149 |
||
150 |
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass |
|
151 |
"check a class into the source repository. |
|
152 |
If the argument, aLogInfoOrNil isNil, ask interactively for log-message. |
|
153 |
If doCheckClass is true, the class is checked for send of halts etc." |
|
154 |
||
155 |
^ self |
|
156 |
checkinClass:aClass |
|
157 |
withInfo:aLogInfoOrNil |
|
158 |
withCheck:doCheckClass |
|
159 |
usingManager:(self sourceCodeManagerFor:aClass) |
|
160 |
||
161 |
"Modified: / 21-12-2011 / 18:19:55 / cg" |
|
162 |
! |
|
163 |
||
164 |
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass usingManager:managerOrNil |
|
165 |
"check a class into the source repository. |
|
166 |
If the argument, aLogInfoOrNil isNil, ask interactively for log-message. |
|
167 |
If doCheckClass is true, the class is checked for send of halts etc." |
|
168 |
||
2946 | 169 |
|logMessage checkinInfo mgr pri| |
2848 | 170 |
|
171 |
aClass isLoaded ifFalse:[ |
|
172 |
self information:(resources string:'Cannot checkin unloaded classes (%1)' with:aClass name). |
|
173 |
^ false. |
|
174 |
]. |
|
175 |
||
176 |
mgr := managerOrNil. |
|
177 |
mgr isNil ifTrue:[ |
|
178 |
mgr := self sourceCodeManagerFor:aClass. |
|
179 |
mgr isNil ifTrue:[ |
|
180 |
^ false |
|
181 |
] |
|
182 |
]. |
|
183 |
||
184 |
self ensureCorrectVersionMethodsInClass:aClass usingManager:mgr. |
|
185 |
mgr supportsCheckinLogMessages ifTrue:[ |
|
186 |
(self |
|
187 |
getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil |
|
188 |
forClass:aClass |
|
189 |
valuesInto:[:logMessageRet :checkinInfoRet | |
|
190 |
logMessage := logMessageRet. |
|
191 |
checkinInfo := checkinInfoRet. |
|
192 |
] |
|
193 |
) ifFalse:[^ false]. |
|
194 |
]. |
|
195 |
||
196 |
(self classIsNotYetInRepository:aClass withManager:mgr) ifTrue:[ |
|
197 |
(self createSourceContainerForClass:aClass usingManager:mgr) ifFalse:[ |
|
198 |
"/ self warn:'did not create a container for ''' , aClass name , ''''. |
|
199 |
^ false |
|
200 |
]. |
|
201 |
^ true. |
|
202 |
]. |
|
203 |
||
204 |
self activityNotification:(resources string:'checking in %1' with:aClass name). |
|
205 |
pri := Processor activePriority. |
|
206 |
Processor activeProcess withPriority:pri-1 to:pri |
|
207 |
do:[ |
|
208 |
|revision aborted freshCreated| |
|
209 |
||
210 |
freshCreated := false. |
|
211 |
revision := aClass revision. |
|
212 |
revision isNil ifTrue:[ |
|
213 |
mgr isContainerBased ifTrue:[ |
|
214 |
"/ mhmh - check if it has a container. |
|
215 |
(mgr checkForExistingContainerForClass:aClass) ifFalse:[ |
|
216 |
(self createSourceContainerForClass:aClass usingManager:mgr) ifFalse:[ |
|
217 |
self warn:'Did not create/change repository container for ''' , aClass name allBold , ''''. |
|
218 |
^ false. |
|
219 |
]. |
|
220 |
freshCreated := true. |
|
221 |
] |
|
222 |
] |
|
223 |
]. |
|
224 |
||
225 |
doCheckClass value ifTrue:[ |
|
226 |
"/ check if the class contains halts, error-sends etc. |
|
227 |
(self checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:doCheckClass) ifFalse:[ |
|
228 |
^ false |
|
229 |
]. |
|
230 |
]. |
|
231 |
||
232 |
freshCreated ifFalse:[ |
|
233 |
aborted := false. |
|
234 |
AbortOperationRequest handle:[:ex | |
|
235 |
aborted := true. |
|
236 |
ex return. |
|
237 |
] do:[ |
|
238 |
|checkinState cause| |
|
239 |
checkinState := false. |
|
240 |
cause := ''. |
|
241 |
[ |
|
242 |
checkinState := mgr checkinClass:aClass logMessage:logMessage |
|
243 |
] on:SourceCodeManagerError do:[:ex| |
|
244 |
cause := ex description. |
|
245 |
ex proceed. |
|
246 |
]. |
|
247 |
||
248 |
checkinState ifFalse:[ |
|
249 |
Transcript showCR:'checkin of ''' , aClass name , ''' failed - ', cause. |
|
250 |
self warn:(resources stringWithCRs:'Checkin of "%1" failed\\' with:aClass name allBold),cause. |
|
251 |
^ false. |
|
252 |
]. |
|
253 |
checkinInfo notNil ifTrue:[ |
|
254 |
checkinInfo isStable ifTrue:[ |
|
255 |
"set stable tag for class that has been checked in" |
|
256 |
self tagClass:aClass as:#stable. |
|
257 |
]. |
|
258 |
checkinInfo tagIt ifTrue:[ |
|
259 |
"set an additional tag for class that has been checked in" |
|
260 |
self tagClass:aClass as:(checkinInfo tag). |
|
261 |
]. |
|
262 |
]. |
|
263 |
]. |
|
264 |
aborted ifTrue:[ |
|
265 |
Transcript showCR:'Checkin of ''' , aClass name , ''' aborted'. |
|
266 |
||
267 |
AbortAllOperationWantedQuery query ifTrue:[ |
|
268 |
(Dialog |
|
269 |
confirm:(resources stringWithCRs:'Checkin of "%1" aborted.\\Cancel all ?' with:aClass name) |
|
270 |
default:false) |
|
271 |
ifTrue:[ |
|
272 |
AbortAllOperationRequest raise. |
|
273 |
] |
|
274 |
]. |
|
275 |
^ false. |
|
276 |
]. |
|
277 |
]. |
|
278 |
]. |
|
279 |
^ true |
|
280 |
||
281 |
"Created: / 21-12-2011 / 18:19:14 / cg" |
|
282 |
! |
|
283 |
||
284 |
checkinClasses:aCollectionOfClass |
|
285 |
"check a collection of classes into the source repository. |
|
286 |
Asks interactively for log-message." |
|
287 |
||
288 |
^ self checkinClasses:aCollectionOfClass withInfo:nil |
|
289 |
! |
|
290 |
||
291 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil |
|
292 |
"check a bunch of classes into the source repository. |
|
293 |
If the argument, aLogInfoOrNil isNil, ask interactively for log-message." |
|
294 |
||
295 |
^ self |
|
296 |
checkinClasses:aCollectionOfClasses |
|
297 |
withInfo:aLogInfoOrNil |
|
298 |
withCheck:(UserPreferences current at:#checkClassesWhenCheckingIn ifAbsent:true) |
|
299 |
! |
|
300 |
||
301 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses |
|
302 |
"check a bunch of classes into the source repository. |
|
303 |
If the argument, aLogInfoOrStringNil isNil, ask interactively for log-message." |
|
304 |
||
305 |
self checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses usingManager:nil |
|
306 |
||
307 |
"Modified: / 21-12-2011 / 18:24:47 / cg" |
|
308 |
! |
|
309 |
||
310 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses usingManager:aManagerOrNil |
|
311 |
"check a bunch of classes into the source repository. |
|
312 |
If the argument, aLogInfoOrStringNil isNil, ask interactively for log-message." |
|
313 |
||
2946 | 314 |
|classes allClasses checkinInfoOrString yesOrNoToAll unchangedClasses| |
2848 | 315 |
|
316 |
"/ ignore private classes |
|
317 |
classes := aCollectionOfClasses select:[:aClass | aClass owningClass isNil]. |
|
318 |
classes isEmpty ifTrue:[ |
|
319 |
self information:'Only private classes given - nothing checked in.'. |
|
320 |
^ self |
|
321 |
]. |
|
322 |
classes := classes select:[:aClass | aClass isLoaded]. |
|
323 |
classes isEmpty ifTrue:[ |
|
324 |
self information:'Only unloaded classes given - nothing checked in.'. |
|
325 |
^ self |
|
326 |
]. |
|
327 |
||
328 |
classes size == 1 ifTrue:[ |
|
329 |
^ self checkinClass:classes first withInfo:aLogInfoOrStringNil withCheck:doCheckClasses usingManager:aManagerOrNil. |
|
330 |
]. |
|
331 |
||
332 |
"ask once, for all classes" |
|
333 |
aLogInfoOrStringNil isNil ifTrue:[ |
|
334 |
checkinInfoOrString := self |
|
335 |
getCheckinInfoFor:(resources string:'%1 classes to checkin' with:aCollectionOfClasses size) |
|
336 |
initialAnswer:nil |
|
337 |
withQuickOption:true. |
|
338 |
checkinInfoOrString isNil ifTrue:[^ self]. |
|
339 |
] ifFalse:[ |
|
340 |
checkinInfoOrString := aLogInfoOrStringNil. |
|
341 |
]. |
|
342 |
||
343 |
allClasses := classes. |
|
344 |
checkinInfoOrString quickCheckIn ifTrue:[ |
|
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
345 |
"/ not only the one's in the changeSet; |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
346 |
"/ also those which have not been checked in before. |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
347 |
classes := classes select:[:each | each hasUnsavedChanges or:[ (each revisionOfManager:aManagerOrNil) isNil ]]. |
2848 | 348 |
classes isEmpty ifTrue:[ Dialog information:'no changes to checkin (quickCheckIn)' ] |
349 |
]. |
|
350 |
||
351 |
"abortAll is handled, and also asked for here!!" |
|
352 |
AbortAllOperationRequest handleAndAnswerQueryIn:[ |
|
353 |
classes notEmpty ifTrue:[ |
|
354 |
self yesToAllNotification handle:[:ex | |
|
355 |
yesOrNoToAll := ex parameter. |
|
356 |
ex proceed |
|
357 |
] do:[ |
|
358 |
self yesToAllQuery handle:[:ex | |
|
359 |
ex proceedWith:yesOrNoToAll |
|
360 |
] do:[ |
|
361 |
classes do:[:aClass | |
|
362 |
self activityNotification:(resources string:'checking in %1' with:aClass name). |
|
363 |
"/ ca does not want boxes to pop up all over ... |
|
364 |
UserInformation handle:[:ex | |
|
365 |
Transcript showCR:ex description. |
|
366 |
ex proceed. |
|
367 |
] do:[ |
|
368 |
AbortOperationRequest catch:[ |
|
369 |
self |
|
370 |
checkinClass:aClass |
|
371 |
withInfo:checkinInfoOrString |
|
372 |
withCheck:doCheckClasses |
|
373 |
usingManager:aManagerOrNil |
|
374 |
] |
|
375 |
]. |
|
376 |
]. |
|
377 |
] |
|
378 |
]. |
|
379 |
]. |
|
380 |
||
381 |
(checkinInfoOrString isStable or:[checkinInfoOrString tagIt]) |
|
382 |
ifTrue:[ |
|
383 |
"/mhmh - but tag should be set on all (even unchanged ones) |
|
384 |
"/ the other onces have already been tagged |
|
385 |
unchangedClasses := allClasses select:[:eachClass | (classes includes:eachClass) not]. |
|
386 |
||
387 |
"mhmh - could still have to tag them" |
|
388 |
checkinInfoOrString isStable ifTrue:[ |
|
389 |
unchangedClasses do:[:eachClass | |
|
390 |
self tagClass:eachClass as:#stable. |
|
391 |
]. |
|
392 |
]. |
|
393 |
checkinInfoOrString tagIt ifTrue:[ |
|
394 |
unchangedClasses do:[:eachClass | |
|
395 |
self tagClass:eachClass as:(checkinInfoOrString tag). |
|
396 |
]. |
|
397 |
]. |
|
398 |
]. |
|
399 |
]. |
|
400 |
||
401 |
"Created: / 21-12-2011 / 18:24:25 / cg" |
|
402 |
! |
|
403 |
||
404 |
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil |
|
405 |
"checkin a projects extensions into the source repository. |
|
406 |
If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message." |
|
407 |
||
3133 | 408 |
|logMessage checkinInfo mgr pri module directory containerFileName extensionsSource| |
2848 | 409 |
|
410 |
"/ the following is wrong - must ask the projectDefinition !! |
|
411 |
aPackageID asPackageId projectDefinitionClass notNil ifTrue:[ |
|
412 |
mgr := self sourceCodeManagerFor:aPackageID asPackageId projectDefinitionClass. |
|
413 |
] ifFalse:[ |
|
414 |
mgr := self sourceCodeManagerFor:aCollectionOfMethods first mclass. |
|
415 |
]. |
|
416 |
mgr isNil ifTrue:[ ^ false ]. |
|
417 |
||
418 |
module := aPackageID asPackageId module. |
|
419 |
directory := aPackageID asPackageId directory. |
|
420 |
containerFileName := self nameOfExtensionsContainer. |
|
421 |
||
422 |
aLogInfoOrStringOrNil isNil ifTrue:[ |
|
423 |
checkinInfo := self getCheckinInfoFor:containerFileName allBold initialAnswer:nil. |
|
424 |
checkinInfo isNil ifTrue:[^ false]. |
|
425 |
logMessage := checkinInfo logMessage. |
|
426 |
] ifFalse:[ |
|
427 |
aLogInfoOrStringOrNil isString ifTrue:[ |
|
428 |
logMessage := aLogInfoOrStringOrNil |
|
429 |
] ifFalse:[ |
|
430 |
checkinInfo := aLogInfoOrStringOrNil. |
|
431 |
logMessage := checkinInfo logMessage. |
|
432 |
]. |
|
433 |
]. |
|
434 |
||
435 |
(mgr checkForExistingContainer:containerFileName inModule:module directory:directory) ifFalse:[ |
|
436 |
(self checkForExistingModule:module usingManager:mgr allowCreate:true) ifFalse:[^ false]. |
|
437 |
LastModule := module. |
|
438 |
||
439 |
(self checkForExistingModule:module directory:directory usingManager:mgr allowCreate:true) ifFalse:[^ false]. |
|
440 |
LastPackage := directory. |
|
441 |
||
442 |
(self checkForExistingModule:module directory:directory container:containerFileName usingManager:mgr allowCreate:true) ifFalse:[^ false]. |
|
443 |
]. |
|
444 |
||
445 |
self activityNotification:(resources string:'Checking in %1' with:containerFileName). |
|
446 |
pri := Processor activePriority. |
|
447 |
Processor activeProcess |
|
448 |
withPriority:pri-1 to:pri |
|
449 |
do:[ |
|
3133 | 450 |
extensionsSource := self sourceCodeForExtensions:aCollectionOfMethods package:aPackageID forManager:mgr. |
451 |
"Care for non-ASCII/non-ISO-8859 characters in extension methods" |
|
452 |
extensionsSource isWideString ifTrue:[ |
|
453 |
extensionsSource := '"{ Encoding: utf8 }"' , Character cr asString , Character cr asString , extensionsSource. |
|
454 |
extensionsSource := extensionsSource utf8Encoded. |
|
455 |
]. |
|
2848 | 456 |
|
457 |
UserInformation handle:[:ex | |
|
458 |
Transcript showCR:ex description. |
|
459 |
ex proceed. |
|
460 |
] do:[ |
|
461 |
Transcript showCR:('checking in ',containerFileName,' ...'). |
|
462 |
(mgr |
|
463 |
checkin:containerFileName |
|
3133 | 464 |
text:extensionsSource |
2848 | 465 |
directory:directory |
466 |
module:module |
|
467 |
logMessage:logMessage |
|
468 |
force:false) |
|
469 |
ifFalse:[ |
|
470 |
Transcript showCR:'Checkin of ''' , containerFileName , ''' failed'. |
|
471 |
self warn:'Checkin of ''' , containerFileName allBold , ''' failed'. |
|
472 |
^ false. |
|
473 |
]. |
|
474 |
checkinInfo notNil ifTrue:[ |
|
475 |
|path| |
|
476 |
||
477 |
path := (module, '/', directory, '/', containerFileName). |
|
478 |
checkinInfo isStable ifTrue:[ |
|
479 |
"set stable tag for class that has been checked in" |
|
480 |
self tagPath:path as:#stable usingManager:mgr. |
|
481 |
]. |
|
482 |
checkinInfo tagIt ifTrue:[ |
|
483 |
"set an additional tag for class that has been checked in" |
|
484 |
self tagPath:path as:(checkinInfo tag) usingManager:mgr. |
|
485 |
]. |
|
486 |
]. |
|
487 |
mgr postCheckInExtensionsForPackage:aPackageID |
|
488 |
]. |
|
489 |
]. |
|
490 |
^ true |
|
491 |
||
492 |
"Modified: / 25-07-2012 / 18:38:40 / cg" |
|
493 |
! |
|
494 |
||
495 |
checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages |
|
3196
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
496 |
|mgr classesToCheckIn methodsToCheckIn methodsInPrjDef |
2848 | 497 |
methodsInOtherPackages looseMethods otherPackages |
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
498 |
msg classesInChangeSet newClasses checkinInfo originalCheckinInfo classesToTag| |
2848 | 499 |
|
500 |
mgr := self sourceCodeManagerFor: packageToCheckIn. |
|
501 |
||
502 |
classesToCheckIn := IdentitySet new. |
|
503 |
methodsToCheckIn := IdentitySet new. |
|
504 |
methodsInOtherPackages := IdentitySet new. |
|
505 |
looseMethods := IdentitySet new. |
|
506 |
||
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
507 |
"/ collect classes and individual methods... |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
508 |
Smalltalk allClassesDo:[:aClass | |
3141
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
509 |
|owner classPackage| |
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
510 |
|
2848 | 511 |
(owner := aClass owningClass) notNil ifTrue:[ |
512 |
classPackage := aClass topOwningClass package |
|
513 |
] ifFalse:[ |
|
514 |
classPackage := aClass package |
|
515 |
]. |
|
516 |
(classPackage = packageToCheckIn) ifTrue:[ |
|
517 |
classesToCheckIn add:aClass. |
|
518 |
]. |
|
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
519 |
|
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
520 |
doExtensions ifTrue:[ |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
521 |
aClass isMeta ifFalse:[ |
3172
075893be09ad
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3164
diff
changeset
|
522 |
"/ ... whose class is not in the checkIn-set |
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
523 |
(classesToCheckIn includes:aClass) ifFalse:[ |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
524 |
aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
525 |
"/ methods in this project ... |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
526 |
(mthd package = packageToCheckIn) ifTrue:[ |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
527 |
methodsToCheckIn add:mthd |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
528 |
] |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
529 |
] |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
530 |
]. |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
531 |
]. |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
532 |
]. |
2848 | 533 |
]. |
534 |
||
535 |
"/ cg: O(n^2) algorithm |
|
536 |
"/ classesInChangeSet := classesToCheckIn select:[:cls | cls hasUnsavedChanges]. |
|
537 |
"/ replaced by: O(n) algorithm |
|
2906 | 538 |
classesInChangeSet := ChangeSet current selectClassesForWhichIncludesChangeForClassOrMetaclassOrPrivateClassFrom:classesToCheckIn. |
2848 | 539 |
|
540 |
doExtensions ifTrue:[ |
|
541 |
methodsToCheckIn notEmpty ifTrue:[ |
|
542 |
doClasses ifTrue:[ |
|
543 |
msg := '%1 classes (%4 changed) '. |
|
544 |
] ifFalse:[ |
|
545 |
msg := ''. |
|
546 |
]. |
|
547 |
doExtensions ifTrue:[ |
|
548 |
doClasses ifTrue:[ |
|
549 |
msg := msg , 'and '. |
|
550 |
]. |
|
551 |
msg := msg , '%2 extensions '. |
|
552 |
]. |
|
553 |
msg := msg , 'of project "%3"'. |
|
554 |
||
555 |
checkinInfo := self |
|
556 |
getCheckinInfoFor:(msg |
|
557 |
bindWith:classesToCheckIn size |
|
558 |
with:methodsToCheckIn size |
|
559 |
with:packageToCheckIn allBold |
|
560 |
with:classesInChangeSet size) |
|
561 |
initialAnswer:nil |
|
3141
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
562 |
withQuickOption:(classesToCheckIn size > 0) |
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
563 |
withValidateConsistencyOption:true. |
2848 | 564 |
checkinInfo isNil ifTrue:[ |
565 |
^ self. |
|
566 |
]. |
|
3145
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
567 |
|
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
568 |
checkinInfo validateConsistency ifTrue:[ |
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
569 |
self validateConsistencyOfPackage:packageToCheckIn doClasses:doClasses doExtensions:doExtensions. |
3196
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
570 |
"/ could have changed/recompiled methods... |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
571 |
"/ mhmh - should we checkin what is specified in the prj-def, |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
572 |
"/ or what is actually present in the image (in case user did not repair)??? |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
573 |
|
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
574 |
methodsInPrjDef := packageToCheckIn asPackageId projectDefinitionClass extensionMethods. |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
575 |
methodsInPrjDef := methodsInPrjDef reject:[:m | m isNil]. |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
576 |
methodsInPrjDef asSet ~= methodsToCheckIn asSet ifTrue:[ |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
577 |
(Dialog |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
578 |
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)?' |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
579 |
bindWith: methodsToCheckIn size |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
580 |
with: methodsInPrjDef size) |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
581 |
yesLabel:'Image Methods' |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
582 |
noLabel:'Definition Methods' |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
583 |
) ifFalse:[ |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
584 |
methodsToCheckIn := methodsInPrjDef. |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
585 |
]. |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
586 |
]. |
3145
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
587 |
]. |
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
588 |
|
3250
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
589 |
"/ also need the extensionVersion methods in the projectDefinition class, |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
590 |
"/ which are kept in the extensions container. (the reason is that we need the proper |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
591 |
"/ CVS id for the extensions container, not for the projDefinition container. |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
592 |
packageToCheckIn asPackageId projectDefinitionClass theMetaclass selectorsAndMethodsDo:[:sel :mthd | |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
593 |
(AbstractSourceCodeManager isExtensionsVersionMethodSelector:sel) ifTrue:[ |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
594 |
methodsToCheckIn add:mthd |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
595 |
]. |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
596 |
]. |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
597 |
|
2848 | 598 |
(self |
599 |
checkinExtensionMethods:methodsToCheckIn |
|
600 |
forPackage:packageToCheckIn |
|
601 |
withInfo:checkinInfo) |
|
602 |
ifFalse:[ |
|
603 |
Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn). |
|
604 |
^ self. |
|
605 |
] |
|
606 |
] ifFalse:[ |
|
607 |
"/ there may have been extension-methods previously - if so, remove them |
|
608 |
(mgr |
|
609 |
checkForExistingContainer:'extensions.st' inPackage:packageToCheckIn) |
|
610 |
ifTrue:[ |
|
611 |
"/ self halt. |
|
612 |
(self |
|
613 |
checkinExtensionMethods:#() |
|
614 |
forPackage:packageToCheckIn |
|
615 |
withInfo:'No extensions any more') |
|
616 |
ifFalse:[ |
|
617 |
Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn). |
|
618 |
^ self. |
|
619 |
] |
|
620 |
] |
|
621 |
]. |
|
622 |
]. |
|
623 |
||
624 |
checkinInfo isNil ifTrue:[ |
|
625 |
checkinInfo := self |
|
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
626 |
getCheckinInfoFor:((doExtensions |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
627 |
ifTrue:['%1 classes (%4 changed) and %2 extensions for project "%3"'] |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
628 |
ifFalse:['%1 classes (%4 changed) for project "%3"']) |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
629 |
bindWith:classesToCheckIn size |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
630 |
with:methodsToCheckIn size |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
631 |
with:packageToCheckIn allBold |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
632 |
with:classesInChangeSet size) |
2848 | 633 |
initialAnswer:nil |
3141
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
634 |
withQuickOption:(classesToCheckIn size > 0) |
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
635 |
withValidateConsistencyOption:true. |
2848 | 636 |
checkinInfo isNil ifTrue:[ |
637 |
^ self. |
|
638 |
]. |
|
3145
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
639 |
checkinInfo validateConsistency ifTrue:[ |
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
640 |
self validateConsistencyOfPackage:packageToCheckIn doClasses:doClasses doExtensions:doExtensions. |
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
641 |
]. |
3141
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
642 |
]. |
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
643 |
|
2848 | 644 |
checkinInfo quickCheckIn ifTrue:[ |
645 |
(checkinInfo isStable or:[checkinInfo tagIt]) ifTrue:[ |
|
646 |
classesToTag := classesToCheckIn. |
|
647 |
originalCheckinInfo := checkinInfo. |
|
648 |
checkinInfo := checkinInfo copy. |
|
649 |
checkinInfo isStable:false. |
|
650 |
checkinInfo tag:nil. |
|
651 |
]. |
|
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
652 |
"/ not only the one's in the changeSet; |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
653 |
"/ also those which have not been checked in before. |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
654 |
newClasses := classesToCheckIn select:[:class | (class revisionOfManager:mgr) isNil ]. |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
655 |
classesToCheckIn := Set new |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
656 |
addAll:classesInChangeSet; |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
657 |
addAll:newClasses; |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
658 |
yourself. |
2848 | 659 |
]. |
660 |
||
661 |
"/ check if any of the classes contains methods for other packages ... |
|
662 |
classesToCheckIn do:[:eachClass | |
|
663 |
eachClass instAndClassMethodsDo:[:eachMethod | |
|
664 |
|mPgk| |
|
665 |
||
666 |
mPgk := eachMethod package. |
|
667 |
(mPgk = packageToCheckIn) ifFalse:[ |
|
668 |
mPgk == PackageId noProjectID ifTrue:[ |
|
669 |
looseMethods add:eachMethod |
|
670 |
] ifFalse:[ |
|
671 |
methodsInOtherPackages add:eachMethod |
|
672 |
] |
|
673 |
] |
|
674 |
]. |
|
675 |
]. |
|
676 |
||
677 |
askForMethodsInOtherPackages ifTrue:[ |
|
678 |
methodsInOtherPackages notEmpty ifTrue:[ |
|
679 |
otherPackages := Set new. |
|
680 |
methodsInOtherPackages do:[:eachMethod | otherPackages add:eachMethod package]. |
|
681 |
||
682 |
methodsInOtherPackages size == 1 ifTrue:[ |
|
683 |
msg := 'The ''%4'' method in ''%5'' is contained in the ''%2'' package.'. |
|
684 |
msg := msg , '\\This method will remain in its package.'. |
|
685 |
] ifFalse:[ |
|
686 |
otherPackages size == 1 ifTrue:[ |
|
687 |
msg := 'The %1 methods from the %2 package will remain in its package.' |
|
688 |
] ifFalse:[ |
|
689 |
msg := 'The %1 methods from %3 other packages will remain in their packages.' |
|
690 |
]. |
|
691 |
msg := msg , '\\Hint: if these are meant to belong to this package,'. |
|
692 |
msg := msg , '\move them first, then repeat the checkin operation.'. |
|
693 |
]. |
|
694 |
msg := msg withCRs. |
|
695 |
msg := msg bindWith:methodsInOtherPackages size |
|
696 |
with:otherPackages first allBold |
|
697 |
with:otherPackages size |
|
698 |
with:methodsInOtherPackages first selector allBold |
|
699 |
with:methodsInOtherPackages first mclass name allBold. |
|
700 |
(Dialog confirm:msg noLabel:(resources string:'Cancel')) ifFalse:[^ self]. |
|
701 |
]. |
|
702 |
]. |
|
703 |
||
704 |
doClasses ifTrue:[ |
|
705 |
classesToCheckIn notEmpty ifTrue:[ |
|
706 |
looseMethods notEmpty ifTrue:[ |
|
707 |
looseMethods size == 1 ifTrue:[ |
|
708 |
msg := 'The ''%2'' method in ''%3'' is unassigned (loose).'. |
|
709 |
msg := msg , '\\If you proceed, this method will be moved to the ''%4'' package'. |
|
710 |
msg := msg , '\\Hint: if this is meant to be an extension of another package,'. |
|
711 |
msg := msg , '\cancel and move it to the appropriate package first.'. |
|
712 |
] ifFalse:[ |
|
713 |
msg := 'There are %1 unassigned (loose) methods in classes from this project.'. |
|
714 |
msg := msg , '\\If you proceed, those will be moved to the ''%4'' package ?'. |
|
715 |
msg := msg , '\\Hint: if these are meant to be extensions of another package,'. |
|
716 |
msg := msg , '\cancel and move them to the appropriate package first.'. |
|
717 |
]. |
|
718 |
doClasses ifTrue:[ |
|
719 |
msg := msg , '\\If you answer with "No" here, you will be asked for each class individually.'. |
|
720 |
]. |
|
721 |
msg := msg withCRs. |
|
722 |
msg := msg bindWith:looseMethods size |
|
723 |
with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first selector allBold]) |
|
724 |
with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first mclass name allBold]) |
|
725 |
with:packageToCheckIn allBold. |
|
726 |
(Dialog confirm:msg noLabel:(resources string:'Cancel')) ifFalse:[^ self]. |
|
727 |
||
728 |
looseMethods do:[:mthd | |
|
729 |
mthd package:packageToCheckIn |
|
730 |
]. |
|
731 |
]. |
|
732 |
self checkinClasses:classesToCheckIn withInfo:checkinInfo. |
|
733 |
]. |
|
734 |
||
735 |
originalCheckinInfo notNil ifTrue:[ |
|
736 |
originalCheckinInfo isStable ifTrue:[ |
|
737 |
classesToTag do:[:eachClass | |
|
738 |
self tagClass:eachClass as:#stable |
|
739 |
]. |
|
740 |
]. |
|
741 |
originalCheckinInfo tagIt ifTrue:[ |
|
742 |
classesToTag do:[:eachClass | |
|
743 |
self tagClass:eachClass as:(originalCheckinInfo tag) |
|
744 |
]. |
|
745 |
]. |
|
746 |
]. |
|
747 |
]. |
|
748 |
||
749 |
doBuild ifTrue:[ |
|
750 |
self checkinBuildSupportFilesForPackage:packageToCheckIn |
|
751 |
]. |
|
752 |
||
753 |
"Created: / 13-10-2011 / 11:15:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2906 | 754 |
"Modified: / 04-09-2012 / 14:05:36 / cg" |
2848 | 755 |
! ! |
756 |
||
757 |
!SourceCodeManagerUtilitiesForContainerBasedManagers class methodsFor:'documentation'! |
|
758 |
||
759 |
version |
|
3250
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
760 |
^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilitiesForContainerBasedManagers.st,v 1.10 2013-05-07 12:18:56 cg Exp $' |
2848 | 761 |
! |
762 |
||
763 |
version_CVS |
|
3250
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
764 |
^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilitiesForContainerBasedManagers.st,v 1.10 2013-05-07 12:18:56 cg Exp $' |
2848 | 765 |
! ! |
3133 | 766 |