author | Claus Gittinger <cg@exept.de> |
Fri, 28 Nov 2014 17:09:01 +0100 | |
changeset 3651 | d58c178282c0 |
parent 3603 | ef654acb24f8 |
child 3772 | 399ff1b46d41 |
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 |
||
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
39 |
checkinBuildSupportFilesForPackage:packageID withInfo:checkinInfo |
3573
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
40 |
|anyFailure module directory mgr defClass| |
2848 | 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 |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
77 |
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
|
78 |
) ifTrue:[ |
2848 | 79 |
realDirectory ~= directory ifTrue:[ |
80 |
(mgr checkForExistingModule:module directory:realDirectory) ifFalse:[ |
|
81 |
mgr createModule:module directory:realDirectory |
|
82 |
]. |
|
83 |
]. |
|
3573
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
84 |
[:exit | |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
85 |
|answer| |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
86 |
|
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
87 |
(mgr |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
88 |
createContainerForText:fileContents |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
89 |
inModule:module |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
90 |
package:realDirectory |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
91 |
container:realFileName) ifTrue:[ exit value:nil ]. |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
92 |
|
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
93 |
answer := Dialog |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
94 |
confirmWithCancel:(resources |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
95 |
stringWithCRs:'Cannot create new container: ''%3'' (in %1:%2).\\Retry?' |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
96 |
with:module |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
97 |
with:realDirectory |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
98 |
with:realFileName). |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
99 |
|
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
100 |
answer == nil ifTrue:[ |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
101 |
AbortOperationRequest raise |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
102 |
]. |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
103 |
answer == false ifTrue:[ exit value:nil ]. |
af8f051e0a8b
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3537
diff
changeset
|
104 |
] loopWithExit. |
2848 | 105 |
] ifFalse:[ |
106 |
(mgr |
|
107 |
checkin:realFileName |
|
108 |
text:fileContents |
|
109 |
directory:realDirectory |
|
110 |
module:module |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
111 |
logMessage:checkinInfo logMessage |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
112 |
force:false |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
113 |
) ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
114 |
checkinInfo isStable ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
115 |
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
|
116 |
]. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
117 |
checkinInfo tagIt ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
118 |
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
|
119 |
]. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
120 |
] ifFalse:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
121 |
Transcript showCR:'checkin of ' , realFileName , ' failed'. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
122 |
anyFailure := true. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
123 |
]. |
2848 | 124 |
]. |
125 |
]. |
|
126 |
]. |
|
127 |
||
128 |
defClass instAndClassMethodsDo:[:m | m package:defClass package]. |
|
129 |
||
130 |
self |
|
131 |
checkinClasses:(Array with:defClass) |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
132 |
withInfo:checkinInfo |
2848 | 133 |
withCheck:false. |
134 |
||
135 |
||
136 |
self activityNotification:nil. |
|
137 |
||
138 |
anyFailure ifTrue:[ |
|
139 |
self warn:'Checkin failed - see Transcript.'. |
|
140 |
self activityNotification:'Checkin of build-support files failed - see Transcript.'. |
|
141 |
] ifFalse:[ |
|
142 |
self activityNotification:'Build-support files checked into the repository.'. |
|
143 |
]. |
|
144 |
||
145 |
"Created: / 09-08-2006 / 18:59:42 / fm" |
|
146 |
"Modified: / 12-10-2011 / 11:36:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
147 |
"Modified: / 25-07-2012 / 14:27:30 / cg" |
|
148 |
"Modified (format): / 25-07-2012 / 22:25:48 / cg" |
|
149 |
! |
|
150 |
||
151 |
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil |
|
152 |
"checkin a projects extensions into the source repository. |
|
153 |
If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message." |
|
154 |
||
3133 | 155 |
|logMessage checkinInfo mgr pri module directory containerFileName extensionsSource| |
2848 | 156 |
|
157 |
"/ the following is wrong - must ask the projectDefinition !! |
|
158 |
aPackageID asPackageId projectDefinitionClass notNil ifTrue:[ |
|
159 |
mgr := self sourceCodeManagerFor:aPackageID asPackageId projectDefinitionClass. |
|
160 |
] ifFalse:[ |
|
161 |
mgr := self sourceCodeManagerFor:aCollectionOfMethods first mclass. |
|
162 |
]. |
|
163 |
mgr isNil ifTrue:[ ^ false ]. |
|
164 |
||
165 |
module := aPackageID asPackageId module. |
|
166 |
directory := aPackageID asPackageId directory. |
|
167 |
containerFileName := self nameOfExtensionsContainer. |
|
168 |
||
169 |
aLogInfoOrStringOrNil isNil ifTrue:[ |
|
170 |
checkinInfo := self getCheckinInfoFor:containerFileName allBold initialAnswer:nil. |
|
171 |
checkinInfo isNil ifTrue:[^ false]. |
|
172 |
logMessage := checkinInfo logMessage. |
|
173 |
] ifFalse:[ |
|
174 |
aLogInfoOrStringOrNil isString ifTrue:[ |
|
175 |
logMessage := aLogInfoOrStringOrNil |
|
176 |
] ifFalse:[ |
|
177 |
checkinInfo := aLogInfoOrStringOrNil. |
|
178 |
logMessage := checkinInfo logMessage. |
|
179 |
]. |
|
180 |
]. |
|
181 |
||
182 |
(mgr checkForExistingContainer:containerFileName inModule:module directory:directory) ifFalse:[ |
|
183 |
(self checkForExistingModule:module usingManager:mgr allowCreate:true) ifFalse:[^ false]. |
|
184 |
LastModule := module. |
|
185 |
||
186 |
(self checkForExistingModule:module directory:directory usingManager:mgr allowCreate:true) ifFalse:[^ false]. |
|
187 |
LastPackage := directory. |
|
188 |
||
189 |
(self checkForExistingModule:module directory:directory container:containerFileName usingManager:mgr allowCreate:true) ifFalse:[^ false]. |
|
190 |
]. |
|
191 |
||
192 |
self activityNotification:(resources string:'Checking in %1' with:containerFileName). |
|
193 |
pri := Processor activePriority. |
|
194 |
Processor activeProcess |
|
195 |
withPriority:pri-1 to:pri |
|
196 |
do:[ |
|
3133 | 197 |
extensionsSource := self sourceCodeForExtensions:aCollectionOfMethods package:aPackageID forManager:mgr. |
198 |
"Care for non-ASCII/non-ISO-8859 characters in extension methods" |
|
199 |
extensionsSource isWideString ifTrue:[ |
|
200 |
extensionsSource := '"{ Encoding: utf8 }"' , Character cr asString , Character cr asString , extensionsSource. |
|
201 |
extensionsSource := extensionsSource utf8Encoded. |
|
202 |
]. |
|
2848 | 203 |
|
204 |
UserInformation handle:[:ex | |
|
205 |
Transcript showCR:ex description. |
|
206 |
ex proceed. |
|
207 |
] do:[ |
|
208 |
Transcript showCR:('checking in ',containerFileName,' ...'). |
|
209 |
(mgr |
|
210 |
checkin:containerFileName |
|
3133 | 211 |
text:extensionsSource |
2848 | 212 |
directory:directory |
213 |
module:module |
|
214 |
logMessage:logMessage |
|
215 |
force:false) |
|
216 |
ifFalse:[ |
|
217 |
Transcript showCR:'Checkin of ''' , containerFileName , ''' failed'. |
|
218 |
self warn:'Checkin of ''' , containerFileName allBold , ''' failed'. |
|
219 |
^ false. |
|
220 |
]. |
|
221 |
checkinInfo notNil ifTrue:[ |
|
222 |
|path| |
|
223 |
||
224 |
path := (module, '/', directory, '/', containerFileName). |
|
225 |
checkinInfo isStable ifTrue:[ |
|
226 |
"set stable tag for class that has been checked in" |
|
227 |
self tagPath:path as:#stable usingManager:mgr. |
|
228 |
]. |
|
229 |
checkinInfo tagIt ifTrue:[ |
|
230 |
"set an additional tag for class that has been checked in" |
|
231 |
self tagPath:path as:(checkinInfo tag) usingManager:mgr. |
|
232 |
]. |
|
233 |
]. |
|
234 |
mgr postCheckInExtensionsForPackage:aPackageID |
|
235 |
]. |
|
236 |
]. |
|
237 |
^ true |
|
238 |
||
239 |
"Modified: / 25-07-2012 / 18:38:40 / cg" |
|
240 |
! |
|
241 |
||
242 |
checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages |
|
3196
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
243 |
|mgr classesToCheckIn methodsToCheckIn methodsInPrjDef |
2848 | 244 |
methodsInOtherPackages looseMethods otherPackages |
3507
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
245 |
msg classesInChangeSet newClasses checkinInfo originalCheckinInfo classesToTag |
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
246 |
answer| |
2848 | 247 |
|
248 |
mgr := self sourceCodeManagerFor: packageToCheckIn. |
|
249 |
||
250 |
classesToCheckIn := IdentitySet new. |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
251 |
classesInChangeSet := IdentitySet new. |
2848 | 252 |
methodsToCheckIn := IdentitySet new. |
253 |
methodsInOtherPackages := IdentitySet new. |
|
254 |
looseMethods := IdentitySet new. |
|
255 |
||
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
256 |
"/ 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
|
257 |
(doClasses or:[doExtensions]) ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
258 |
Smalltalk allClassesDo:[:aClass | |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
259 |
|owner classPackage| |
3141
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
260 |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
261 |
(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
|
262 |
classPackage := aClass topOwningClass package |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
263 |
] ifFalse:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
264 |
classPackage := aClass package |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
265 |
]. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
266 |
(classPackage = packageToCheckIn) ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
267 |
classesToCheckIn add:aClass. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
268 |
]. |
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
269 |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
270 |
doExtensions ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
271 |
aClass isMeta ifFalse:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
272 |
"/ ... 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
|
273 |
(classesToCheckIn includes:aClass) ifFalse:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
274 |
aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
275 |
"/ methods in this project ... |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
276 |
(mthd package = packageToCheckIn) ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
277 |
methodsToCheckIn add:mthd |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
278 |
] |
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
279 |
] |
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
280 |
]. |
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
281 |
]. |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
282 |
]. |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
283 |
]. |
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
284 |
|
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
285 |
"/ 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
|
286 |
"/ 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
|
287 |
"/ 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
|
288 |
classesInChangeSet := ChangeSet current selectClassesForWhichIncludesChangeForClassOrMetaclassOrPrivateClassFrom:classesToCheckIn. |
2848 | 289 |
]. |
290 |
||
291 |
doExtensions ifTrue:[ |
|
292 |
methodsToCheckIn notEmpty ifTrue:[ |
|
293 |
doClasses ifTrue:[ |
|
294 |
msg := '%1 classes (%4 changed) '. |
|
295 |
] ifFalse:[ |
|
296 |
msg := ''. |
|
297 |
]. |
|
298 |
doExtensions ifTrue:[ |
|
299 |
doClasses ifTrue:[ |
|
300 |
msg := msg , 'and '. |
|
301 |
]. |
|
302 |
msg := msg , '%2 extensions '. |
|
303 |
]. |
|
304 |
msg := msg , 'of project "%3"'. |
|
305 |
||
306 |
checkinInfo := self |
|
307 |
getCheckinInfoFor:(msg |
|
308 |
bindWith:classesToCheckIn size |
|
309 |
with:methodsToCheckIn size |
|
310 |
with:packageToCheckIn allBold |
|
311 |
with:classesInChangeSet size) |
|
312 |
initialAnswer:nil |
|
3141
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
313 |
withQuickOption:(classesToCheckIn size > 0) |
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
314 |
withValidateConsistencyOption:true. |
2848 | 315 |
checkinInfo isNil ifTrue:[ |
316 |
^ self. |
|
317 |
]. |
|
3145
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
318 |
|
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
319 |
checkinInfo validateConsistency ifTrue:[ |
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
320 |
self validateConsistencyOfPackage:packageToCheckIn doClasses:doClasses doExtensions:doExtensions. |
3196
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
321 |
"/ could have changed/recompiled methods... |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
322 |
"/ mhmh - should we checkin what is specified in the prj-def, |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
323 |
"/ 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
|
324 |
|
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
325 |
methodsInPrjDef := packageToCheckIn asPackageId projectDefinitionClass extensionMethods. |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
326 |
methodsInPrjDef := methodsInPrjDef reject:[:m | m isNil]. |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
327 |
methodsInPrjDef asSet ~= methodsToCheckIn asSet ifTrue:[ |
3507
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
328 |
answer:= Dialog |
3651
d58c178282c0
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3603
diff
changeset
|
329 |
confirmWithCancel:('The set of methods in image is different from what is specified in the project definition.\You should probably make sure that all extension methods are all associated to the correct package.\\Check in image methods (%1) or definition methods (%2)?' |
3196
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
330 |
bindWith: methodsToCheckIn size |
3651
d58c178282c0
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3603
diff
changeset
|
331 |
with: methodsInPrjDef size) withCRs |
3507
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
332 |
labels:#('Image Methods' 'Definition Methods' 'Cancel') |
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
333 |
values:#(true false nil) |
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
334 |
default:nil. |
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
335 |
|
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
336 |
"/ answer := Dialog |
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
337 |
"/ 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)?' |
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
338 |
"/ bindWith: methodsToCheckIn size |
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
339 |
"/ with: methodsInPrjDef size) |
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
340 |
"/ yesLabel:'Image Methods' |
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
341 |
"/ noLabel:'Definition Methods'. |
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
342 |
answer isNil ifTrue:[AbortOperationRequest raise]. |
ef4dad1a2b32
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3400
diff
changeset
|
343 |
answer ifFalse:[ |
3196
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
344 |
methodsToCheckIn := methodsInPrjDef. |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
345 |
]. |
d91dbd26f40c
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3172
diff
changeset
|
346 |
]. |
3145
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
347 |
]. |
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
348 |
|
3250
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
349 |
"/ also need the extensionVersion methods in the projectDefinition class, |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
350 |
"/ 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
|
351 |
"/ CVS id for the extensions container, not for the projDefinition container. |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
352 |
packageToCheckIn asPackageId projectDefinitionClass theMetaclass selectorsAndMethodsDo:[:sel :mthd | |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
353 |
(AbstractSourceCodeManager isExtensionsVersionMethodSelector:sel) ifTrue:[ |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
354 |
methodsToCheckIn add:mthd |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
355 |
]. |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
356 |
]. |
fe3f6d8ead83
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3196
diff
changeset
|
357 |
|
2848 | 358 |
(self |
359 |
checkinExtensionMethods:methodsToCheckIn |
|
360 |
forPackage:packageToCheckIn |
|
361 |
withInfo:checkinInfo) |
|
362 |
ifFalse:[ |
|
363 |
Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn). |
|
364 |
^ self. |
|
365 |
] |
|
366 |
] ifFalse:[ |
|
367 |
"/ there may have been extension-methods previously - if so, remove them |
|
368 |
(mgr |
|
369 |
checkForExistingContainer:'extensions.st' inPackage:packageToCheckIn) |
|
370 |
ifTrue:[ |
|
371 |
"/ self halt. |
|
372 |
(self |
|
373 |
checkinExtensionMethods:#() |
|
374 |
forPackage:packageToCheckIn |
|
375 |
withInfo:'No extensions any more') |
|
376 |
ifFalse:[ |
|
377 |
Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn). |
|
378 |
^ self. |
|
379 |
] |
|
380 |
] |
|
381 |
]. |
|
382 |
]. |
|
383 |
||
384 |
checkinInfo isNil ifTrue:[ |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
385 |
|infoString| |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
386 |
|
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
387 |
doExtensions ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
388 |
infoString := '%1 classes (%4 changed) and %2 extensions for project "%3"'. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
389 |
] ifFalse:[doClasses ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
390 |
infoString := '%1 classes (%4 changed) for project "%3"'. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
391 |
] ifFalse:[doBuild ifTrue:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
392 |
infoString := 'Build support files for project "%3"'. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
393 |
] ifFalse:[ |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
394 |
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
|
395 |
]]]. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
396 |
|
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
397 |
infoString := infoString |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
398 |
bindWith:classesToCheckIn size |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
399 |
with:methodsToCheckIn size |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
400 |
with:packageToCheckIn allBold |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
401 |
with:classesInChangeSet size. |
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
402 |
|
2848 | 403 |
checkinInfo := self |
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
404 |
getCheckinInfoFor:infoString |
2848 | 405 |
initialAnswer:nil |
3141
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
406 |
withQuickOption:(classesToCheckIn size > 0) |
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
407 |
withValidateConsistencyOption:true. |
2848 | 408 |
checkinInfo isNil ifTrue:[ |
409 |
^ self. |
|
410 |
]. |
|
3145
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
411 |
checkinInfo validateConsistency ifTrue:[ |
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
412 |
self validateConsistencyOfPackage:packageToCheckIn doClasses:doClasses doExtensions:doExtensions. |
e59d8d1ab71a
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3141
diff
changeset
|
413 |
]. |
3141
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
414 |
]. |
25cd1cd26450
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3133
diff
changeset
|
415 |
|
2848 | 416 |
checkinInfo quickCheckIn ifTrue:[ |
417 |
(checkinInfo isStable or:[checkinInfo tagIt]) ifTrue:[ |
|
418 |
classesToTag := classesToCheckIn. |
|
419 |
originalCheckinInfo := checkinInfo. |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
420 |
checkinInfo := checkinInfo deepCopy. |
2848 | 421 |
checkinInfo isStable:false. |
422 |
checkinInfo tag:nil. |
|
423 |
]. |
|
3164
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
424 |
"/ not only the one's in the changeSet; |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
425 |
"/ also those which have not been checked in before. |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
426 |
newClasses := classesToCheckIn select:[:class | (class revisionOfManager:mgr) isNil ]. |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
427 |
classesToCheckIn := Set new |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
428 |
addAll:classesInChangeSet; |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
429 |
addAll:newClasses; |
e54571b3021f
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3145
diff
changeset
|
430 |
yourself. |
2848 | 431 |
]. |
432 |
||
433 |
"/ check if any of the classes contains methods for other packages ... |
|
434 |
classesToCheckIn do:[:eachClass | |
|
435 |
eachClass instAndClassMethodsDo:[:eachMethod | |
|
436 |
|mPgk| |
|
437 |
||
438 |
mPgk := eachMethod package. |
|
439 |
(mPgk = packageToCheckIn) ifFalse:[ |
|
440 |
mPgk == PackageId noProjectID ifTrue:[ |
|
441 |
looseMethods add:eachMethod |
|
442 |
] ifFalse:[ |
|
443 |
methodsInOtherPackages add:eachMethod |
|
444 |
] |
|
445 |
] |
|
446 |
]. |
|
447 |
]. |
|
448 |
||
449 |
askForMethodsInOtherPackages ifTrue:[ |
|
450 |
methodsInOtherPackages notEmpty ifTrue:[ |
|
451 |
otherPackages := Set new. |
|
452 |
methodsInOtherPackages do:[:eachMethod | otherPackages add:eachMethod package]. |
|
453 |
||
454 |
methodsInOtherPackages size == 1 ifTrue:[ |
|
455 |
msg := 'The ''%4'' method in ''%5'' is contained in the ''%2'' package.'. |
|
456 |
msg := msg , '\\This method will remain in its package.'. |
|
457 |
] ifFalse:[ |
|
458 |
otherPackages size == 1 ifTrue:[ |
|
3651
d58c178282c0
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3603
diff
changeset
|
459 |
msg := 'The %1 methods from the %2 package will remain in their package.' |
2848 | 460 |
] ifFalse:[ |
461 |
msg := 'The %1 methods from %3 other packages will remain in their packages.' |
|
462 |
]. |
|
463 |
msg := msg , '\\Hint: if these are meant to belong to this package,'. |
|
464 |
msg := msg , '\move them first, then repeat the checkin operation.'. |
|
465 |
]. |
|
466 |
msg := msg withCRs. |
|
467 |
msg := msg bindWith:methodsInOtherPackages size |
|
468 |
with:otherPackages first allBold |
|
469 |
with:otherPackages size |
|
470 |
with:methodsInOtherPackages first selector allBold |
|
471 |
with:methodsInOtherPackages first mclass name allBold. |
|
472 |
(Dialog confirm:msg noLabel:(resources string:'Cancel')) ifFalse:[^ self]. |
|
473 |
]. |
|
474 |
]. |
|
475 |
||
476 |
doClasses ifTrue:[ |
|
477 |
classesToCheckIn notEmpty ifTrue:[ |
|
478 |
looseMethods notEmpty ifTrue:[ |
|
479 |
looseMethods size == 1 ifTrue:[ |
|
480 |
msg := 'The ''%2'' method in ''%3'' is unassigned (loose).'. |
|
481 |
msg := msg , '\\If you proceed, this method will be moved to the ''%4'' package'. |
|
482 |
msg := msg , '\\Hint: if this is meant to be an extension of another package,'. |
|
483 |
msg := msg , '\cancel and move it to the appropriate package first.'. |
|
484 |
] ifFalse:[ |
|
485 |
msg := 'There are %1 unassigned (loose) methods in classes from this project.'. |
|
486 |
msg := msg , '\\If you proceed, those will be moved to the ''%4'' package ?'. |
|
487 |
msg := msg , '\\Hint: if these are meant to be extensions of another package,'. |
|
488 |
msg := msg , '\cancel and move them to the appropriate package first.'. |
|
489 |
]. |
|
490 |
doClasses ifTrue:[ |
|
491 |
msg := msg , '\\If you answer with "No" here, you will be asked for each class individually.'. |
|
492 |
]. |
|
493 |
msg := msg withCRs. |
|
494 |
msg := msg bindWith:looseMethods size |
|
495 |
with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first selector allBold]) |
|
496 |
with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first mclass name allBold]) |
|
497 |
with:packageToCheckIn allBold. |
|
498 |
(Dialog confirm:msg noLabel:(resources string:'Cancel')) ifFalse:[^ self]. |
|
499 |
||
500 |
looseMethods do:[:mthd | |
|
501 |
mthd package:packageToCheckIn |
|
502 |
]. |
|
503 |
]. |
|
504 |
self checkinClasses:classesToCheckIn withInfo:checkinInfo. |
|
505 |
]. |
|
506 |
||
507 |
originalCheckinInfo notNil ifTrue:[ |
|
508 |
originalCheckinInfo isStable ifTrue:[ |
|
509 |
classesToTag do:[:eachClass | |
|
510 |
self tagClass:eachClass as:#stable |
|
511 |
]. |
|
512 |
]. |
|
513 |
originalCheckinInfo tagIt ifTrue:[ |
|
514 |
classesToTag do:[:eachClass | |
|
515 |
self tagClass:eachClass as:(originalCheckinInfo tag) |
|
516 |
]. |
|
517 |
]. |
|
518 |
]. |
|
519 |
]. |
|
520 |
||
521 |
doBuild ifTrue:[ |
|
3367
dc9d785a4ca7
Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents:
3362
diff
changeset
|
522 |
self checkinBuildSupportFilesForPackage:packageToCheckIn withInfo:(originalCheckinInfo ? checkinInfo). |
2848 | 523 |
]. |
524 |
||
525 |
"Created: / 13-10-2011 / 11:15:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2906 | 526 |
"Modified: / 04-09-2012 / 14:05:36 / cg" |
3537
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
527 |
! |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
528 |
|
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
529 |
comparePackages:packages askForRevision:askForRevision |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
530 |
"Compares code of given packages (loaded in the image) against a specific revision |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
531 |
and opens a diff browser on differences. |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
532 |
|
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
533 |
If `askForRevision` is true, then user is asked to specify to which revision to |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
534 |
update. If `askForRevision` is false, then packages are updated to a 'newest' |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
535 |
revision. |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
536 |
|
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
537 |
NOTE: Definition of `newest` revision may vary. For SCMs which allows for multiple |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
538 |
heads, it is not clear which one it is. In that case, even if `askForRevision` is |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
539 |
false, this method may result in user interation, asking user to select which of the |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
540 |
newest she wants." |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
541 |
|
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
542 |
|dateFormat string dateOrNil symbolicName| |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
543 |
|
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
544 |
dateFormat := UserPreferences current dateInputFormat. |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
545 |
string := Dialog |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
546 |
request:(resources |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
547 |
string:'Compare with version from date (%1) or tag (any other format):' |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
548 |
with:dateFormat) |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
549 |
initialAnswer:(Date today printStringFormat:dateFormat). |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
550 |
|
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
551 |
string isEmptyOrNil ifTrue:[^ self]. |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
552 |
dateOrNil := Date readFrom:string printFormat:dateFormat onError:nil. |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
553 |
dateOrNil isNil ifTrue:[ |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
554 |
symbolicName := string |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
555 |
]. |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
556 |
|
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
557 |
packages value do:[:eachProject | |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
558 |
dateOrNil notNil ifTrue:[ |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
559 |
self compareProject:eachProject withRepositoryVersionFrom:dateOrNil |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
560 |
] ifFalse:[ |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
561 |
self compareProject:eachProject withRepositoryVersionTaggedAs:symbolicName |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
562 |
] |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
563 |
]. |
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
564 |
|
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
565 |
|
ee6b24d5f0f8
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3507
diff
changeset
|
566 |
"Created: / 04-04-2014 / 15:29:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2848 | 567 |
! ! |
568 |
||
569 |
!SourceCodeManagerUtilitiesForContainerBasedManagers class methodsFor:'documentation'! |
|
570 |
||
571 |
version |
|
3651
d58c178282c0
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3603
diff
changeset
|
572 |
^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilitiesForContainerBasedManagers.st,v 1.23 2014-11-28 16:09:01 cg Exp $' |
2848 | 573 |
! |
574 |
||
575 |
version_CVS |
|
3651
d58c178282c0
class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents:
3603
diff
changeset
|
576 |
^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilitiesForContainerBasedManagers.st,v 1.23 2014-11-28 16:09:01 cg Exp $' |
2848 | 577 |
! ! |
3133 | 578 |