author | Claus Gittinger <cg@exept.de> |
Thu, 29 Dec 2011 14:37:43 +0100 | |
changeset 2691 | 01d067355899 |
parent 2688 | fa8075458983 |
child 2692 | e5b7d59ce49c |
permissions | -rw-r--r-- |
906 | 1 |
" |
2 |
COPYRIGHT (c) 2000 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 |
" |
|
920 | 12 |
"{ Package: 'stx:libbasic3' }" |
13 |
||
873 | 14 |
Object subclass:#SourceCodeManagerUtilities |
2597
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
15 |
instanceVariableNames:'manager resources' |
2286
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
16 |
classVariableNames:'LastSourceLogMessage LastModule LastPackage YesToAllQuery |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
17 |
YesToAllNotification' |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
18 |
poolDictionaries:'' |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
19 |
category:'System-SourceCodeManagement' |
873 | 20 |
! |
21 |
||
22 |
!SourceCodeManagerUtilities class methodsFor:'documentation'! |
|
23 |
||
906 | 24 |
copyright |
25 |
" |
|
26 |
COPYRIGHT (c) 2000 eXept Software AG |
|
27 |
All Rights Reserved |
|
28 |
||
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
||
37 |
! |
|
38 |
||
873 | 39 |
documentation |
40 |
" |
|
41 |
utility code which is useful at more than one place |
|
42 |
(extracted from the browser) |
|
43 |
||
44 |
[author:] |
|
45 |
Claus Gittinger (cg@exept) |
|
46 |
||
47 |
[see also:] |
|
48 |
||
49 |
[instance variables:] |
|
50 |
||
51 |
[class variables:] |
|
52 |
" |
|
53 |
! ! |
|
54 |
||
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
55 |
!SourceCodeManagerUtilities class methodsFor:'instance creation'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
56 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
57 |
forManager: aSourceCodeManager |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
58 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
59 |
^self new setManager: aSourceCodeManager |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
60 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
61 |
"Created: / 10-10-2011 / 11:45:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2597
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
62 |
! |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
63 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
64 |
new |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
65 |
"return an initialized instance" |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
66 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
67 |
^ self basicNew initialize. |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
68 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
69 |
|
992 | 70 |
!SourceCodeManagerUtilities class methodsFor:'Signal constants'! |
71 |
||
72 |
yesToAllNotification |
|
73 |
YesToAllNotification isNil ifTrue:[ |
|
74 |
YesToAllNotification := QuerySignal new. |
|
75 |
]. |
|
76 |
^ YesToAllNotification |
|
77 |
! |
|
78 |
||
79 |
yesToAllQuery |
|
80 |
YesToAllQuery isNil ifTrue:[ |
|
81 |
YesToAllQuery := QuerySignal new. |
|
82 |
]. |
|
83 |
^ YesToAllQuery |
|
84 |
! ! |
|
85 |
||
1084 | 86 |
!SourceCodeManagerUtilities class methodsFor:'accessing'! |
87 |
||
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
88 |
default |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
89 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
90 |
Default isNil ifTrue:[Default := self new]. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
91 |
^Default |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
92 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
93 |
"Created: / 10-10-2011 / 11:28:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
94 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
95 |
|
1084 | 96 |
lastModule |
97 |
"return the value of the static variable 'LastModule' (automatically generated)" |
|
98 |
||
99 |
^ LastModule |
|
100 |
! |
|
101 |
||
102 |
lastModule:something |
|
103 |
"set the value of the static variable 'LastModule' (automatically generated)" |
|
104 |
||
105 |
LastModule := something. |
|
106 |
! |
|
107 |
||
108 |
lastPackage |
|
109 |
"return the value of the static variable 'LastPackage' (automatically generated)" |
|
110 |
||
111 |
^ LastPackage |
|
112 |
! |
|
113 |
||
114 |
lastPackage:something |
|
115 |
"set the value of the static variable 'LastPackage' (automatically generated)" |
|
116 |
||
117 |
LastPackage := something. |
|
118 |
! ! |
|
119 |
||
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
120 |
!SourceCodeManagerUtilities class methodsFor:'error handling'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
121 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
122 |
doesNotUnderstand: aMessage |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
123 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
124 |
(self default respondsTo: aMessage selector) ifTrue:[ |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
125 |
"Bad, method moved to instance side but not forwarded" |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
126 |
self breakPoint: #jv. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
127 |
self breakPoint: #cg. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
128 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
129 |
^aMessage sendTo: self default |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
130 |
] ifFalse:[ |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
131 |
^super doesNotUnderstand: aMessage |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
132 |
] |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
133 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
134 |
"Created: / 10-10-2011 / 14:04:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
135 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
136 |
|
2569 | 137 |
!SourceCodeManagerUtilities class methodsFor:'private-migration'! |
138 |
||
139 |
compileForwarders |
|
140 |
||
141 |
"Utility method" |
|
142 |
||
143 |
" |
|
144 |
SourceCodeManagerUtilities compileForwarders. |
|
145 |
" |
|
146 |
||
147 |
self methodsDo:[:m| |
|
148 |
| sel | |
|
149 |
sel := m selector. |
|
150 |
((self class includesSelector: sel) and: [(self class >> sel) source = m source]) ifTrue:[ |
|
151 |
| source header | |
|
152 |
||
153 |
header := m source asStringCollection first. |
|
154 |
source := '%1 |
|
155 |
||
156 |
<resource: #obsolete> |
|
157 |
||
158 |
self obsoleteMethodWarning: ''Please use instance protocol (SourceCodeManagerUtilities default doSomething)''. |
|
159 |
||
160 |
^self default %1' bindWith: header with: header. |
|
161 |
||
162 |
self halt: 'Inspect source'. |
|
163 |
self class compile: source classified: m category. |
|
164 |
]. |
|
165 |
||
166 |
] |
|
167 |
||
168 |
"Created: / 11-10-2011 / 10:55:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
169 |
! ! |
|
170 |
||
1806 | 171 |
!SourceCodeManagerUtilities class methodsFor:'resources'! |
172 |
||
173 |
resourcePackage |
|
174 |
^ #'stx:libtool' |
|
175 |
! ! |
|
176 |
||
873 | 177 |
!SourceCodeManagerUtilities class methodsFor:'utilities'! |
178 |
||
1882
8b3a4c2a2c2a
when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents:
1879
diff
changeset
|
179 |
classIsNotYetInRepository:aClass withManager:mgr |
2570 | 180 |
|
181 |
<resource: #obsolete> |
|
182 |
||
183 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
184 |
||
185 |
^self default classIsNotYetInRepository:aClass withManager:mgr |
|
1882
8b3a4c2a2c2a
when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents:
1879
diff
changeset
|
186 |
! |
8b3a4c2a2c2a
when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents:
1879
diff
changeset
|
187 |
|
1704 | 188 |
nameOfExtensionsContainer |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
189 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
190 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
191 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
192 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
193 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
194 |
^self default nameOfExtensionsContainer |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
195 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
196 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
197 |
setPackageOfAllMethodsIn:aClass to:aPackage |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
198 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
199 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
200 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
201 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
202 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
203 |
^self default setPackageOfAllMethodsIn:aClass to:aPackage |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
204 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
205 |
"Modified: / 10-10-2011 / 14:00:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
206 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
207 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
208 |
setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
209 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
210 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
211 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
212 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
213 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
214 |
^self default setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
215 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
216 |
"Created: / 10-10-2011 / 14:00:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
217 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
218 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
219 |
sourceCodeManagerFor:aClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
220 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
221 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
222 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
223 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
224 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
225 |
^self default sourceCodeManagerFor:aClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
226 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
227 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
228 |
sourceCodeOfClass:aClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
229 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
230 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
231 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
232 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
233 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
234 |
^self default sourceCodeOfClass:aClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
235 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
236 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
237 |
versionString:a isLessThan:b |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
238 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
239 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
240 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
241 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
242 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
243 |
^self default versionString:a isLessThan:b |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
244 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
245 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
246 |
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
247 |
|
2691 | 248 |
changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
249 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
250 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
251 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
252 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
253 |
|
2691 | 254 |
^self default changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager |
255 |
||
256 |
"Created: / 29-12-2011 / 14:28:08 / cg" |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
257 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
258 |
|
2691 | 259 |
changeSetForExtensionMethodsForPackage:packageToCheckOut revision:revisionOrNil orAskForRevision:askForRevision usingManager:aSourceCodeManager |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
260 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
261 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
262 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
263 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
264 |
|
2691 | 265 |
^self default |
266 |
changeSetForExtensionMethodsForPackage:packageToCheckOut |
|
267 |
revision:revisionOrNil |
|
268 |
orAskForRevision:askForRevision |
|
269 |
usingManager:aSourceCodeManager |
|
270 |
||
271 |
"Created: / 29-12-2011 / 14:28:14 / cg" |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
272 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
273 |
|
2691 | 274 |
checkForExistingModule:module directory:directory container:containerFileName usingManager:mgr allowCreate:allowCreate |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
275 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
276 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
277 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
278 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
279 |
|
2691 | 280 |
^self default checkForExistingModule:module directory:directory container:containerFileName usingManager:mgr allowCreate:allowCreate |
281 |
||
282 |
"Created: / 29-12-2011 / 14:30:37 / cg" |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
283 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
284 |
|
2691 | 285 |
checkForExistingModule:module directory:directory usingManager:mgr allowCreate:allowCreate |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
286 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
287 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
288 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
289 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
290 |
|
2691 | 291 |
^self default checkForExistingModule:module directory:directory usingManager:mgr allowCreate:allowCreate |
292 |
||
293 |
"Created: / 29-12-2011 / 14:29:02 / cg" |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
294 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
295 |
|
2691 | 296 |
checkForExistingModule:module usingManager:mgr allowCreate:allowCreate |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
297 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
298 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
299 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
300 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
301 |
|
2691 | 302 |
^self default checkForExistingModule:module usingManager:mgr allowCreate:allowCreate |
303 |
||
304 |
"Created: / 29-12-2011 / 14:30:00 / cg" |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
305 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
306 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
307 |
checkinClass:aClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
308 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
309 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
310 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
311 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
312 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
313 |
^self default checkinClass:aClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
314 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
315 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
316 |
checkinClass:aClass withInfo:aLogInfoOrNil |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
317 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
318 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
319 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
320 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
321 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
322 |
^self default checkinClass:aClass withInfo:aLogInfoOrNil |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
323 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
324 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
325 |
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass |
2569 | 326 |
|
327 |
<resource: #obsolete> |
|
328 |
||
329 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
330 |
||
331 |
^self default checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
332 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
333 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
334 |
checkinClasses:aCollectionOfClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
335 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
336 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
337 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
338 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
339 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
340 |
^self default checkinClasses:aCollectionOfClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
341 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
342 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
343 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
344 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
345 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
346 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
347 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
348 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
349 |
^self default checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
350 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
351 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
352 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses |
2569 | 353 |
|
354 |
<resource: #obsolete> |
|
355 |
||
356 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
357 |
||
358 |
^self default checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
359 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
360 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
361 |
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
362 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
363 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
364 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
365 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
366 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
367 |
^self default checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
368 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
369 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
370 |
checkoutClass:aClass askForMerge:askForMerge |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
371 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
372 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
373 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
374 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
375 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
376 |
^self default checkoutClass:aClass askForMerge:askForMerge |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
377 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
378 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
379 |
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
380 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
381 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
382 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
383 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
384 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
385 |
^self default checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
386 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
387 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
388 |
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge askForConfirmation:askForConfirmation |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
389 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
390 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
391 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
392 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
393 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
394 |
^self default checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge askForConfirmation:askForConfirmation |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
395 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
396 |
|
2691 | 397 |
checkoutExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision askForMerge:askForMerge usingManager:aSourceCodeManager |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
398 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
399 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
400 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
401 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
402 |
|
2691 | 403 |
^self default checkoutExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision askForMerge:askForMerge usingManager:aSourceCodeManager |
404 |
||
405 |
"Created: / 29-12-2011 / 14:34:24 / cg" |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
406 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
407 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
408 |
compareClassWithRepository:aClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
409 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
410 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
411 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
412 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
413 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
414 |
^self default compareClassWithRepository:aClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
415 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
416 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
417 |
compareClassWithRepository:aClass askForRevision:askForRevision |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
418 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
419 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
420 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
421 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
422 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
423 |
^self default compareClassWithRepository:aClass askForRevision:askForRevision |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
424 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
425 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
426 |
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
427 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
428 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
429 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
430 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
431 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
432 |
^self default compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
433 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
434 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
435 |
compareProjectWithRepository:aProject |
2569 | 436 |
|
437 |
<resource: #obsolete> |
|
438 |
||
439 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
440 |
||
441 |
^self default compareProjectWithRepository:aProject |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
442 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
443 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
444 |
createSourceContainerForClass:aClass |
2569 | 445 |
|
446 |
<resource: #obsolete> |
|
447 |
||
448 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
449 |
||
450 |
^self default createSourceContainerForClass:aClass |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
451 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
452 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
453 |
defineSourceContainerForClass:aClass title:title text:boxText createDirectories:createDirs createContainer:createContainer |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
454 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
455 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
456 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
457 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
458 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
459 |
^self default defineSourceContainerForClass:aClass title:title text:boxText createDirectories:createDirs createContainer:createContainer |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
460 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
461 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
462 |
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
463 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
464 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
465 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
466 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
467 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
468 |
^self default diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
469 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
470 |
|
2691 | 471 |
ensureCorrectVersionMethodsInClass:aClass usingManager:aManager |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
472 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
473 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
474 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
475 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
476 |
|
2691 | 477 |
^self default ensureCorrectVersionMethodsInClass:aClass usingManager:aManager |
478 |
||
479 |
"Created: / 29-12-2011 / 14:33:37 / cg" |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
480 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
481 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
482 |
getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil forClass:aClass valuesInto:aBlock |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
483 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
484 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
485 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
486 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
487 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
488 |
^self default getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil forClass:aClass valuesInto:aBlock |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
489 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
490 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
491 |
removeSourceContainerForClass:aClass |
2569 | 492 |
|
493 |
<resource: #obsolete> |
|
494 |
||
495 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
496 |
||
497 |
^self default removeSourceContainerForClass:aClass |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
498 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
499 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
500 |
removeSourceContainerForClass:aClass confirm:doConfirm warn:doWarn |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
501 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
502 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
503 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
504 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
505 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
506 |
^self default removeSourceContainerForClass:aClass confirm:doConfirm warn:doWarn |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
507 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
508 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
509 |
repositoryLogOf:aClass onto:aStream |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
510 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
511 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
512 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
513 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
514 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
515 |
^self default repositoryLogOf:aClass onto:aStream |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
516 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
517 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
518 |
repositoryLogOf:aClass short:shortOrNot onto:aStream |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
519 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
520 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
521 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
522 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
523 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
524 |
^self default repositoryLogOf:aClass short:shortOrNot onto:aStream |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
525 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
526 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
527 |
tagClass:aClass as:tag |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
528 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
529 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
530 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
531 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
532 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
533 |
^self default tagClass:aClass as:tag |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
534 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
535 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
536 |
tagClasses:aCollectionOfClasses as:tag |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
537 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
538 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
539 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
540 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
541 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
542 |
^self default tagClasses:aCollectionOfClasses as:tag |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
543 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
544 |
|
2691 | 545 |
tagPath:aPath as:tag usingManager:aManager |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
546 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
547 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
548 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
549 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
550 |
|
2691 | 551 |
^self default tagPath:aPath as:tag usingManager:aManager |
552 |
||
553 |
"Created: / 29-12-2011 / 14:31:43 / cg" |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
554 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
555 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
556 |
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs-helpers'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
557 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
558 |
getMethodVersionsOfClass:aClass selector:selector numberOfRevisions:numberOfRevisionsOrNil |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
559 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
560 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
561 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
562 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
563 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
564 |
^self default getMethodVersionsOfClass:aClass selector:selector numberOfRevisions:numberOfRevisionsOrNil |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
565 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
566 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
567 |
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs-user interaction'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
568 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
569 |
askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
570 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
571 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
572 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
573 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
574 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
575 |
^self default askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
576 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
577 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
578 |
askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName forNewContainer:forNewContainer |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
579 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
580 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
581 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
582 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
583 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
584 |
^self default askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName forNewContainer:forNewContainer |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
585 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
586 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
587 |
askForExistingRevision:boxText title:title class:aClass |
2570 | 588 |
|
589 |
<resource: #obsolete> |
|
590 |
||
591 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
592 |
||
593 |
^self default askForExistingRevision:boxText title:title class:aClass |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
594 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
595 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
596 |
askForExistingRevision:boxText title:title class:clsOrNil manager:aSourceCodeManager module:module package:directory fileName:fileName |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
597 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
598 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
599 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
600 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
601 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
602 |
^self default askForExistingRevision:boxText title:title class:clsOrNil manager:aSourceCodeManager module:module package:directory fileName:fileName |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
603 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
604 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
605 |
checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
606 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
607 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
608 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
609 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
610 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
611 |
^self default checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
612 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
613 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
614 |
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil |
2569 | 615 |
|
616 |
<resource: #obsolete> |
|
617 |
||
618 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
619 |
||
620 |
^self default getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
621 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
622 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
623 |
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
624 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
625 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
626 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
627 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
628 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
629 |
^self default getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
630 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
631 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
632 |
goodInitialLogMessageForCheckinClassOfClass:aClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
633 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
634 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
635 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
636 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
637 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
638 |
^self default goodInitialLogMessageForCheckinClassOfClass:aClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
639 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
640 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
641 |
!SourceCodeManagerUtilities class methodsFor:'utilities-encoding'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
642 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
643 |
guessEncodingOfFile:aFilename |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
644 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
645 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
646 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
647 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
648 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
649 |
^self default guessEncodingOfFile:aFilename |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
650 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
651 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
652 |
guessEncodingOfStream:aStream |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
653 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
654 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
655 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
656 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
657 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
658 |
^self default guessEncodingOfStream:aStream |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
659 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
660 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
661 |
!SourceCodeManagerUtilities methodsFor:'accessing'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
662 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
663 |
classResources |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
664 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
665 |
^self class classResources |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
666 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
667 |
"Created: / 10-10-2011 / 11:42:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2569 | 668 |
! |
669 |
||
670 |
yesToAllNotification |
|
671 |
||
672 |
^self class yesToAllNotification |
|
673 |
||
674 |
"Created: / 11-10-2011 / 12:01:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
675 |
! |
|
676 |
||
677 |
yesToAllQuery |
|
678 |
||
679 |
^self class yesToAllQuery |
|
680 |
||
681 |
"Created: / 11-10-2011 / 12:01:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
682 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
683 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
684 |
!SourceCodeManagerUtilities methodsFor:'error handling'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
685 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
686 |
doesNotUnderstand: aMessage |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
687 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
688 |
(self class respondsTo: aMessage selector) ifTrue:[ |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
689 |
"Bad, method is not moved the the instance side" |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
690 |
self breakPoint: #jv. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
691 |
self breakPoint: #cg. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
692 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
693 |
^aMessage sendTo: self class |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
694 |
] ifFalse:[ |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
695 |
^super doesNotUnderstand: aMessage |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
696 |
] |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
697 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
698 |
"Created: / 10-10-2011 / 14:02:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
699 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
700 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
701 |
!SourceCodeManagerUtilities methodsFor:'initialization'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
702 |
|
2597
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
703 |
initialize |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
704 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
705 |
resources := self classResources. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
706 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
707 |
"Modified: / 13-10-2011 / 11:03:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
708 |
! |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
709 |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
710 |
setManager: aSourceCodeManager |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
711 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
712 |
manager := aSourceCodeManager |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
713 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
714 |
"Created: / 10-10-2011 / 11:47:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
715 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
716 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
717 |
!SourceCodeManagerUtilities methodsFor:'utilities'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
718 |
|
2569 | 719 |
classIsNotYetInRepository:aClass withManager:mgr |
720 |
|info| |
|
721 |
||
722 |
info := mgr sourceInfoOfClass:aClass. |
|
723 |
||
724 |
^ (info isNil |
|
725 |
or:[(info at:#fileName ifAbsent:nil) isNil |
|
726 |
or:[(info at:#module ifAbsent:nil) isNil |
|
727 |
or:[(info at:#directory ifAbsent:nil) isNil]]]) |
|
728 |
||
729 |
"Created: / 25-10-2006 / 09:43:00 / cg" |
|
730 |
! |
|
731 |
||
2673 | 732 |
defaultManager |
733 |
^ manager |
|
734 |
||
735 |
"Created: / 22-12-2011 / 10:59:28 / cg" |
|
736 |
! |
|
737 |
||
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
738 |
nameOfExtensionsContainer |
1704 | 739 |
^ 'extensions.st' |
740 |
! |
|
741 |
||
1375 | 742 |
setPackageOfAllMethodsIn:aClass to:aPackage |
743 |
"make all methods belong to the classes project" |
|
933
84fd7806afaf
offer existing modules/packages in source-container dialog
Claus Gittinger <cg@exept.de>
parents:
923
diff
changeset
|
744 |
|
1375 | 745 |
|anyChange anyChangeHere| |
893 | 746 |
|
1375 | 747 |
anyChange := false. |
748 |
aClass withAllPrivateClassesDo:[:eachClass | |
|
749 |
anyChangeHere := false. |
|
750 |
eachClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
|
751 |
mthd package ~= aPackage ifTrue:[ |
|
752 |
mthd setPackage:aPackage. |
|
753 |
anyChangeHere := true. |
|
754 |
]. |
|
755 |
]. |
|
756 |
anyChangeHere ifTrue:[ |
|
757 |
eachClass changed:#projectOrganization |
|
758 |
]. |
|
759 |
anyChangeHere ifTrue:[anyChange := true]. |
|
893 | 760 |
]. |
1375 | 761 |
anyChange ifTrue:[ |
762 |
Smalltalk changed:#projectOrganization |
|
1185 | 763 |
]. |
1375 | 764 |
^ anyChange |
893 | 765 |
! |
766 |
||
2193 | 767 |
setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage |
768 |
"make all methods belong to the classes project" |
|
769 |
||
770 |
aChangeSet do:[:eachChange | |
|
771 |
eachChange isMethodCodeChange ifTrue:[ |
|
772 |
eachChange changeMethod package ~= aPackage ifTrue:[ |
|
773 |
Transcript showCR:'change package of ',eachChange changeMethod whoString. |
|
774 |
eachChange changeMethod setPackage:aPackage. |
|
775 |
] |
|
776 |
] |
|
777 |
]. |
|
778 |
! |
|
779 |
||
1375 | 780 |
sourceCodeManagerFor:aClass |
2343
1acdf9d65c7c
changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents:
2326
diff
changeset
|
781 |
|mgr assumption| |
934
4f06b1db2ca1
better user interface when asking for a revision to compare.
Claus Gittinger <cg@exept.de>
parents:
933
diff
changeset
|
782 |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
783 |
manager notNil ifTrue:[^manager]. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
784 |
|
1782 | 785 |
mgr := aClass theNonMetaclass sourceCodeManager. |
1375 | 786 |
mgr isNil ifTrue:[ |
787 |
SourceCodeManager isNil ifTrue:[ |
|
788 |
(self warn:'SourceCodeManagement is disabled or not configured.\\Please setup in the Launcher.' withCRs) ifFalse:[ |
|
789 |
^ nil |
|
1012
92c4719178de
faster search for halts etc.
Claus Gittinger <cg@exept.de>
parents:
1011
diff
changeset
|
790 |
]. |
973
b9004b37290a
check for #halt and #error when checking in
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
791 |
]. |
2343
1acdf9d65c7c
changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents:
2326
diff
changeset
|
792 |
assumption := AbstractSourceCodeManager defaultManager ? CVSSourceCodeManager. |
1acdf9d65c7c
changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents:
2326
diff
changeset
|
793 |
assumption notNil ifTrue:[ |
1acdf9d65c7c
changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents:
2326
diff
changeset
|
794 |
(self confirm:('Class does not seem to provide a valid sourceCodeManager.\\Assume %1 ?' bindWith:assumption managerTypeName) withCRs) ifFalse:[ |
1acdf9d65c7c
changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents:
2326
diff
changeset
|
795 |
^ nil |
1acdf9d65c7c
changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents:
2326
diff
changeset
|
796 |
]. |
1acdf9d65c7c
changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents:
2326
diff
changeset
|
797 |
mgr := assumption. |
973
b9004b37290a
check for #halt and #error when checking in
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
798 |
]. |
1375 | 799 |
]. |
800 |
^ mgr |
|
1782 | 801 |
|
2343
1acdf9d65c7c
changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents:
2326
diff
changeset
|
802 |
"Modified: / 19-04-2011 / 11:48:41 / cg" |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
803 |
"Modified: / 10-10-2011 / 11:47:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
804 |
! |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
805 |
|
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
806 |
sourceCodeOfClass:aClass |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
807 |
|stream src| |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
808 |
|
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
809 |
stream := '' writeStream. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
810 |
Method flushSourceStreamCache. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
811 |
aClass fileOutOn:stream withTimeStamp:false. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
812 |
src := stream contents asString. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
813 |
stream close. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
814 |
^ src |
2326
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
815 |
! |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
816 |
|
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
817 |
versionString:a isLessThan:b |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
818 |
"compare two strings of the form: a.b.c..." |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
819 |
|
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
820 |
|i1 i2 a1 b1 rest1 rest2| |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
821 |
|
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
822 |
i1 := a indexOf:$. . |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
823 |
i2 := b indexOf:$. . |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
824 |
i1 == 0 ifTrue:[ |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
825 |
i1 := a size + 1. |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
826 |
]. |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
827 |
i2 == 0 ifTrue:[ |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
828 |
i2 := b size + 1. |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
829 |
]. |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
830 |
|
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
831 |
a1 := Integer readFrom:(a copyTo:i1-1). |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
832 |
b1 := Integer readFrom:(b copyTo:i2-1). |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
833 |
a1 < b1 ifTrue:[^ true]. |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
834 |
a1 > b1 ifTrue:[^ false]. |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
835 |
rest1 := (a copyFrom:i1+1). |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
836 |
rest2 := (b copyFrom:i2+1). |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
837 |
rest1 isEmpty ifTrue:[ |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
838 |
^ rest2 notEmpty |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
839 |
]. |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
840 |
rest2 isEmpty ifTrue:[ |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
841 |
^ false |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
842 |
]. |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
843 |
^ self versionString:rest1 isLessThan:rest2 |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
844 |
|
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
845 |
" |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
846 |
self assert:(self versionString:'12.34.66' isLessThan:'12.35.66'). |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
847 |
self assert:(self versionString:'12.34.66' isLessThan:'12.35.67'). |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
848 |
self assert:(self versionString:'11.34.66' isLessThan:'12.34.67'). |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
849 |
self assert:(self versionString:'11.35.66' isLessThan:'12.34.67'). |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
850 |
self assert:(self versionString:'13.35.66' isLessThan:'12.34.67') not. |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
851 |
self assert:(self versionString:'13.35.66' isLessThan:'13.34.67') not. |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
852 |
self assert:(self versionString:'13.35.66' isLessThan:'13.35.67'). |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
853 |
self assert:(self versionString:'13.35.66' isLessThan:'13.35.65') not. |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
854 |
self assert:(self versionString:'13.35.66.1' isLessThan:'13.35.66') not. |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
855 |
self assert:(self versionString:'13.35.66' isLessThan:'13.35.66.1'). |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
856 |
self assert:(self versionString:'13.35.66.2' isLessThan:'13.35.66.1') not. |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
857 |
self assert:(self versionString:'13.35.66.1' isLessThan:'13.35.66.2'). |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
858 |
" |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
859 |
|
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
860 |
"Modified: / 17-02-2011 / 10:20:14 / cg" |
1375 | 861 |
! ! |
1160 | 862 |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
863 |
!SourceCodeManagerUtilities methodsFor:'utilities-cvs'! |
973
b9004b37290a
check for #halt and #error when checking in
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
864 |
|
2691 | 865 |
changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager |
1841
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
866 |
"check-out an extension container from the source repository, and return the methods there as a change set. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
867 |
If askForRevision is false, check-out the newest version. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
868 |
Return a changeSet or nil (if any error occurred)" |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
869 |
|
2242
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
870 |
^ self |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
871 |
changeSetForExtensionMethodsForPackage:packageToCheckOut |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
872 |
revision:nil orAskForRevision:askForRevision |
2691 | 873 |
usingManager:aSourceCodeManager |
874 |
||
875 |
"Created: / 29-12-2011 / 14:26:01 / cg" |
|
2242
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
876 |
! |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
877 |
|
2691 | 878 |
changeSetForExtensionMethodsForPackage:packageToCheckOut revision:revisionOrNil orAskForRevision:askForRevision usingManager:aSourceCodeManager |
2242
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
879 |
"check-out an extension container from the source repository, and return the methods there as a change set. |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
880 |
If askForRevision is false, check-out the newest version. |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
881 |
Return a changeSet or nil (if any error occurred)" |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
882 |
|
1841
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
883 |
|resources directory module file |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
884 |
inChangeSet extensionMethods |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
885 |
aStream sourceToLoad rev msg newestRev |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
886 |
listHere listRep diffSet |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
887 |
changed onlyHere onlyInRep answer labels values singleChangeSelector |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
888 |
changedClasses default | |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
889 |
|
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
890 |
resources := self classResources. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
891 |
|
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
892 |
directory := packageToCheckOut asPackageId directory. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
893 |
module := packageToCheckOut asPackageId module. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
894 |
file := self nameOfExtensionsContainer. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
895 |
|
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
896 |
"/ |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
897 |
"/ ask for revision |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
898 |
"/ |
2242
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
899 |
(rev := revisionOrNil) isNil ifTrue:[ |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
900 |
newestRev := aSourceCodeManager newestRevisionInFile:file directory:directory module:module. |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
901 |
askForRevision ifFalse:[ |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
902 |
rev := newestRev ? '' |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
903 |
] ifTrue:[ |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
904 |
msg := resources string:'CheckOut which revision of extensions for ''%1'': (empty for newest)' with:packageToCheckOut allBold. |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
905 |
newestRev notNil ifTrue:[ |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
906 |
msg := msg , '\' , (resources string:'Newest in reporitory is %1.' with:newestRev) |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
907 |
]. |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
908 |
|
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
909 |
rev := SourceCodeManagerUtilities |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
910 |
askForExistingRevision:msg |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
911 |
title:'CheckOut from repository' |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
912 |
class:nil |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
913 |
manager:aSourceCodeManager |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
914 |
module:module package:directory fileName:file. |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
915 |
|
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
916 |
rev isNil ifTrue:[ |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
917 |
^ nil "/ canceled |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
918 |
]. |
1841
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
919 |
]. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
920 |
]. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
921 |
rev withoutSpaces isEmpty ifTrue:[ |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
922 |
rev := #newest. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
923 |
msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
924 |
] ifFalse:[ |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
925 |
msg := 'extracting previous %1'. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
926 |
]. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
927 |
aStream := aSourceCodeManager |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
928 |
streamForClass:nil |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
929 |
fileName:file |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
930 |
revision:rev |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
931 |
directory:directory |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
932 |
module:module |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
933 |
cache:true. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
934 |
|
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
935 |
aStream isNil ifTrue:[ |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
936 |
self warn:(resources string:'Could not extract "extensions.st" for %1 from repository' with:packageToCheckOut allBold). |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
937 |
^ nil |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
938 |
]. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
939 |
aStream class readErrorSignal handle:[:ex | |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
940 |
self warn:('read error while reading extracted source\\' , ex description) withCRs. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
941 |
aStream close. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
942 |
^ nil |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
943 |
] do:[ |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
944 |
sourceToLoad := aStream contents asString. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
945 |
]. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
946 |
aStream close. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
947 |
^ ChangeSet fromStream:(sourceToLoad readStream). |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
948 |
|
2691 | 949 |
"Created: / 29-12-2011 / 14:27:00 / cg" |
1841
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
950 |
! |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
951 |
|
2691 | 952 |
checkForExistingModule:module directory:directory container:containerFileName usingManager:mgr allowCreate:allowCreate |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
953 |
|resources moduleName directoryName containerName| |
1158 | 954 |
|
1377
0fd99dd003f6
classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents:
1375
diff
changeset
|
955 |
resources := self classResources. |
1158 | 956 |
moduleName := module allBold. |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
957 |
directoryName := directory allBold. |
1158 | 958 |
containerName := containerFileName allBold. |
959 |
||
960 |
"/ |
|
961 |
"/ check for the container |
|
962 |
"/ |
|
1787 | 963 |
(mgr checkForExistingContainer:containerFileName inModule:module directory:directory) ifFalse:[ |
1158 | 964 |
allowCreate ifFalse:[ |
965 |
self warn:(resources string:'A container for ''%1'' does not exist in ''%2:%3''' |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
966 |
with:containerName with:moduleName with:directoryName) withCRs. |
1158 | 967 |
^ false |
968 |
]. |
|
969 |
(Dialog |
|
970 |
confirm:(resources string:'''%1'' is a new container (in ''%2:%3'').\\Create it ?' |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
971 |
with:containerName with:moduleName with:directoryName) withCRs |
1158 | 972 |
noLabel:'Cancel') |
973 |
ifFalse:[ |
|
974 |
^ false. |
|
975 |
]. |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
976 |
(mgr createContainerForText:'' inModule:module package:directory container:containerFileName) ifFalse:[ |
1158 | 977 |
self warn:(resources string:'Cannot create new container: ''%1'' (in ''%2:%3'')' |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
978 |
with:containerName with:moduleName with:directoryName). |
1158 | 979 |
^ false. |
980 |
] |
|
981 |
]. |
|
982 |
^ true. |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
983 |
|
1787 | 984 |
"Modified: / 13-09-2006 / 18:24:57 / cg" |
2691 | 985 |
"Created: / 29-12-2011 / 14:35:36 / cg" |
1158 | 986 |
! |
987 |
||
2691 | 988 |
checkForExistingModule:module directory:directory usingManager:mgr allowCreate:allowCreate |
1704 | 989 |
|resources moduleNameBold directoryNameBold| |
1158 | 990 |
|
1377
0fd99dd003f6
classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents:
1375
diff
changeset
|
991 |
resources := self classResources. |
1704 | 992 |
moduleNameBold := module allBold. |
993 |
directoryNameBold := directory allBold. |
|
1158 | 994 |
|
995 |
"/ |
|
1704 | 996 |
"/ check for the directory |
1158 | 997 |
"/ |
1840 | 998 |
(mgr checkForExistingModule:module directory:directory) ifFalse:[ |
1158 | 999 |
allowCreate ifFalse:[ |
1704 | 1000 |
self warn:(resources string:'A directory for ''%1'' does not exist in module ''%2''' |
1001 |
with:directoryNameBold with:moduleNameBold) withCRs. |
|
1158 | 1002 |
^ false |
1003 |
]. |
|
1004 |
(Dialog |
|
2651 | 1005 |
confirm:(resources stringWithCRs:'''%1'' is a new directory in module ''%2''.\\Create it in %3?' |
1006 |
with:directoryNameBold |
|
1007 |
with:moduleNameBold |
|
1008 |
with:mgr managerTypeName) |
|
1158 | 1009 |
noLabel:'Cancel') |
1010 |
ifFalse:[ |
|
1011 |
^ false. |
|
1012 |
]. |
|
1840 | 1013 |
(mgr createModule:module directory:directory) ifFalse:[ |
2651 | 1014 |
self warn:(resources stringWithCRs:'Cannot create new directory: ''%1'' in module ''%2'' in %3' |
1015 |
with:directoryNameBold |
|
1016 |
with:moduleNameBold |
|
1017 |
with:mgr managerTypeName). |
|
1158 | 1018 |
^ false. |
1019 |
] |
|
1020 |
]. |
|
1021 |
^ true. |
|
1840 | 1022 |
|
2651 | 1023 |
"Modified: / 21-12-2011 / 18:46:11 / cg" |
2691 | 1024 |
"Created: / 29-12-2011 / 14:35:20 / cg" |
1158 | 1025 |
! |
1026 |
||
2691 | 1027 |
checkForExistingModule:module usingManager:mgr allowCreate:allowCreate |
1483 | 1028 |
|resources moduleName answer| |
1158 | 1029 |
|
1030 |
(mgr checkForExistingModule:module) ifFalse:[ |
|
1377
0fd99dd003f6
classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents:
1375
diff
changeset
|
1031 |
resources := self classResources. |
1158 | 1032 |
moduleName := module allBold. |
1033 |
||
1034 |
allowCreate ifFalse:[ |
|
1423 | 1035 |
self warn:(resources stringWithCRs:'A module named ''%1'' does not exist in the repository' |
1036 |
with:moduleName) . |
|
1158 | 1037 |
^ false |
1038 |
]. |
|
2325 | 1039 |
AbortAllOperationWantedQuery query ifTrue:[ |
1483 | 1040 |
answer := Dialog |
1041 |
confirmWithCancel:(resources stringWithCRs:'''%1'' is a new module.\\create it ?' with:moduleName) |
|
1042 |
labels:(resources array:#('Cancel All' 'Cancel' 'Yes' )). |
|
1043 |
answer isNil ifTrue:[ AbortAllOperationRequest raise ]. |
|
1044 |
] ifFalse:[ |
|
1045 |
answer := Dialog |
|
2651 | 1046 |
confirm:(resources stringWithCRs:'''%1'' is a new module in %2.\\create it ?' with:moduleName with:mgr managerTypeName) |
1483 | 1047 |
noLabel:'Cancel' |
1048 |
]. |
|
1049 |
answer ifFalse:[ ^ false]. |
|
1158 | 1050 |
|
1051 |
(mgr createModule:module) ifFalse:[ |
|
2651 | 1052 |
self warn:(resources stringWithCRs:'Cannot create new module: ''%1'' in %2' with:moduleName with:mgr managerTypeName) . |
1158 | 1053 |
^ false. |
1054 |
] |
|
1055 |
]. |
|
1056 |
^ true. |
|
2325 | 1057 |
|
2651 | 1058 |
"Modified: / 21-12-2011 / 18:42:03 / cg" |
2691 | 1059 |
"Created: / 29-12-2011 / 14:35:06 / cg" |
1158 | 1060 |
! |
1061 |
||
2597
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1062 |
checkinBuildSupportFilesForPackage:packageID |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1063 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1064 |
|anyFailure module directory mgr defClass | |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1065 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1066 |
mgr := self sourceCodeManagerFor: packageID. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1067 |
defClass := ProjectDefinition definitionClassForPackage: packageID. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1068 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1069 |
defClass validateDescription. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1070 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1071 |
anyFailure := false. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1072 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1073 |
module := packageID asPackageId module. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1074 |
directory := packageID asPackageId directory. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1075 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1076 |
self activityNotification:(resources string:'checking in build-support files...'). |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1077 |
(mgr checkForExistingModule:module directory:directory) ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1078 |
mgr createModule:module directory:directory |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1079 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1080 |
defClass forEachFileNameAndGeneratedContentsDo:[:fileName :fileContents | |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1081 |
|realFileName realDirectory| |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1082 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1083 |
"/ care for subdirectories |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1084 |
(fileName includes:$/) ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1085 |
realDirectory := (directory asFilename construct:(fileName asFilename directoryName)) name. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1086 |
realFileName := fileName asFilename baseName. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1087 |
] ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1088 |
realDirectory := directory. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1089 |
realFileName := fileName. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1090 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1091 |
realDirectory := realDirectory replaceAll:$\ with:$/. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1092 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1093 |
self activityNotification:(resources string:'checking in %1...' with:realFileName). |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1094 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1095 |
UserInformation |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1096 |
handle:[:ex | Transcript showCR:ex description ] |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1097 |
do:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1098 |
(mgr |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1099 |
checkForExistingContainer:realFileName inModule:module directory:realDirectory) |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1100 |
ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1101 |
realDirectory ~= directory ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1102 |
(mgr checkForExistingModule:module directory:realDirectory) ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1103 |
mgr createModule:module directory:realDirectory |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1104 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1105 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1106 |
(mgr |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1107 |
createContainerForText:fileContents |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1108 |
inModule:module |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1109 |
package:realDirectory |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1110 |
container:realFileName) |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1111 |
ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1112 |
Dialog warn:(resources |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1113 |
stringWithCRs:'Cannot create new container: ''%3'' (in %1:%2)' |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1114 |
with:module |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1115 |
with:realDirectory |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1116 |
with:realFileName) |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1117 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1118 |
] ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1119 |
(mgr |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1120 |
checkin:realFileName |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1121 |
text:fileContents |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1122 |
directory:realDirectory |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1123 |
module:module |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1124 |
logMessage:'automatically generated by browser' |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1125 |
force:false) |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1126 |
ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1127 |
Transcript showCR:'checkin of ' , realFileName , ' failed'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1128 |
anyFailure := true. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1129 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1130 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1131 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1132 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1133 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1134 |
defClass instAndClassMethodsDo:[:m | m package:defClass package]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1135 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1136 |
self |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1137 |
checkinClasses:(Array with:defClass) |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1138 |
withInfo:'automatic checkIn' |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1139 |
withCheck:false. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1140 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1141 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1142 |
self activityNotification:nil. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1143 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1144 |
anyFailure ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1145 |
self warn:'Checkin failed - see Transcript.'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1146 |
self activityNotification:'Checkin of build-support files failed - see Transcript.'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1147 |
] ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1148 |
self activityNotification:'Build-support files checked into the repository.'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1149 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1150 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1151 |
"Created: / 09-08-2006 / 18:59:42 / fm" |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1152 |
"Modified: / 16-08-2006 / 18:38:49 / User" |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1153 |
"Created: / 06-09-2011 / 08:00:57 / cg" |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1154 |
"Modified: / 12-10-2011 / 11:36:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1155 |
"Created: / 13-10-2011 / 11:15:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1156 |
! |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1157 |
|
886 | 1158 |
checkinClass:aClass |
1159 |
"check a class into the source repository. |
|
1704 | 1160 |
Asks interactively for a log-message." |
882 | 1161 |
|
1704 | 1162 |
^ self checkinClass:aClass withInfo:nil |
882 | 1163 |
! |
1164 |
||
1704 | 1165 |
checkinClass:aClass withInfo:aLogInfoOrNil |
886 | 1166 |
"check a class into the source repository. |
1704 | 1167 |
If the argument, aLogInfoOrNil isNil, ask interactively for a log-message." |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1168 |
|
1704 | 1169 |
^ self checkinClass:aClass withInfo:aLogInfoOrNil withCheck:true |
977 | 1170 |
! |
1171 |
||
2383 | 1172 |
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass |
977 | 1173 |
"check a class into the source repository. |
2383 | 1174 |
If the argument, aLogInfoOrNil isNil, ask interactively for log-message. |
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
1175 |
If doCheckClass is true, the class is checked for send of halts etc." |
977 | 1176 |
|
2651 | 1177 |
^ self |
1178 |
checkinClass:aClass |
|
1179 |
withInfo:aLogInfoOrNil |
|
1180 |
withCheck:doCheckClass |
|
1181 |
usingManager:(self sourceCodeManagerFor:aClass) |
|
1182 |
||
1183 |
"Modified: / 21-12-2011 / 18:19:55 / cg" |
|
1184 |
! |
|
1185 |
||
1186 |
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass usingManager:managerOrNil |
|
1187 |
"check a class into the source repository. |
|
1188 |
If the argument, aLogInfoOrNil isNil, ask interactively for log-message. |
|
1189 |
If doCheckClass is true, the class is checked for send of halts etc." |
|
1190 |
||
2383 | 1191 |
|logMessage checkinInfo mgr pri resources| |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1192 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1193 |
aClass isLoaded ifFalse:[ |
2360
3982314184bb
changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents:
2343
diff
changeset
|
1194 |
self information:(resources string:'Cannot checkin unloaded classes (%1)' with:aClass name). |
881 | 1195 |
^ false. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1196 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1197 |
|
2651 | 1198 |
mgr := managerOrNil. |
954 | 1199 |
mgr isNil ifTrue:[ |
2651 | 1200 |
mgr := self sourceCodeManagerFor:aClass. |
1201 |
mgr isNil ifTrue:[ |
|
1202 |
^ false |
|
1203 |
] |
|
954 | 1204 |
]. |
1205 |
||
2691 | 1206 |
self ensureCorrectVersionMethodsInClass:aClass usingManager:mgr. |
2651 | 1207 |
mgr supportsCheckinLogMessages ifTrue:[ |
1208 |
(self |
|
1209 |
getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil |
|
1210 |
forClass:aClass |
|
1211 |
valuesInto:[:logMessageRet :checkinInfoRet | |
|
1212 |
logMessage := logMessageRet. |
|
1213 |
checkinInfo := checkinInfoRet. |
|
1214 |
] |
|
1215 |
) ifFalse:[^ false]. |
|
1216 |
]. |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1217 |
|
1377
0fd99dd003f6
classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents:
1375
diff
changeset
|
1218 |
resources := self classResources. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1219 |
|
1882
8b3a4c2a2c2a
when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents:
1879
diff
changeset
|
1220 |
(self classIsNotYetInRepository:aClass withManager:mgr) ifTrue:[ |
2651 | 1221 |
(self createSourceContainerForClass:aClass usingManager:mgr) ifFalse:[ |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1222 |
"/ self warn:'did not create a container for ''' , aClass name , ''''. |
881 | 1223 |
^ false |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1224 |
]. |
881 | 1225 |
^ true. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1226 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1227 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1228 |
self activityNotification:(resources string:'checking in %1' with:aClass name). |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1229 |
pri := Processor activePriority. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1230 |
Processor activeProcess withPriority:pri-1 to:pri |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1231 |
do:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1232 |
|revision aborted freshCreated| |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1233 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1234 |
freshCreated := false. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1235 |
revision := aClass revision. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1236 |
revision isNil ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1237 |
"/ mhmh - check if it has a container. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1238 |
(mgr checkForExistingContainerForClass:aClass) ifFalse:[ |
2651 | 1239 |
(self createSourceContainerForClass:aClass usingManager:mgr) ifFalse:[ |
1030 | 1240 |
self warn:'Did not create/change repository container for ''' , aClass name allBold , ''''. |
1241 |
^ false. |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1242 |
]. |
1503 | 1243 |
freshCreated := true. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1244 |
] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1245 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1246 |
|
1426 | 1247 |
doCheckClass value ifTrue:[ |
977 | 1248 |
"/ check if the class contains halts, error-sends etc. |
1426 | 1249 |
(self checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:doCheckClass) ifFalse:[ |
977 | 1250 |
^ false |
1251 |
]. |
|
973
b9004b37290a
check for #halt and #error when checking in
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
1252 |
]. |
b9004b37290a
check for #halt and #error when checking in
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
1253 |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1254 |
freshCreated ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1255 |
aborted := false. |
1113
30540d5fc3b7
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
1095
diff
changeset
|
1256 |
AbortOperationRequest handle:[:ex | |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1257 |
aborted := true. |
881 | 1258 |
ex return. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1259 |
] do:[ |
1828 | 1260 |
|checkinState cause| |
1261 |
checkinState := false. |
|
1262 |
cause := ''. |
|
1263 |
[ |
|
1264 |
checkinState := mgr checkinClass:aClass logMessage:logMessage |
|
2362
9c4eba6eac26
changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents:
2360
diff
changeset
|
1265 |
] on:SourceCodeManagerError do:[:ex| |
9c4eba6eac26
changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents:
2360
diff
changeset
|
1266 |
cause := ex description. |
9c4eba6eac26
changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents:
2360
diff
changeset
|
1267 |
ex proceed. |
9c4eba6eac26
changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents:
2360
diff
changeset
|
1268 |
]. |
1828 | 1269 |
|
1270 |
checkinState ifFalse:[ |
|
1271 |
Transcript showCR:'checkin of ''' , aClass name , ''' failed - ', cause. |
|
2360
3982314184bb
changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents:
2343
diff
changeset
|
1272 |
self warn:(resources stringWithCRs:'Checkin of "%1" failed\\' with:aClass name allBold),cause. |
881 | 1273 |
^ false. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1274 |
]. |
1725 | 1275 |
checkinInfo notNil ifTrue:[ |
1276 |
checkinInfo isStable ifTrue:[ |
|
1277 |
"set stable tag for class that has been checked in" |
|
1726 | 1278 |
self tagClass:aClass as:#stable. |
1725 | 1279 |
]. |
1280 |
checkinInfo tagIt ifTrue:[ |
|
1281 |
"set an additional tag for class that has been checked in" |
|
1728 | 1282 |
self tagClass:aClass as:(checkinInfo tag). |
1725 | 1283 |
]. |
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
1284 |
]. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1285 |
]. |
1519
c0e28a7d3c73
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1514
diff
changeset
|
1286 |
aborted ifTrue:[ |con| |
1158 | 1287 |
Transcript showCR:'Checkin of ''' , aClass name , ''' aborted'. |
1519
c0e28a7d3c73
no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents:
1514
diff
changeset
|
1288 |
|
2325 | 1289 |
AbortAllOperationWantedQuery query ifTrue:[ |
1032 | 1290 |
(Dialog |
2360
3982314184bb
changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents:
2343
diff
changeset
|
1291 |
confirm:(resources stringWithCRs:'Checkin of "%1" aborted.\\Cancel all ?' with:aClass name) |
1032 | 1292 |
default:false) |
1293 |
ifTrue:[ |
|
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
1294 |
AbortAllOperationRequest raise. |
1032 | 1295 |
] |
1016 | 1296 |
]. |
881 | 1297 |
^ false. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1298 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1299 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1300 |
]. |
881 | 1301 |
^ true |
1113
30540d5fc3b7
class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents:
1095
diff
changeset
|
1302 |
|
2651 | 1303 |
"Created: / 21-12-2011 / 18:19:14 / cg" |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1304 |
! |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1305 |
|
920 | 1306 |
checkinClasses:aCollectionOfClass |
886 | 1307 |
"check a collection of classes into the source repository. |
1308 |
Asks interactively for log-message." |
|
1309 |
||
1704 | 1310 |
^ self checkinClasses:aCollectionOfClass withInfo:nil |
886 | 1311 |
! |
1312 |
||
1704 | 1313 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil |
886 | 1314 |
"check a bunch of classes into the source repository. |
1704 | 1315 |
If the argument, aLogInfoOrNil isNil, ask interactively for log-message." |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
1316 |
|
992 | 1317 |
^ self |
1142
cba1ede48a4a
allow check for halt/error to be turned off via userPrefs
Claus Gittinger <cg@exept.de>
parents:
1137
diff
changeset
|
1318 |
checkinClasses:aCollectionOfClasses |
1704 | 1319 |
withInfo:aLogInfoOrNil |
1142
cba1ede48a4a
allow check for halt/error to be turned off via userPrefs
Claus Gittinger <cg@exept.de>
parents:
1137
diff
changeset
|
1320 |
withCheck:(UserPreferences current at:#checkClassesWhenCheckingIn ifAbsent:true) |
992 | 1321 |
! |
1322 |
||
2569 | 1323 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses |
1324 |
"check a bunch of classes into the source repository. |
|
1325 |
If the argument, aLogInfoOrStringNil isNil, ask interactively for log-message." |
|
1326 |
||
2651 | 1327 |
self checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses usingManager:nil |
1328 |
||
1329 |
"Modified: / 21-12-2011 / 18:24:47 / cg" |
|
1330 |
! |
|
1331 |
||
1332 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses usingManager:aManagerOrNil |
|
1333 |
"check a bunch of classes into the source repository. |
|
1334 |
If the argument, aLogInfoOrStringNil isNil, ask interactively for log-message." |
|
1335 |
||
2569 | 1336 |
|classes allClasses checkinInfoOrString resources yesOrNoToAll unchangedClasses| |
1337 |
||
1338 |
"/ ignore private classes |
|
1339 |
classes := aCollectionOfClasses select:[:aClass | aClass owningClass isNil]. |
|
1340 |
classes isEmpty ifTrue:[ |
|
1341 |
self information:'Only private classes given - nothing checked in.'. |
|
1342 |
^ self |
|
1343 |
]. |
|
1344 |
classes := classes select:[:aClass | aClass isLoaded]. |
|
1345 |
classes isEmpty ifTrue:[ |
|
1346 |
self information:'Only unloaded classes given - nothing checked in.'. |
|
1347 |
^ self |
|
1348 |
]. |
|
1349 |
||
1350 |
classes size == 1 ifTrue:[ |
|
2651 | 1351 |
^ self checkinClass:classes first withInfo:aLogInfoOrStringNil withCheck:doCheckClasses usingManager:aManagerOrNil. |
2569 | 1352 |
]. |
1353 |
||
1354 |
resources := self classResources. |
|
1355 |
||
1356 |
"ask once, for all classes" |
|
1357 |
aLogInfoOrStringNil isNil ifTrue:[ |
|
1358 |
checkinInfoOrString := self |
|
1359 |
getCheckinInfoFor:(resources string:'%1 classes to checkin' with:aCollectionOfClasses size) |
|
1360 |
initialAnswer:nil |
|
1361 |
withQuickOption:true. |
|
1362 |
checkinInfoOrString isNil ifTrue:[^ self]. |
|
1363 |
] ifFalse:[ |
|
1364 |
checkinInfoOrString := aLogInfoOrStringNil. |
|
1365 |
]. |
|
1366 |
||
1367 |
allClasses := classes. |
|
1368 |
checkinInfoOrString quickCheckIn ifTrue:[ |
|
1369 |
classes := classes select:[:aClass | aClass hasUnsavedChanges]. |
|
1370 |
classes isEmpty ifTrue:[ Dialog information:'no changes to checkin (quickCheckIn)' ] |
|
1371 |
]. |
|
1372 |
||
1373 |
"abortAll is handled, and also asked for here!!" |
|
1374 |
AbortAllOperationRequest handleAndAnswerQueryIn:[ |
|
1375 |
classes notEmpty ifTrue:[ |
|
1376 |
self yesToAllNotification handle:[:ex | |
|
1377 |
yesOrNoToAll := ex parameter. |
|
1378 |
ex proceed |
|
1379 |
] do:[ |
|
1380 |
self yesToAllQuery handle:[:ex | |
|
1381 |
ex proceedWith:yesOrNoToAll |
|
1382 |
] do:[ |
|
1383 |
classes do:[:aClass | |
|
1384 |
self activityNotification:(resources string:'checking in %1' with:aClass name). |
|
1385 |
"/ ca does not want boxes to pop up all over ... |
|
1386 |
UserInformation handle:[:ex | |
|
1387 |
Transcript showCR:ex description. |
|
1388 |
ex proceed. |
|
1389 |
] do:[ |
|
1390 |
AbortOperationRequest catch:[ |
|
1391 |
self |
|
1392 |
checkinClass:aClass |
|
1393 |
withInfo:checkinInfoOrString |
|
1394 |
withCheck:doCheckClasses |
|
2651 | 1395 |
usingManager:aManagerOrNil |
2569 | 1396 |
] |
1397 |
]. |
|
1398 |
]. |
|
1399 |
] |
|
1400 |
]. |
|
1401 |
]. |
|
1402 |
||
1403 |
(checkinInfoOrString isStable or:[checkinInfoOrString tagIt]) |
|
1404 |
ifTrue:[ |
|
1405 |
"/mhmh - but tag should be set on all (even unchanged ones) |
|
1406 |
"/ the other onces have already been tagged |
|
1407 |
unchangedClasses := allClasses select:[:eachClass | (classes includes:eachClass) not]. |
|
1408 |
||
1409 |
"mhmh - could still have to tag them" |
|
1410 |
checkinInfoOrString isStable ifTrue:[ |
|
1411 |
unchangedClasses do:[:eachClass | |
|
1412 |
self tagClass:eachClass as:#stable. |
|
1413 |
]. |
|
1414 |
]. |
|
1415 |
checkinInfoOrString tagIt ifTrue:[ |
|
1416 |
unchangedClasses do:[:eachClass | |
|
1417 |
self tagClass:eachClass as:(checkinInfoOrString tag). |
|
1418 |
]. |
|
1419 |
]. |
|
1420 |
]. |
|
1421 |
]. |
|
1422 |
||
2651 | 1423 |
"Created: / 21-12-2011 / 18:24:25 / cg" |
2569 | 1424 |
! |
1425 |
||
1704 | 1426 |
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1427 |
"checkin a projects extensions into the source repository. |
1704 | 1428 |
If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message." |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1429 |
|
1704 | 1430 |
|logMessage checkinInfo mgr pri resources module directory containerFileName s |
2233
59fc21dd040d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2209
diff
changeset
|
1431 |
methodSource methodsSortedByName defClass| |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1432 |
|
1377
0fd99dd003f6
classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents:
1375
diff
changeset
|
1433 |
resources := self classResources. |
957 | 1434 |
|
2242
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1435 |
"/ the following is wrong - must ask the projectDefinition !! |
2288
9abbb9ec4439
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2286
diff
changeset
|
1436 |
aPackageID asPackageId projectDefinitionClass notNil ifTrue:[ |
9abbb9ec4439
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2286
diff
changeset
|
1437 |
mgr := self sourceCodeManagerFor:aPackageID asPackageId projectDefinitionClass. |
9abbb9ec4439
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2286
diff
changeset
|
1438 |
] ifFalse:[ |
9abbb9ec4439
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2286
diff
changeset
|
1439 |
mgr := self sourceCodeManagerFor:aCollectionOfMethods first mclass. |
9abbb9ec4439
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2286
diff
changeset
|
1440 |
]. |
2200
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1441 |
mgr isNil ifTrue:[ ^ false ]. |
1522 | 1442 |
|
1704 | 1443 |
module := aPackageID asPackageId module. |
1444 |
directory := aPackageID asPackageId directory. |
|
1445 |
containerFileName := self nameOfExtensionsContainer. |
|
957 | 1446 |
|
1704 | 1447 |
aLogInfoOrStringOrNil isNil ifTrue:[ |
1448 |
checkinInfo := self getCheckinInfoFor:containerFileName allBold initialAnswer:nil. |
|
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
1449 |
checkinInfo isNil ifTrue:[^ false]. |
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
1450 |
logMessage := checkinInfo logMessage. |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1451 |
] ifFalse:[ |
1704 | 1452 |
aLogInfoOrStringOrNil isString ifTrue:[ |
1453 |
logMessage := aLogInfoOrStringOrNil |
|
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
1454 |
] ifFalse:[ |
1704 | 1455 |
checkinInfo := aLogInfoOrStringOrNil. |
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
1456 |
logMessage := checkinInfo logMessage. |
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
1457 |
]. |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1458 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1459 |
|
2200
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1460 |
(mgr checkForExistingContainer:containerFileName inModule:module directory:directory) ifFalse:[ |
2691 | 1461 |
(self checkForExistingModule:module usingManager:mgr allowCreate:true) ifFalse:[^ false]. |
2200
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1462 |
LastModule := module. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1463 |
|
2691 | 1464 |
(self checkForExistingModule:module directory:directory usingManager:mgr allowCreate:true) ifFalse:[^ false]. |
2200
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1465 |
LastPackage := directory. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1466 |
|
2691 | 1467 |
(self checkForExistingModule:module directory:directory container:containerFileName usingManager:mgr allowCreate:true) ifFalse:[^ false]. |
2200
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1468 |
]. |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1469 |
|
1120 | 1470 |
self activityNotification:(resources string:'Checking in %1' with:containerFileName). |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1471 |
pri := Processor activePriority. |
2200
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1472 |
Processor activeProcess |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1473 |
withPriority:pri-1 to:pri |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1474 |
do:[ |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1475 |
s := '' writeStream. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1476 |
|
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1477 |
s nextPutAll:'"{ Package: '''. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1478 |
s nextPutAll:aPackageID asString. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1479 |
s nextPutAll:''' }"'; nextPutChunkSeparator; cr; cr. |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1480 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1481 |
"/ s nextPutAll:(Smalltalk timeStamp). |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1482 |
"/ s nextPutChunkSeparator. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1483 |
"/ s cr; cr. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1484 |
|
2200
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1485 |
"/ sort them by name (to avoid conflict due to CVS merge) |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1486 |
methodsSortedByName := aCollectionOfMethods asOrderedCollection. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1487 |
methodsSortedByName sort:[:a :b | |
1015 | 1488 |
|clsA clsB| |
1489 |
||
1490 |
clsA := a mclass name. |
|
1491 |
clsB := b mclass name. |
|
1492 |
clsA < clsB ifTrue:[ |
|
1493 |
true |
|
1494 |
] ifFalse:[ |
|
1495 |
clsA > clsB ifTrue:[ |
|
1496 |
false |
|
1497 |
] ifFalse:[ |
|
1498 |
a selector < b selector |
|
1499 |
] |
|
1500 |
] |
|
2200
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1501 |
]. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1502 |
methodsSortedByName do:[:aMethod | |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1503 |
aMethod mclass fileOutMethod:aMethod on:s. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1504 |
s cr. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1505 |
]. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1506 |
|
2233
59fc21dd040d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2209
diff
changeset
|
1507 |
defClass := ProjectDefinition definitionClassForPackage:aPackageID. |
59fc21dd040d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2209
diff
changeset
|
1508 |
defClass notNil ifTrue:[ |
59fc21dd040d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2209
diff
changeset
|
1509 |
"/ make sure, an extensionVersion_XXX method is included... |
59fc21dd040d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2209
diff
changeset
|
1510 |
"/ (notice: no need to support a secondary backward compatible non-manager related version method here) |
59fc21dd040d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2209
diff
changeset
|
1511 |
(methodsSortedByName contains:[:aMethod | aMethod selector == mgr nameOfVersionMethodForExtensions]) ifFalse:[ |
59fc21dd040d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2209
diff
changeset
|
1512 |
s nextPutLine:('!!%1 class methodsFor:''documentation''!!' bindWith:defClass name). |
59fc21dd040d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2209
diff
changeset
|
1513 |
s cr. |
59fc21dd040d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2209
diff
changeset
|
1514 |
s nextChunkPut: |
59fc21dd040d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2209
diff
changeset
|
1515 |
(mgr versionMethodTemplateForSmalltalkFor:(mgr nameOfVersionMethodForExtensions)). |
59fc21dd040d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2209
diff
changeset
|
1516 |
s space; nextPutChunkSeparator. |
59fc21dd040d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2209
diff
changeset
|
1517 |
]. |
2200
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1518 |
]. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1519 |
|
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1520 |
methodSource := s contents. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1521 |
|
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1522 |
UserInformation handle:[:ex | |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1523 |
Transcript showCR:ex description. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1524 |
ex proceed. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1525 |
] do:[ |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1526 |
Transcript showCR:('checking in ',containerFileName,' ...'). |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1527 |
(mgr |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1528 |
checkin:containerFileName |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1529 |
text:methodSource |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1530 |
directory:directory |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1531 |
module:module |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1532 |
logMessage:logMessage |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1533 |
force:false) |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1534 |
ifFalse:[ |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1535 |
Transcript showCR:'Checkin of ''' , containerFileName , ''' failed'. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1536 |
self warn:'Checkin of ''' , containerFileName allBold , ''' failed'. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1537 |
^ false. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1538 |
]. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1539 |
checkinInfo notNil ifTrue:[ |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1540 |
|path| |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1541 |
|
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1542 |
path := (module, '/', directory, '/', containerFileName). |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1543 |
checkinInfo isStable ifTrue:[ |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1544 |
"set stable tag for class that has been checked in" |
2691 | 1545 |
self tagPath:path as:#stable usingManager:mgr. |
2200
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1546 |
]. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1547 |
checkinInfo tagIt ifTrue:[ |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1548 |
"set an additional tag for class that has been checked in" |
2691 | 1549 |
self tagPath:path as:(checkinInfo tag) usingManager:mgr. |
2200
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1550 |
]. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1551 |
]. |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1552 |
mgr postCheckInExtensionsForPackage:aPackageID |
b9e1551c5a0d
changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents:
2194
diff
changeset
|
1553 |
]. |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1554 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1555 |
^ true |
1090
8608e5b91fa7
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1084
diff
changeset
|
1556 |
|
2691 | 1557 |
"Modified: / 29-12-2011 / 14:32:11 / cg" |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1558 |
! |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
1559 |
|
2597
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1560 |
checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1561 |
|mgr classes classesToCheckIn methodsToCheckIn |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1562 |
methodsInOtherPackages looseMethods otherPackages |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1563 |
msg classesInChangeSet checkinInfo originalCheckinInfo classesToTag| |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1564 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1565 |
mgr := self sourceCodeManagerFor: packageToCheckIn. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1566 |
classes := Smalltalk allClasses. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1567 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1568 |
classesToCheckIn := IdentitySet new. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1569 |
methodsToCheckIn := IdentitySet new. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1570 |
methodsInOtherPackages := IdentitySet new. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1571 |
looseMethods := IdentitySet new. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1572 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1573 |
"/ classes ... |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1574 |
classes do:[:aClass | |owner classPackage| |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1575 |
(owner := aClass owningClass) notNil ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1576 |
classPackage := aClass topOwningClass package |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1577 |
] ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1578 |
classPackage := aClass package |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1579 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1580 |
(classPackage = packageToCheckIn) ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1581 |
classesToCheckIn add:aClass. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1582 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1583 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1584 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1585 |
"/ cg: O(n^2) algorithm |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1586 |
"/ classesInChangeSet := classesToCheckIn select:[:cls | cls hasUnsavedChanges]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1587 |
"/ replaced by: O(n) algorithm |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1588 |
classesInChangeSet := ChangeSet current selectForWhichIncludesChangeForClassOrMetaclassOrPrivateClassFrom:classesToCheckIn. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1589 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1590 |
"/ individual methods ... |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1591 |
classes do:[:aClass | |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1592 |
aClass isMeta ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1593 |
"/ ... whose class is not in the chechIn-set |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1594 |
(classesToCheckIn includes:aClass) ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1595 |
aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1596 |
"/ methods in this project ... |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1597 |
(mthd package = packageToCheckIn) ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1598 |
methodsToCheckIn add:mthd |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1599 |
] |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1600 |
] |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1601 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1602 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1603 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1604 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1605 |
doExtensions ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1606 |
methodsToCheckIn notEmpty ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1607 |
doClasses ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1608 |
msg := '%1 classes (%4 changed) '. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1609 |
] ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1610 |
msg := ''. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1611 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1612 |
doExtensions ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1613 |
doClasses ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1614 |
msg := msg , 'and '. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1615 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1616 |
msg := msg , '%2 extensions '. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1617 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1618 |
msg := msg , 'of project "%3"'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1619 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1620 |
checkinInfo := self |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1621 |
getCheckinInfoFor:(msg |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1622 |
bindWith:classesToCheckIn size |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1623 |
with:methodsToCheckIn size |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1624 |
with:packageToCheckIn allBold |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1625 |
with:classesInChangeSet size) |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1626 |
initialAnswer:nil |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1627 |
withQuickOption:(classesToCheckIn size > 0). |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1628 |
checkinInfo isNil ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1629 |
^ self. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1630 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1631 |
(self |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1632 |
checkinExtensionMethods:methodsToCheckIn |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1633 |
forPackage:packageToCheckIn |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1634 |
withInfo:checkinInfo) |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1635 |
ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1636 |
Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn). |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1637 |
^ self. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1638 |
] |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1639 |
] ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1640 |
"/ there may have been extension-methods previously - if so, remove them |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1641 |
(mgr |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1642 |
checkForExistingContainer:'extensions.st' inPackage:packageToCheckIn) |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1643 |
ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1644 |
"/ self halt. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1645 |
(self |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1646 |
checkinExtensionMethods:#() |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1647 |
forPackage:packageToCheckIn |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1648 |
withInfo:'No extensions any more') |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1649 |
ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1650 |
Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn). |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1651 |
^ self. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1652 |
] |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1653 |
] |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1654 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1655 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1656 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1657 |
checkinInfo isNil ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1658 |
checkinInfo := self |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1659 |
getCheckinInfoFor:('%1 classes (%4 changed) and %2 extensions for project "%3"' |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1660 |
bindWith:classesToCheckIn size |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1661 |
with:methodsToCheckIn size |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1662 |
with:packageToCheckIn allBold |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1663 |
with:classesInChangeSet size) |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1664 |
initialAnswer:nil |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1665 |
withQuickOption:(classesToCheckIn size > 0). |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1666 |
checkinInfo isNil ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1667 |
^ self. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1668 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1669 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1670 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1671 |
checkinInfo quickCheckIn ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1672 |
(checkinInfo isStable or:[checkinInfo tagIt]) ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1673 |
classesToTag := classesToCheckIn. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1674 |
originalCheckinInfo := checkinInfo. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1675 |
checkinInfo := checkinInfo copy. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1676 |
checkinInfo isStable:false. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1677 |
checkinInfo tag:nil. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1678 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1679 |
classesToCheckIn := classesInChangeSet. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1680 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1681 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1682 |
"/ check if any of the classes contains methods for other packages ... |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1683 |
classesToCheckIn do:[:eachClass | |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1684 |
eachClass instAndClassMethodsDo:[:eachMethod | |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1685 |
|mPgk| |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1686 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1687 |
mPgk := eachMethod package. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1688 |
(mPgk = packageToCheckIn) ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1689 |
mPgk == PackageId noProjectID ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1690 |
looseMethods add:eachMethod |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1691 |
] ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1692 |
methodsInOtherPackages add:eachMethod |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1693 |
] |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1694 |
] |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1695 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1696 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1697 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1698 |
askForMethodsInOtherPackages ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1699 |
methodsInOtherPackages notEmpty ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1700 |
otherPackages := Set new. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1701 |
methodsInOtherPackages do:[:eachMethod | otherPackages add:eachMethod package]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1702 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1703 |
methodsInOtherPackages size == 1 ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1704 |
msg := 'The ''%4'' method in ''%5'' is contained in the ''%2'' package.'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1705 |
msg := msg , '\\This method will remain in its package.'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1706 |
] ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1707 |
otherPackages size == 1 ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1708 |
msg := 'The %1 methods from the %2 package will remain in its package.' |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1709 |
] ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1710 |
msg := 'The %1 methods from %3 other packages will remain in their packages.' |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1711 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1712 |
msg := msg , '\\Hint: if these are meant to belong to this package,'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1713 |
msg := msg , '\move them first, then repeat the checkin operation.'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1714 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1715 |
msg := msg withCRs. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1716 |
msg := msg bindWith:methodsInOtherPackages size |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1717 |
with:otherPackages first allBold |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1718 |
with:otherPackages size |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1719 |
with:methodsInOtherPackages first selector allBold |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1720 |
with:methodsInOtherPackages first mclass name allBold. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1721 |
(Dialog confirm:msg noLabel:(resources string:'Cancel')) ifFalse:[^ self]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1722 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1723 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1724 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1725 |
doClasses ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1726 |
classesToCheckIn notEmpty ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1727 |
looseMethods notEmpty ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1728 |
looseMethods size == 1 ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1729 |
msg := 'The ''%2'' method in ''%3'' is unassigned (loose).'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1730 |
msg := msg , '\\If you proceed, this method will be moved to the ''%4'' package'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1731 |
msg := msg , '\\Hint: if this is meant to be an extension of another package,'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1732 |
msg := msg , '\cancel and move it to the appropriate package first.'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1733 |
] ifFalse:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1734 |
msg := 'There are %1 unassigned (loose) methods in classes from this project.'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1735 |
msg := msg , '\\If you proceed, those will be moved to the ''%4'' package ?'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1736 |
msg := msg , '\\Hint: if these are meant to be extensions of another package,'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1737 |
msg := msg , '\cancel and move them to the appropriate package first.'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1738 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1739 |
doClasses ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1740 |
msg := msg , '\\If you answer with "No" here, you will be asked for each class individually.'. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1741 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1742 |
msg := msg withCRs. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1743 |
msg := msg bindWith:looseMethods size |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1744 |
with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first selector allBold]) |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1745 |
with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first mclass name allBold]) |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1746 |
with:packageToCheckIn allBold. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1747 |
(Dialog confirm:msg noLabel:(resources string:'Cancel')) ifFalse:[^ self]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1748 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1749 |
looseMethods do:[:mthd | |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1750 |
mthd package:packageToCheckIn |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1751 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1752 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1753 |
self checkinClasses:classesToCheckIn withInfo:checkinInfo. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1754 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1755 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1756 |
originalCheckinInfo notNil ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1757 |
originalCheckinInfo isStable ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1758 |
classesToTag do:[:eachClass | |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1759 |
self tagClass:eachClass as:#stable |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1760 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1761 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1762 |
originalCheckinInfo tagIt ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1763 |
classesToTag do:[:eachClass | |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1764 |
self tagClass:eachClass as:(originalCheckinInfo tag) |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1765 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1766 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1767 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1768 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1769 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1770 |
doBuild ifTrue:[ |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1771 |
self checkinBuildSupportFilesForPackage:packageToCheckIn |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1772 |
]. |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1773 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1774 |
"Modified: / 08-09-2011 / 04:42:38 / cg" |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1775 |
"Created: / 13-10-2011 / 11:15:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1776 |
! |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1777 |
|
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1778 |
checkoutClass:aClass askForMerge:askForMerge |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1779 |
"check-out a class from the source repository." |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1780 |
|
1006 | 1781 |
self |
1782 |
checkoutClass:aClass |
|
1783 |
askForRevision:true |
|
1784 |
askForMerge:askForMerge |
|
1785 |
! |
|
1786 |
||
1787 |
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge |
|
1788 |
"check-out a class from the source repository. |
|
1789 |
If askForRevision is false, check-out the newest version." |
|
1790 |
||
2013
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1791 |
self |
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1792 |
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge |
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1793 |
askForConfirmation:true |
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1794 |
! |
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1795 |
|
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1796 |
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge askForConfirmation:askForConfirmation |
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1797 |
"check-out a class from the source repository. |
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1798 |
If askForRevision is false, check-out the newest version." |
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1799 |
|
1084 | 1800 |
|mgr resources sourceInfo |
1339 | 1801 |
currentClass inChangeSet |
1055
f44b12442c58
version update after load from rep.
Claus Gittinger <cg@exept.de>
parents:
1054
diff
changeset
|
1802 |
aStream sourceToLoad currentSource rev revString |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1803 |
nm msg rev2 newestRev |
1030 | 1804 |
containerModule containerPackage containerFile rslt |
1805 |
pkg listHere listRep diffSet |
|
1054 | 1806 |
changed onlyHere onlyInRep answer labels values singleChangeSelector |
1879
3ca8838014ee
dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents:
1877
diff
changeset
|
1807 |
changedClasses default versionMethodsHere versionMethodsRep changedClassDefinitions |
3ca8838014ee
dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents:
1877
diff
changeset
|
1808 |
wasInChangeSetBefore| |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1809 |
|
1189
fdc5e747c184
refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents:
1185
diff
changeset
|
1810 |
aClass isNil ifTrue:[self error:'nil class']. |
1158 | 1811 |
|
1377
0fd99dd003f6
classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents:
1375
diff
changeset
|
1812 |
resources := self classResources. |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1813 |
|
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1814 |
currentClass := aClass theNonMetaclass. |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1815 |
|
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1816 |
nm := currentClass name. |
1189
fdc5e747c184
refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents:
1185
diff
changeset
|
1817 |
mgr := self sourceCodeManagerFor:currentClass. |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1818 |
mgr isNil ifTrue:[ |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1819 |
^ self |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1820 |
]. |
1084 | 1821 |
|
1822 |
sourceInfo := mgr sourceInfoOfClass:currentClass. |
|
1823 |
sourceInfo notNil ifTrue:[ |
|
2209
e3a4510c45f2
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
2200
diff
changeset
|
1824 |
currentClass package ~= PackageId noProjectID ifTrue:[ |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
1825 |
containerPackage := mgr directoryFromSourceInfo:sourceInfo. |
1084 | 1826 |
containerModule := mgr moduleFromSourceInfo:sourceInfo. |
1827 |
]. |
|
1828 |
containerFile := mgr containerFromSourceInfo:sourceInfo. |
|
1829 |
]. |
|
1830 |
||
989
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1831 |
currentClass isLoaded ifTrue:[ |
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1832 |
rev := currentClass binaryRevision. |
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1833 |
rev2 := currentClass revision. |
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1834 |
rev isNil ifTrue:[ |
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1835 |
rev := rev2 |
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1836 |
]. |
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1837 |
rev isNil ifTrue:[ |
1084 | 1838 |
pkg := currentClass package. |
2209
e3a4510c45f2
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
2200
diff
changeset
|
1839 |
(pkg notNil and:[pkg ~= PackageId noProjectID]) ifTrue:[ |
1019 | 1840 |
containerModule := pkg upTo:$:. |
1841 |
containerPackage := pkg copyFrom:(containerModule size + 2). |
|
1842 |
]. |
|
1843 |
containerModule size == 0 ifTrue:[ |
|
1084 | 1844 |
containerModule := (SourceCodeManagerUtilities lastModule ) ? Project current repositoryModule. |
1019 | 1845 |
]. |
1846 |
containerPackage size == 0 ifTrue:[ |
|
1084 | 1847 |
containerPackage := (SourceCodeManagerUtilities lastPackage ) ? Project current package. |
1019 | 1848 |
]. |
1030 | 1849 |
answer := self confirmWithCancel:(resources |
1035 | 1850 |
string:'The class %3 seems to have no (valid) repository information.\\I assume you want to check it out from: %1/%2.' |
1030 | 1851 |
with:containerModule allBold |
1035 | 1852 |
with:containerPackage allBold |
1084 | 1853 |
with:currentClass name allBold) withCRs. |
1030 | 1854 |
answer isNil ifTrue:[^ self "cancelled"]. |
1855 |
answer ifFalse:[ |
|
1856 |
rslt := SourceCodeManagerUtilities |
|
1857 |
askForContainer:(resources string:'The class seems to have no repository information.\\Do you want to checkOut from an existing containers contents ?') |
|
1858 |
title:'Container to load from' note:nil |
|
1859 |
initialModule:containerModule |
|
1860 |
initialPackage:containerPackage |
|
1158 | 1861 |
initialFileName:(currentClass nameWithoutPrefix , '.st') |
1030 | 1862 |
forNewContainer:false. |
1084 | 1863 |
|
1030 | 1864 |
rslt isNil ifTrue:[ |
1865 |
"/ canel |
|
1866 |
^ self |
|
1867 |
]. |
|
1868 |
containerModule := "lastModule :=" rslt at:#module. |
|
1869 |
containerPackage := "lastPackage :=" rslt at:#package. |
|
1870 |
containerFile := rslt at:#fileName. |
|
1871 |
]. |
|
1019 | 1872 |
|
1873 |
"/ rslt := SourceCodeManagerUtilities |
|
1874 |
"/ askForContainer:(resources string:'The class seems to have no (valid) repository information.\\Do you want to check it out from an existing container ?') |
|
1875 |
"/ title:'Container to checkOut' note:nil |
|
1876 |
"/ initialModule:containerModule |
|
1877 |
"/ initialPackage:containerPackage |
|
1878 |
"/ initialFileName:(currentClass name , '.st'). |
|
1030 | 1879 |
"/ forNewContainer:false. |
1019 | 1880 |
"/ rslt isNil ifTrue:[^ self]. |
1881 |
"/ self warn:(resources string:'Class %1 seems to be not yet in the repository' with:currentClass name allBold). |
|
1882 |
"/ ^ self |
|
989
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1883 |
]. |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1884 |
]. |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1885 |
|
1966 | 1886 |
containerFile isNil ifTrue:[ |
1887 |
containerFile := currentClass classFilename. |
|
1888 |
]. |
|
1889 |
||
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1890 |
"/ |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1891 |
"/ class in repository - ask for revision |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1892 |
"/ |
1084 | 1893 |
"/ newestRev := mgr newestRevisionOf:currentClass. |
1978 | 1894 |
containerModule isNil ifTrue:[ |
1982 | 1895 |
containerModule := Dialog request:(resources |
1896 |
stringWithCRs:'Missing Module Information for CheckOut of "%1".\\Module:' |
|
1897 |
with:aClass name allBold). |
|
1978 | 1898 |
containerModule isEmptyOrNil ifTrue:[^ self]. |
1899 |
]. |
|
1900 |
containerPackage isNil ifTrue:[ |
|
1982 | 1901 |
containerPackage := Dialog request:(resources |
1902 |
stringWithCRs:'Missing Package Information for CheckOut of "%1".\\Package:' |
|
1903 |
with:aClass name allBold). |
|
1978 | 1904 |
containerPackage isEmptyOrNil ifTrue:[^ self]. |
1905 |
]. |
|
1906 |
||
1084 | 1907 |
newestRev := mgr newestRevisionInFile:containerFile directory:containerPackage module:containerModule. |
1006 | 1908 |
askForRevision ifFalse:[ |
1909 |
rev := newestRev ? '' |
|
1910 |
] ifTrue:[ |
|
1019 | 1911 |
msg := resources string:'CheckOut which revision of ''%1'': (empty for newest)' with:nm allBold. |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1912 |
rev notNil ifTrue:[ |
1006 | 1913 |
msg := msg , '\\' , (resources string:'Current ''%1'' is based upon rev %2.' |
1019 | 1914 |
with:nm allBold with:rev). |
1006 | 1915 |
(rev2 notNil and:[rev2 ~= rev]) ifTrue:[ |
2539
abce5c41eef8
comment/format in: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2522
diff
changeset
|
1916 |
msg := msg , '\' , (resources string:'And has been checked into the repository as %1.' with:rev2) |
1006 | 1917 |
] |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1918 |
]. |
1006 | 1919 |
newestRev notNil ifTrue:[ |
2539
abce5c41eef8
comment/format in: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2522
diff
changeset
|
1920 |
msg := msg , '\' , (resources string:'Newest in repository is %1.' with:newestRev) |
989
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1921 |
]. |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1922 |
|
1006 | 1923 |
rev := SourceCodeManagerUtilities |
1924 |
askForExistingRevision:msg |
|
1925 |
title:'CheckOut from repository' |
|
1926 |
class:currentClass. |
|
1927 |
rev isNil ifTrue:[ |
|
1339 | 1928 |
^ self "/ canceled |
987 | 1929 |
]. |
1006 | 1930 |
]. |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1931 |
|
1006 | 1932 |
rev withoutSpaces isEmpty ifTrue:[ |
1933 |
msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'. |
|
1934 |
"/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm. |
|
1935 |
aStream := mgr getSourceStreamFor:currentClass revision:newestRev. |
|
1936 |
revString := '(newest: ' , (newestRev ? '???') , ')'. |
|
1937 |
] ifFalse:[ |
|
1938 |
msg := 'extracting previous %1'. |
|
1084 | 1939 |
"/ aStream := mgr getSourceStreamFor:currentClass revision:rev. |
1940 |
"/ revString := rev |
|
1941 |
aStream := mgr |
|
1942 |
streamForClass:currentClass |
|
1943 |
fileName:containerFile |
|
1944 |
revision:rev |
|
1945 |
directory:containerPackage |
|
1946 |
module:containerModule |
|
1947 |
cache:true. |
|
1006 | 1948 |
]. |
996 | 1949 |
|
1006 | 1950 |
aStream isNil ifTrue:[ |
1800
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
1951 |
self warn:(resources string:'Could not extract source of %1 from repository' with:aClass name allBold). |
1006 | 1952 |
^ self |
1953 |
]. |
|
1954 |
aStream class readErrorSignal handle:[:ex | |
|
1800
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
1955 |
self warn:('Read error while reading extracted source\\' , ex description) withCRs. |
1006 | 1956 |
aStream close. |
1957 |
^ self |
|
1958 |
] do:[ |
|
1959 |
sourceToLoad := aStream contents asString. |
|
1960 |
]. |
|
1961 |
aStream close. |
|
987 | 1962 |
|
1919 | 1963 |
wasInChangeSetBefore := ChangeSet current includesChangeForClassOrMetaclass:currentClass. |
1879
3ca8838014ee
dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents:
1877
diff
changeset
|
1964 |
|
1006 | 1965 |
currentClass isLoaded ifFalse:[ |
1966 |
rev = newestRev ifTrue:[ |
|
1967 |
currentClass autoload. |
|
996 | 1968 |
] ifFalse:[ |
1006 | 1969 |
sourceToLoad readStream fileIn. |
996 | 1970 |
]. |
1879
3ca8838014ee
dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents:
1877
diff
changeset
|
1971 |
wasInChangeSetBefore ifFalse:[ |
3ca8838014ee
dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents:
1877
diff
changeset
|
1972 |
ChangeSet current condenseChangesForClass:currentClass. |
3ca8838014ee
dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents:
1877
diff
changeset
|
1973 |
]. |
1006 | 1974 |
^ self. |
1975 |
]. |
|
1976 |
||
2236 | 1977 |
inChangeSet := aClass hasUnsavedChanges. |
1800
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
1978 |
|
1972
32853d3cb43a
care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents:
1971
diff
changeset
|
1979 |
Error handle:[:ex | |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
1980 |
(Dialog |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
1981 |
confirm:(resources |
2426
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
1982 |
stringWithCRs:'An error:\ %1\was encountered while generating the current source of the class %2.\This might be due to some missing or corrupted source file.\You may proceed, but no information about the differences between your current version and the repositories version can be shown.\\Continue ?' |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
1983 |
with:ex description |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
1984 |
with:currentClass name allBold) |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
1985 |
noLabel:'Cancel') |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
1986 |
ifFalse:[ |
1999 | 1987 |
AbortOperationRequest raise |
1972
32853d3cb43a
care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents:
1971
diff
changeset
|
1988 |
]. |
2426
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
1989 |
sourceToLoad readStream fileIn. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
1990 |
^ self. |
1972
32853d3cb43a
care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents:
1971
diff
changeset
|
1991 |
] do:[ |
2426
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
1992 |
self activityNotification:'generating current source...'. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
1993 |
|
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
1994 |
currentSource := self sourceCodeOfClass:currentClass. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
1995 |
|
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
1996 |
self activityNotification:'comparing...'. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
1997 |
|
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
1998 |
sourceToLoad = currentSource ifTrue:[ |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
1999 |
"/ make all methods belong to the classes project |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2000 |
self setPackageOfAllMethodsIn:aClass to:aClass package. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2001 |
inChangeSet ifTrue:[ |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2002 |
rev = newestRev ifTrue:[ |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2003 |
(askForConfirmation not |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2004 |
or:[ wasInChangeSetBefore not |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2005 |
or:[ self confirm:(resources |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2006 |
stringWithCRs:'%1 is up-to-date.\\Remove entries for %1 from changeSet ?' |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2007 |
with:aClass name)]]) |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2008 |
ifTrue:[ |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2009 |
ChangeSet current condenseChangesForClass:aClass. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2010 |
]. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2011 |
]. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2012 |
]. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2013 |
self activityNotification:'... nothing changed in repository'. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2014 |
^ self. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2015 |
]. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2016 |
|
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2017 |
self activityNotification:'generating diffSet...'. |
1972
32853d3cb43a
care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents:
1971
diff
changeset
|
2018 |
listHere := ChangeSet fromStream:(currentSource readStream). |
32853d3cb43a
care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents:
1971
diff
changeset
|
2019 |
]. |
2426
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2020 |
|
1006 | 2021 |
listRep := ChangeSet fromStream:(sourceToLoad readStream). |
1051 | 2022 |
|
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2023 |
Error handle:[:ex | |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2024 |
(Dialog |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2025 |
confirm:(resources |
2426
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2026 |
stringWithCRs:'An error:\ %1\was encountered while trying to figure out what has changed.\This might be due to some missing or corrupted source file.\If you proceed, the old code will be loaded over the existing code without further checks (fileIn).\\Continue ?' |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2027 |
with:ex description |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2028 |
) |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2029 |
noLabel:'Cancel') |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2030 |
ifFalse:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2031 |
^ self |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2032 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2033 |
sourceToLoad readStream fileIn. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2034 |
^ self. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2035 |
] do:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2036 |
versionMethodsHere := listHere select:[:change | (change isMethodChange |
2184
4bb6267612be
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
fm
parents:
2175
diff
changeset
|
2037 |
and:[(AbstractSourceCodeManager isVersionMethodSelector:change selector) |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2038 |
and:[change changeClass isMeta]])]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2039 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2040 |
versionMethodsRep := listRep select:[:change | (change isMethodChange |
2184
4bb6267612be
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
fm
parents:
2175
diff
changeset
|
2041 |
and:[(AbstractSourceCodeManager isVersionMethodSelector:change selector) |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2042 |
and:[change changeClass isMeta]])]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2043 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2044 |
"/ compare all but the version methods |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2045 |
listHere := listHere select:[:change | (change isMethodChange |
2184
4bb6267612be
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
fm
parents:
2175
diff
changeset
|
2046 |
and:[(AbstractSourceCodeManager isVersionMethodSelector:change selector) |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2047 |
and:[change changeClass isMeta]]) not]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2048 |
listRep := listRep select:[:change | (change isMethodChange |
2184
4bb6267612be
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
fm
parents:
2175
diff
changeset
|
2049 |
and:[(AbstractSourceCodeManager isVersionMethodSelector:change selector) |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2050 |
and:[change changeClass isMeta]]) not]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2051 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2052 |
diffSet := listHere diffSetsAgainst:listRep. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2053 |
changed := diffSet changed. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2054 |
onlyHere := diffSet onlyInReceiver. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2055 |
onlyHere := onlyHere select:[:eachDiff| |methodsPackage| |
2097 | 2056 |
eachDiff isClassDefinitionChange not and:[ |
2057 |
methodsPackage := (eachDiff changeClass compiledMethodAt:eachDiff selector) package. |
|
2058 |
methodsPackage == containerPackage |
|
2059 |
] |
|
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2060 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2061 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2062 |
onlyInRep := diffSet onlyInArg. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2063 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2064 |
changedClassDefinitions := changed select:[:eachChangePair | eachChangePair first isClassDefinitionChange]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2065 |
changed := changed reject:[:eachChangePair | eachChangePair first isClassDefinitionChange]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2066 |
changed := changed reject:[:eachChangePair | eachChangePair first isClassCommentChange]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2067 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2068 |
labels := #('Cancel' 'Merge' 'Load'). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2069 |
values := #(nil #merge #load). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2070 |
default := askForRevision |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2071 |
ifTrue:[3. "i.e. load"] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2072 |
ifFalse:[2. "i.e. merge"]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2073 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2074 |
msg := 'About to load ''%4''.\\'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2075 |
onlyInRep size > 0 ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2076 |
msg := msg , 'The repositories version contains %1 method(s) which are not in your current class.\'. |
2064
3e7b6104ce47
When checking out newest sources from a repository,
Stefan Vogel <sv@exept.de>
parents:
2063
diff
changeset
|
2077 |
]. |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2078 |
onlyHere size > 0 ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2079 |
onlyInRep size > 0 ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2080 |
msg := msg , 'And there '. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2081 |
] ifFalse:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2082 |
msg := msg , 'There '. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2083 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2084 |
msg := msg , 'are %2 methods in your current class, which are not in the repository.\'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2085 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2086 |
changed size > 0 ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2087 |
changed size == 1 ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2088 |
msg := msg , 'The ''%6''-method is different (present in both).\\'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2089 |
singleChangeSelector := changed first first selector allBold |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2090 |
] ifFalse:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2091 |
msg := msg , '%3 methods are different (present in both).\\'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2092 |
] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2093 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2094 |
changedClassDefinitions size > 0 ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2095 |
changedClassDefinitions size == 1 ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2096 |
msg := msg , 'The class definition is different.\\'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2097 |
] ifFalse:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2098 |
msg := msg , '%5 class definitions are different.\\'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2099 |
] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2100 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2101 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2102 |
onlyHere isEmpty ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2103 |
onlyInRep isEmpty ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2104 |
(changed isEmpty and:[changedClassDefinitions isEmpty]) ifTrue:[ |
2642
0675ababcc6d
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2637
diff
changeset
|
2105 |
"/ self halt. |
2605
93f1e7e8aee7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2602
diff
changeset
|
2106 |
versionMethodsRep notEmpty ifTrue:[ |
93f1e7e8aee7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2602
diff
changeset
|
2107 |
(self confirm:(resources string:'Only version methods are different in %1.\\Update the version-IDs ?' with:aClass name allBold) withCRs) ifTrue:[ |
93f1e7e8aee7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2602
diff
changeset
|
2108 |
versionMethodsRep do:[:each | each apply]. |
93f1e7e8aee7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2602
diff
changeset
|
2109 |
] |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2110 |
]. |
2193 | 2111 |
"/ make all those methods belong to the classes project |
2112 |
"/ no - that is wrong !! self setPackageOfAllMethodsIn:aClass to:aClass package. |
|
2113 |
self setPackageOfAllMethodsInChangeSet:listRep to:aClass package. |
|
2605
93f1e7e8aee7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2602
diff
changeset
|
2114 |
self activityNotification:'Only version methods are different in the repository'. |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2115 |
^ self |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2116 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2117 |
inChangeSet ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2118 |
msg := msg , '\Attention:\Load will undo your changes made to ''%4'' (if any were made).'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2119 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2120 |
labels := #('Cancel' 'Load'). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2121 |
values := #(nil #load). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2122 |
default := askForRevision |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2123 |
ifTrue:[2. "i.e. load"] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2124 |
ifFalse:[1. "i.e. cancel"]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2125 |
default := 2. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2126 |
] ifFalse:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2127 |
changed isEmpty ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2128 |
msg := msg , '\Attention:\Load will load methods which are not present in ''%4''.'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2129 |
labels := #('Cancel' 'Load'). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2130 |
values := #(nil #load). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2131 |
default := askForRevision |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2132 |
ifTrue:[2. "i.e. load"] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2133 |
ifFalse:[1. "i.e. cancel"]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2134 |
default := 2. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2135 |
] ifFalse:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2136 |
inChangeSet ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2137 |
msg := msg , '\Attention:\Load will undo your changes made to ''%4'' (if any were made);'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2138 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2139 |
msg := msg , '\Merge will only load methods which are not present in ''%4'' (i.e. undo removals but preserve changes).'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2140 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2141 |
] |
1006 | 2142 |
] ifFalse:[ |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2143 |
onlyInRep isEmpty ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2144 |
inChangeSet ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2145 |
msg := msg , '\Attention:\Load will undo your changes made to ''%4'' (if any were made),'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2146 |
msg := msg , '\and remove added methods which are not present in the repository version.'. |
1055
f44b12442c58
version update after load from rep.
Claus Gittinger <cg@exept.de>
parents:
1054
diff
changeset
|
2147 |
]. |
1121 | 2148 |
labels := #('Cancel' 'Load'). |
987 | 2149 |
values := #(nil #load). |
1007
44c0229bcb43
better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents:
1006
diff
changeset
|
2150 |
default := askForRevision |
44c0229bcb43
better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents:
1006
diff
changeset
|
2151 |
ifTrue:[2. "i.e. load"] |
44c0229bcb43
better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents:
1006
diff
changeset
|
2152 |
ifFalse:[1. "i.e. cancel"]. |
1907 | 2153 |
default := 2. |
987 | 2154 |
] ifFalse:[ |
1339 | 2155 |
inChangeSet ifTrue:[ |
2156 |
msg := msg , '\Attention:\Load will undo your changes made to ''%4'' (if any were made);'. |
|
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2157 |
msg := msg , '\Merge will only load methods which are not present in ''%4'' (i.e. undo removals but preserve changes).'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2158 |
] |
1339 | 2159 |
] |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2160 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2161 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2162 |
msg := msg bindWith:onlyInRep size printString |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2163 |
with:onlyHere size printString |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2164 |
with:changed size printString |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2165 |
with:aClass name allBold |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2166 |
with:changedClassDefinitions size printString |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2167 |
with:singleChangeSelector. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2168 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2169 |
askForConfirmation ifFalse:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2170 |
answer := #load |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2171 |
] ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2172 |
answer := (Dialog confirmWithCancel:msg withCRs |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2173 |
labels:(resources array:labels) |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2174 |
values:values |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2175 |
default:default). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2176 |
answer isNil ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2177 |
self activityNotification:'...cancelled'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2178 |
^ self |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2179 |
]. |
2013
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
2180 |
]. |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2181 |
self activityNotification:'updating...'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2182 |
changedClasses := IdentitySet new. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2183 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2184 |
"/ Class withoutUpdatingChangesDo:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2185 |
answer == #load ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2186 |
"when loading, remove all the methods which are no longer in classes with a changed |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2187 |
class definition. So we avoid possible compile errors of old methods, which will go away" |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2188 |
onlyHere do:[:eachChange | |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2189 |
"remove this change (method not present in repository version)" |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2190 |
|cClass cSel| |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2191 |
eachChange isMethodChange ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2192 |
cClass := eachChange changeClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2193 |
cSel := eachChange selector. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2194 |
cClass basicRemoveSelector:cSel. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2195 |
] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2196 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2197 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2198 |
changedClassDefinitions do:[:eachChangeArr | |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2199 |
|cHere eachChangedClass| |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2200 |
cHere := eachChangeArr at:1. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2201 |
eachChangedClass := cHere changeClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2202 |
eachChangedClass notNil ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2203 |
changedClasses add:eachChangedClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2204 |
eachChangedClass := eachChangedClass theNonMetaclass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2205 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2206 |
"remove changed methods now, but keep the changes (to be applied later)" |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2207 |
changed do:[:eachChangeArr| |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2208 |
|eachChange eachClass| |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2209 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2210 |
eachChange := eachChangeArr first. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2211 |
eachChange isMethodChange ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2212 |
eachClass := eachChange changeClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2213 |
eachClass theNonMetaclass == eachChangedClass ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2214 |
eachClass basicRemoveSelector:eachChange selector. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2215 |
]. |
1999 | 2216 |
]. |
2217 |
]. |
|
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2218 |
] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2219 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2220 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2221 |
"apply class definition changes (use the repository version)" |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2222 |
changedClassDefinitions do:[:eachChangeArr | |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2223 |
|cRep| |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2224 |
cRep := eachChangeArr at:2. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2225 |
cRep apply. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2226 |
]. |
1057
6903d4d5097d
do not update the changesFile, when checkingOut
Claus Gittinger <cg@exept.de>
parents:
1056
diff
changeset
|
2227 |
]. |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2228 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2229 |
onlyInRep do:[:eachChange | |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2230 |
|changeClass| |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2231 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2232 |
"apply this change (method only present in rep-version)" |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2233 |
eachChange apply. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2234 |
eachChange isMethodChange ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2235 |
changeClass := eachChange changeClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2236 |
changeClass notNil ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2237 |
eachChange changeMethod setPackage:(changeClass package). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2238 |
changedClasses add:changeClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2239 |
] |
2013
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
2240 |
] |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2241 |
] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2242 |
. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2243 |
answer == #load ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2244 |
changed do:[:eachChangeArr | "apply this change (go to rep-version)" |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2245 |
|cHere cRep| |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2246 |
cHere := eachChangeArr at:1. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2247 |
cRep := eachChangeArr at:2. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2248 |
cRep apply. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2249 |
cRep isMethodChange ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2250 |
cRep changeMethod setPackage:(cRep changeClass package). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2251 |
changedClasses add:cRep changeClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2252 |
] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2253 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2254 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2255 |
versionMethodsRep size >= 1 ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2256 |
versionMethodsRep last apply. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2257 |
] ifFalse:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2258 |
self error:'missing version method in repository' mayProceed:true. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2259 |
]. |
2193 | 2260 |
"/ make all those methods belong to the classes project |
2261 |
"/ no - that is wrong !! self setPackageOfAllMethodsIn:aClass to:aClass package. |
|
2262 |
self setPackageOfAllMethodsInChangeSet:listRep to:aClass package. |
|
1055
f44b12442c58
version update after load from rep.
Claus Gittinger <cg@exept.de>
parents:
1054
diff
changeset
|
2263 |
]. |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2264 |
"/ ]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2265 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2266 |
answer == #load ifTrue:[ |
2236 | 2267 |
inChangeSet := aClass hasUnsavedChanges. |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2268 |
inChangeSet ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2269 |
rev = newestRev ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2270 |
(wasInChangeSetBefore not |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2271 |
or:[ self confirm:(resources |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2272 |
stringWithCRs:'%1 is now up-to-date.\\Remove entries for %1 from changeSet ?' |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2273 |
with:aClass name)]) |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2274 |
ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2275 |
ChangeSet current condenseChangesForClass:aClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2276 |
]. |
1800
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
2277 |
]. |
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
2278 |
]. |
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
2279 |
]. |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2280 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2281 |
changedClasses do:[:eachClass | |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2282 |
eachClass changed:#projectOrganization. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2283 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2284 |
Smalltalk changed:#projectOrganization. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2285 |
self activityNotification:'... done'. |
1800
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
2286 |
]. |
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
2287 |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
2288 |
"Modified: / 07-02-2001 / 18:18:32 / ps" |
2642
0675ababcc6d
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2637
diff
changeset
|
2289 |
"Modified: / 05-12-2011 / 21:29:32 / cg" |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
2290 |
! |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
2291 |
|
2691 | 2292 |
checkoutExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision askForMerge:askForMerge usingManager:aSourceCodeManager |
1522 | 2293 |
"check-out a class from the source repository. |
2294 |
If askForRevision is false, check-out the newest version." |
|
2295 |
||
1841
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
2296 |
|resources |
1704 | 2297 |
inChangeSet extensionMethods |
1841
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
2298 |
rev msg |
1704 | 2299 |
listHere listRep diffSet |
1522 | 2300 |
changed onlyHere onlyInRep answer labels values singleChangeSelector |
2301 |
changedClasses default | |
|
2302 |
||
2691 | 2303 |
listRep := self changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager. |
1841
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
2304 |
listRep isNil ifTrue:[ ^self ]. |
1522 | 2305 |
|
1841
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
2306 |
resources := self classResources. |
1522 | 2307 |
|
2308 |
self activityNotification:'generating diffSet...'. |
|
2309 |
||
2310 |
extensionMethods := OrderedCollection new. |
|
2311 |
Smalltalk allClassesDo:[:aClass | |owner classPackage| |
|
2312 |
"/ individual methods ... |
|
2313 |
aClass isMeta ifFalse:[ |
|
2314 |
(aClass package ~= packageToCheckOut) ifTrue:[ |
|
2315 |
aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
|
2316 |
"/ methods in this project ... |
|
2317 |
(mthd package = packageToCheckOut) ifTrue:[ |
|
2318 |
"/ ... whose class is not in the ckechIn-set |
|
2319 |
extensionMethods add:mthd |
|
2320 |
] |
|
2321 |
]. |
|
2322 |
]. |
|
2323 |
]. |
|
2324 |
]. |
|
2325 |
listHere := ChangeSet forExistingMethods:extensionMethods. |
|
2326 |
||
2327 |
inChangeSet := listRep contains:[:someChange | |
|
2328 |
|cClass cSel| |
|
2329 |
||
2330 |
someChange isMethodChange ifTrue:[ |
|
2331 |
cClass := someChange changeClass. |
|
2332 |
cSel := someChange selector. |
|
2333 |
ChangeSet current includesChangeForClass:cClass selector:cSel |
|
2334 |
] |
|
2335 |
]. |
|
2336 |
||
2337 |
diffSet := listHere diffSetsAgainst:listRep. |
|
2338 |
changed := diffSet changed. |
|
2339 |
onlyHere := diffSet onlyInReceiver. |
|
2340 |
onlyInRep := diffSet onlyInArg. |
|
2341 |
||
2342 |
labels := #('Cancel' 'Merge' 'Load'). |
|
2343 |
values := #(nil #merge #load). |
|
2344 |
default := askForRevision |
|
2345 |
ifTrue:[3. "i.e. load"] |
|
2346 |
ifFalse:[2. "i.e. merge"]. |
|
2347 |
||
2348 |
msg := 'About to load extensions for ''%5''.\\'. |
|
2349 |
onlyInRep size > 0 ifTrue:[ |
|
2350 |
msg := msg , 'The repositories version contains %1 extension method(s) which are not in your current image.\'. |
|
2351 |
]. |
|
2352 |
onlyHere size > 0 ifTrue:[ |
|
2353 |
onlyInRep size > 0 ifTrue:[ |
|
2354 |
msg := msg , 'And there '. |
|
2355 |
] ifFalse:[ |
|
2356 |
msg := msg , 'There '. |
|
2357 |
]. |
|
2358 |
msg := msg , 'are %2 extension methods in your current image, which are not in the repository.\'. |
|
2359 |
]. |
|
2360 |
changed size > 0 ifTrue:[ |
|
2361 |
changed size == 1 ifTrue:[ |
|
2362 |
msg := msg , 'The ''%5''-method is different (present in both).\\'. |
|
2363 |
singleChangeSelector := changed first first selector allBold |
|
2364 |
] ifFalse:[ |
|
2365 |
msg := msg , '%3 methods are different (present in both).\\'. |
|
2366 |
] |
|
2367 |
]. |
|
2368 |
||
2369 |
onlyHere isEmpty ifTrue:[ |
|
2370 |
onlyInRep isEmpty ifTrue:[ |
|
2371 |
(changed isEmpty) ifTrue:[ |
|
2372 |
listRep do:[:eachChange | |
|
2373 |
eachChange changeMethod setPackage:packageToCheckOut. |
|
2374 |
]. |
|
2375 |
^ self |
|
2376 |
]. |
|
2377 |
inChangeSet ifTrue:[ |
|
2378 |
msg := msg , '\Attention:\Load may undo any changes made to on of the extension methods (if any were made).'. |
|
2379 |
]. |
|
2380 |
labels := #('Cancel' 'Load'). |
|
2381 |
values := #(nil #load). |
|
2382 |
default := askForRevision |
|
2383 |
ifTrue:[2. "i.e. load"] |
|
2384 |
ifFalse:[1. "i.e. cancel"]. |
|
2385 |
] ifFalse:[ |
|
2386 |
changed isEmpty ifTrue:[ |
|
2387 |
msg := msg , '\Attention:\Load will load methods which are not present in the image.'. |
|
2388 |
labels := #('Cancel' 'Load'). |
|
2389 |
values := #(nil #load). |
|
2390 |
default := askForRevision |
|
2391 |
ifTrue:[2. "i.e. load"] |
|
2392 |
ifFalse:[1. "i.e. cancel"]. |
|
2393 |
] ifFalse:[ |
|
2394 |
inChangeSet ifTrue:[ |
|
2395 |
msg := msg , '\Attention:\Load will undo your changes made to the image (if any were made);'. |
|
2396 |
]. |
|
2397 |
msg := msg , '\Merge will only load methods which are not present in the image (i.e. undo removals but preserve changes).'. |
|
2398 |
]. |
|
2399 |
] |
|
2400 |
] ifFalse:[ |
|
2401 |
onlyInRep isEmpty ifTrue:[ |
|
2402 |
inChangeSet ifTrue:[ |
|
2403 |
msg := msg , '\Attention:\Load will undo your changes made to the image (if any were made),'. |
|
2404 |
msg := msg , '\and remove added methods which are not present in the repository version.'. |
|
2405 |
]. |
|
2406 |
labels := #('Cancel' 'Load'). |
|
2407 |
values := #(nil #load). |
|
2408 |
default := askForRevision |
|
2409 |
ifTrue:[2. "i.e. load"] |
|
2410 |
ifFalse:[1. "i.e. cancel"]. |
|
2411 |
] ifFalse:[ |
|
2412 |
inChangeSet ifTrue:[ |
|
2413 |
msg := msg , '\Attention:\Load will undo your changes made to the image (if any were made);'. |
|
2414 |
msg := msg , '\Merge will only load methods which are not present in the image (i.e. undo removals but preserve changes).'. |
|
2415 |
] |
|
2416 |
] |
|
2417 |
]. |
|
2418 |
||
2419 |
msg := msg bindWith:onlyInRep size printString |
|
2420 |
with:onlyHere size printString |
|
2421 |
with:changed size printString |
|
2422 |
with:singleChangeSelector |
|
2423 |
with:packageToCheckOut allBold. |
|
2424 |
||
2425 |
answer := (Dialog confirmWithCancel:msg withCRs |
|
2426 |
labels:(resources array:labels) |
|
2427 |
values:values |
|
2428 |
default:default). |
|
2429 |
answer isNil ifTrue:[^ self]. |
|
2430 |
||
2431 |
self activityNotification:'updating...'. |
|
2432 |
changedClasses := IdentitySet new. |
|
2433 |
||
2434 |
"/ Class withoutUpdatingChangesDo:[ |
|
2435 |
onlyInRep do:[:eachChange | "apply this change (method only present in rep-version)" |
|
2436 |
Class withoutUpdatingChangeSetDo:[ eachChange apply ]. |
|
2437 |
||
2438 |
eachChange changeMethod setPackage:packageToCheckOut. |
|
2439 |
changedClasses add:eachChange changeClass. |
|
2440 |
]. |
|
2441 |
answer == #load ifTrue:[ |
|
2442 |
onlyHere do:[:eachChange | "remove this change (method not present in rep-version)" |
|
2443 |
|cClass cSel| |
|
2444 |
||
2445 |
cClass := eachChange changeClass. |
|
2446 |
cSel := eachChange selector. |
|
2447 |
Class withoutUpdatingChangeSetDo:[ cClass removeSelector:cSel ]. |
|
2448 |
]. |
|
2449 |
changed do:[:eachChangeArr | "apply this change (go to rep-version)" |
|
2450 |
|cHere cRep| |
|
2451 |
cHere := eachChangeArr at:1. |
|
2452 |
cRep := eachChangeArr at:2. |
|
2453 |
Class withoutUpdatingChangeSetDo:[ cRep apply ]. |
|
2454 |
||
2455 |
cRep changeMethod setPackage:packageToCheckOut. |
|
2456 |
changedClasses add:cRep changeClass. |
|
2457 |
]. |
|
2458 |
]. |
|
2459 |
"/ ]. |
|
2460 |
changedClasses do:[:eachClass | |
|
2461 |
eachClass changed:#projectOrganization. |
|
2462 |
]. |
|
2463 |
Smalltalk changed:#projectOrganization. |
|
2464 |
||
2465 |
"Modified: / 07-02-2001 / 18:18:32 / ps" |
|
2691 | 2466 |
"Created: / 29-12-2011 / 14:34:12 / cg" |
1522 | 2467 |
! |
2468 |
||
957 | 2469 |
compareClassWithRepository:aClass |
2470 |
"open a diff-textView comparing the current (in-image) version |
|
2471 |
against its orgiginal version found in the repository." |
|
2472 |
||
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2473 |
self compareClassWithRepository:aClass askForRevision:true |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2474 |
|
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2475 |
" |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2476 |
self compareClassWithRepository:Array |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2477 |
" |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2478 |
! |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2479 |
|
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2480 |
compareClassWithRepository:aClass askForRevision:askForRevision |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2481 |
"open a diff-textView comparing the current (in-image) version |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2482 |
against its orgiginal version found in the repository." |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2483 |
|
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2484 |
|classToCompare resources brwsr |
1194 | 2485 |
aStream comparedSource currentSource rev revString thisRevString mgr |
1483 | 2486 |
nm msg revisionInClass newestRev versionsAreTheSame| |
957 | 2487 |
|
1377
0fd99dd003f6
classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents:
1375
diff
changeset
|
2488 |
resources := self classResources. |
957 | 2489 |
|
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2490 |
classToCompare := aClass theNonMetaclass. |
957 | 2491 |
|
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2492 |
nm := classToCompare name. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2493 |
mgr := self sourceCodeManagerFor:classToCompare. |
957 | 2494 |
mgr isNil ifTrue:[ |
2495 |
^ self |
|
2496 |
]. |
|
2397
e01669725571
changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents:
2383
diff
changeset
|
2497 |
|
e01669725571
changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents:
2383
diff
changeset
|
2498 |
rev := classToCompare revisionInfoOfManager:mgr. |
e01669725571
changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents:
2383
diff
changeset
|
2499 |
"/ rev := classToCompare binaryRevision. |
1483 | 2500 |
revisionInClass := classToCompare revision. |
957 | 2501 |
rev isNil ifTrue:[ |
1483 | 2502 |
rev := revisionInClass |
957 | 2503 |
]. |
2504 |
rev isNil ifTrue:[ |
|
1483 | 2505 |
(Dialog confirm:'Class seems to be not yet in the repository (or classes revision info is corrupted)\\Proceed ?' withCRs) |
2506 |
ifFalse:[ |
|
2507 |
^ self |
|
2508 |
] |
|
957 | 2509 |
]. |
2510 |
||
2511 |
"/ |
|
2512 |
"/ class in repository - ask for revision |
|
2513 |
"/ |
|
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2514 |
newestRev := mgr newestRevisionOf:classToCompare. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2515 |
askForRevision ifTrue:[ |
1466 | 2516 |
msg := resources string:'Compare to revision: (empty for newest)'. |
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2517 |
rev notNil ifTrue:[ |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2518 |
msg := msg , '\\' , (resources string:'Current %1 is based upon rev %2.' |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2519 |
with:nm allBold with:rev). |
1483 | 2520 |
(revisionInClass notNil and:[revisionInClass ~= rev]) ifTrue:[ |
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2521 |
msg := msg , '\' , (resources string:'And has been checked into the repository as %1.' |
1483 | 2522 |
with:revisionInClass) |
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2523 |
] |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2524 |
]. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2525 |
newestRev notNil ifTrue:[ |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2526 |
msg := msg , '\' , (resources string:'Newest in reporitory is %1.' |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2527 |
with:newestRev) |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2528 |
]. |
957 | 2529 |
|
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2530 |
rev := SourceCodeManagerUtilities |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2531 |
askForExistingRevision:msg |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2532 |
title:'Compare with repository' |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2533 |
class:classToCompare. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2534 |
] ifFalse:[ |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2535 |
rev := newestRev. |
957 | 2536 |
]. |
2537 |
||
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2538 |
rev notNil ifTrue:[ |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2539 |
rev withoutSpaces isEmpty ifTrue:[ |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2540 |
msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2541 |
"/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2542 |
aStream := mgr getSourceStreamFor:classToCompare revision:newestRev. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2543 |
revString := '(newest: ' , (newestRev ? '???') , ')'. |
957 | 2544 |
] ifFalse:[ |
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2545 |
msg := 'extracting previous %1'. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2546 |
aStream := mgr getSourceStreamFor:classToCompare revision:rev. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2547 |
revString := rev |
957 | 2548 |
]. |
2549 |
||
2550 |
aStream isNil ifTrue:[ |
|
2551 |
self warn:'could not extract source from repository'. |
|
2552 |
^ self |
|
2553 |
]. |
|
2554 |
aStream class readErrorSignal handle:[:ex | |
|
1245 | 2555 |
self warn:('read error while reading extracted source\\' , ex description) withCRs. |
957 | 2556 |
aStream close. |
2557 |
^ self |
|
2558 |
] do:[ |
|
2559 |
comparedSource := aStream contents asString. |
|
2560 |
]. |
|
2561 |
aStream close. |
|
2562 |
||
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2563 |
self activityNotification:'generating current source...'. |
957 | 2564 |
|
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2565 |
currentSource := self sourceCodeOfClass:classToCompare. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2566 |
|
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2567 |
self activityNotification:'comparing...'. |
957 | 2568 |
|
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2569 |
versionsAreTheSame := false. |
957 | 2570 |
comparedSource = currentSource ifTrue:[ |
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2571 |
versionsAreTheSame := true. |
957 | 2572 |
] ifFalse:[ |
1483 | 2573 |
thisRevString := revisionInClass ? 'no revision'. |
957 | 2574 |
|
2575 |
revString = '(newest)' ifTrue:[ |
|
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2576 |
(rev := mgr newestRevisionOf:classToCompare) notNil ifTrue:[ |
957 | 2577 |
revString := '(newest is ' , rev , ')' |
2578 |
] |
|
2579 |
]. |
|
2580 |
||
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2581 |
self activityNotification:'comparing...'. |
957 | 2582 |
|
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2583 |
brwsr := (UserPreferences versionDiffViewerClass) |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2584 |
openOnClass:classToCompare |
1877 | 2585 |
labelA:('Repository: ' , revString) |
957 | 2586 |
sourceA:comparedSource |
1877 | 2587 |
labelB:('Current: (based on: ' , thisRevString , ')') |
957 | 2588 |
sourceB:currentSource |
1877 | 2589 |
title:('Comparing ' , classToCompare name) |
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2590 |
ifSame:[versionsAreTheSame := true]. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2591 |
|
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2592 |
versionsAreTheSame ifFalse:[ |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2593 |
brwsr classChangeSet |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2594 |
classBeingCompared:classToCompare; |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2595 |
versionA:rev; |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2596 |
versionB:rev , 'mod'. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2597 |
]. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2598 |
]. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2599 |
|
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2600 |
versionsAreTheSame ifTrue:[ |
2236 | 2601 |
(classToCompare hasUnsavedChanges) ifTrue:[ |
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2602 |
(self confirm:(resources |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2603 |
stringWithCRs:'Versions of %1 are identical.\\Remove entries from changeSet ?' |
1864 | 2604 |
with:classToCompare name allBold)) ifTrue:[ |
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2605 |
ChangeSet current condenseChangesForClass:classToCompare. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2606 |
]. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2607 |
] ifFalse:[ |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2608 |
self information:'Versions are identical.'. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2609 |
ChangeSet current unrememberChangedClasses. |
1483 | 2610 |
]. |
2611 |
revisionInClass isNil ifTrue:[ |
|
2612 |
(Dialog confirm:'Update (Fix) the classes Revision Info ?' withCRs) |
|
2613 |
ifTrue:[ |
|
1497 | 2614 |
|newString root| |
1483 | 2615 |
|
2616 |
newString := mgr updatedRevisionStringOf:aClass forRevision:rev with:aClass revisionString. |
|
1497 | 2617 |
newString isNil ifTrue:[ |
2618 |
root := mgr getCVSROOTForModule:(aClass package upTo:$:). |
|
2619 |
root := mgr repositoryTopDirectoryFromCVSRoot:root. |
|
1500 | 2620 |
newString := '$', 'Header: ',(root copyReplaceAll: $: with:$/ ),'/' |
1911 | 2621 |
,(Smalltalk fileNameForClass:aClass),'.st,v ',rev,' ' |
2006 | 2622 |
,(Date today printStringFormat:'%y-%m-%d'),' ' |
2623 |
,(Time now printStringFormat:'%h:%m:%s'),' ' |
|
2624 |
,'+0000 ' |
|
1497 | 2625 |
,(OperatingSystem getLoginName),' Exp $'. |
2626 |
]. |
|
2637 | 2627 |
mgr updateVersionMethodOf:aClass for:newString. |
1483 | 2628 |
] |
2629 |
]. |
|
957 | 2630 |
]. |
2631 |
]. |
|
2632 |
||
2633 |
" |
|
997 | 2634 |
self compareClassWithRepository:Array |
957 | 2635 |
" |
1497 | 2636 |
|
2637 | 2637 |
"Modified: / 02-12-2011 / 14:09:20 / cg" |
957 | 2638 |
! |
2639 |
||
2189 | 2640 |
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest |
2641 |
|diffSet| |
|
2642 |
||
2643 |
diffSet := self diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest. |
|
1875
f00eb53229ae
first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents:
1864
diff
changeset
|
2644 |
VersionDiffBrowser |
f00eb53229ae
first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents:
1864
diff
changeset
|
2645 |
openOnDiffSet:diffSet |
f00eb53229ae
first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents:
1864
diff
changeset
|
2646 |
labelA:'Repository' |
f00eb53229ae
first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents:
1864
diff
changeset
|
2647 |
labelB:'Image' |
2522
d32ade066c3f
changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2487
diff
changeset
|
2648 |
title:('Differences of %1' bindWith:aProject) |
d32ade066c3f
changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2487
diff
changeset
|
2649 |
ignoreExtensions:false. |
d32ade066c3f
changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2487
diff
changeset
|
2650 |
|
d32ade066c3f
changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2487
diff
changeset
|
2651 |
"Modified: / 12-09-2011 / 11:56:01 / cg" |
2189 | 2652 |
! |
2653 |
||
2654 |
compareProjectWithRepository:aProject |
|
2655 |
^ self compareProject:aProject withRepositoryVersionFrom:nil |
|
1875
f00eb53229ae
first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents:
1864
diff
changeset
|
2656 |
! |
f00eb53229ae
first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents:
1864
diff
changeset
|
2657 |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2658 |
createSourceContainerForClass:aClass |
2651 | 2659 |
"let user specify the source-repository values for aClass. |
2660 |
Return false, if failed." |
|
2661 |
||
2662 |
^ self |
|
2663 |
createSourceContainerForClass:aClass |
|
2664 |
usingManager:(self sourceCodeManagerFor:aClass). |
|
2665 |
||
2666 |
"Modified: / 21-12-2011 / 18:31:49 / cg" |
|
2667 |
! |
|
2668 |
||
2669 |
createSourceContainerForClass:aClass usingManager:aManager |
|
2670 |
"let user specify the source-repository values for aClass. |
|
2671 |
Return false, if failed." |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2672 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2673 |
|resources| |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2674 |
|
2651 | 2675 |
aManager isNil ifTrue:[^ false]. |
2676 |
||
1377
0fd99dd003f6
classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents:
1375
diff
changeset
|
2677 |
resources := self classResources. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2678 |
^ self |
2651 | 2679 |
defineSourceContainerForClass:aClass |
2680 |
usingManager:aManager |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2681 |
title:(resources string:'Repository information for %1' with:aClass name) |
2651 | 2682 |
text:(resources string:'Create new %1-repository container for ''%2''' |
2683 |
with:aManager managerTypeName |
|
2684 |
with:aClass name allBold) |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2685 |
createDirectories:true |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2686 |
createContainer:true. |
2651 | 2687 |
|
2688 |
"Created: / 21-12-2011 / 18:31:23 / cg" |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2689 |
! |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2690 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2691 |
defineSourceContainerForClass:aClass title:title text:boxText createDirectories:createDirs createContainer:createContainer |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2692 |
"let user specify the source-repository values for aClass" |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2693 |
|
2651 | 2694 |
^ self |
2695 |
defineSourceContainerForClass:aClass |
|
2696 |
usingManager:(self sourceCodeManagerFor:aClass) |
|
2697 |
title:title |
|
2698 |
text:boxText |
|
2699 |
createDirectories:createDirs |
|
2700 |
createContainer:createContainer |
|
2701 |
||
2702 |
"Modified: / 21-12-2011 / 18:34:44 / cg" |
|
2703 |
! |
|
2704 |
||
2705 |
defineSourceContainerForClass:aClass usingManager:mgr title:title text:boxText createDirectories:createDirs createContainer:createContainer |
|
2706 |
"let user specify the source-repository values for aClass" |
|
2707 |
||
2708 |
|className |
|
2063 | 2709 |
"oldModule oldPackage" oldFileName |
1533 | 2710 |
module directory fileName nameSpace nameSpacePrefix |
2651 | 2711 |
info project nm creatingNew msg |
952
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2712 |
answer doCheckinWithoutAsking forceCheckIn resources rslt note |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2713 |
requiredPackage| |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2714 |
|
2651 | 2715 |
mgr isNil ifTrue:[^ false]. |
2716 |
||
1377
0fd99dd003f6
classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents:
1375
diff
changeset
|
2717 |
resources := self classResources. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2718 |
aClass isLoaded ifFalse:[ |
1076 | 2719 |
self warn:(resources string:'Please load the %1-class first' with:aClass name). |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2720 |
^ false. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2721 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2722 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2723 |
className := aClass name. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2724 |
|
1533 | 2725 |
aClass isProjectDefinition ifTrue:[ |
2726 |
"/ no way - their package is already known and fix. |
|
2727 |
module := aClass module. |
|
2728 |
directory := aClass moduleDirectory. |
|
2729 |
] ifFalse:[ |
|
2730 |
"/ |
|
2731 |
"/ defaults, if nothing at all is known |
|
2732 |
"/ |
|
2733 |
(module := LastModule) isNil ifTrue:[ |
|
2734 |
module := (OperatingSystem getLoginName). |
|
2735 |
]. |
|
2736 |
(directory := LastPackage) isNil ifTrue:[ |
|
2737 |
directory := 'private'. |
|
2738 |
]. |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2739 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2740 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2741 |
"/ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2742 |
"/ try to extract some useful defaults from the current project |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2743 |
"/ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2744 |
(Project notNil and:[(project := Project current) notNil]) ifTrue:[ |
1533 | 2745 |
directory isNil ifTrue:[ |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2746 |
(nm := project repositoryDirectory) isNil ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2747 |
nm := project name |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2748 |
]. |
1533 | 2749 |
directory := nm. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2750 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2751 |
module isNil ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2752 |
(nm := project repositoryModule) notNil ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2753 |
module := nm |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2754 |
] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2755 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2756 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2757 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2758 |
"/ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2759 |
"/ ask the sourceCodeManager if it knows anything about that class |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2760 |
"/ if so, take that as a default. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2761 |
"/ |
1189
fdc5e747c184
refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents:
1185
diff
changeset
|
2762 |
info := mgr sourceInfoOfClass:aClass. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2763 |
info notNil ifTrue:[ |
1368 | 2764 |
true "module ~= LastModule" ifTrue:[ |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2765 |
(info includesKey:#module) ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2766 |
module := (info at:#module). |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2767 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2768 |
]. |
1401 | 2769 |
"/ true "package ~= LastPackage" ifTrue:[ |
2770 |
"/ (info includesKey:#directory) ifTrue:[ |
|
2771 |
"/ package := (info at:#directory). |
|
2772 |
"/ ]. |
|
2773 |
"/ ]. |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2774 |
fileName := mgr containerFromSourceInfo:info. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2775 |
(nameSpace := aClass nameSpace) ~~ Smalltalk ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2776 |
nameSpacePrefix := nameSpace name , '::'. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2777 |
(fileName startsWith:nameSpacePrefix) ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2778 |
fileName := fileName copyFrom:(nameSpacePrefix size + 1). |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2779 |
] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2780 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2781 |
"/ (info includesKey:#fileName) ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2782 |
"/ fileName := (info at:#fileName). |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2783 |
"/ ] ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2784 |
"/ (info includesKey:#expectedFileName) ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2785 |
"/ fileName := (info at:#expectedFileName). |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2786 |
"/ ] ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2787 |
"/ (info includesKey:#classFileNameBase) ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2788 |
"/ fileName := (info at:#classFileNameBase) , '.st'. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2789 |
"/ ] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2790 |
"/ ] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2791 |
"/ ] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2792 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2793 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2794 |
fileName isNil ifTrue:[ |
1338 | 2795 |
fileName := (Smalltalk fileNameForClass:aClass) , '.st'. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2796 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2797 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2798 |
OperatingSystem isMSDOSlike ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2799 |
module replaceAll:$\ with:$/. |
1533 | 2800 |
directory replaceAll:$\ with:$/. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2801 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2802 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2803 |
"/ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2804 |
"/ check for conflicts (i.e. if such a container already exists) ... |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2805 |
"/ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2806 |
doCheckinWithoutAsking := false. |
1831
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2807 |
"/false ifTrue:[ |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2808 |
"/ (mgr checkForExistingContainer:fileName inModule:module directory:directory) ifTrue:[ |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2809 |
"/ answer := Dialog confirmWithCancel:(resources |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2810 |
"/ string:'About to change the source container. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2811 |
"/ |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2812 |
"/Notice: there is a container for %1 in: |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2813 |
"/ |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2814 |
"/ %2 / %3 / %4 |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2815 |
"/ |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2816 |
"/Do you want to change it or check right into that container ?' |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2817 |
"/ with:className |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2818 |
"/ with:module |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2819 |
"/ with:directory |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2820 |
"/ with:fileName) |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2821 |
"/ labels:(resources array:#('Cancel' 'Check in' 'Change')). |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2822 |
"/ answer isNil ifTrue:[AbortSignal raise]. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2823 |
"/ answer ifTrue:[ |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2824 |
"/ doCheckinWithoutAsking := false. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2825 |
"/ oldModule := module. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2826 |
"/ oldPackage := directory. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2827 |
"/ oldFileName := fileName |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2828 |
"/ ] ifFalse:[ |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2829 |
"/ doCheckinWithoutAsking := true. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2830 |
"/ creatingNew := false. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2831 |
"/ ]. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2832 |
"/ ]. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
2833 |
"/]. |
2688
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2834 |
mgr isContainerBased ifTrue:[ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2835 |
doCheckinWithoutAsking ifFalse:[ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2836 |
"/ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2837 |
"/ open a dialog for this |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2838 |
"/ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2839 |
(mgr checkForExistingContainer:fileName inModule:module directory:directory) ifFalse:[ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2840 |
note := 'Notice: class seems to have no container yet.'. |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2841 |
creatingNew := true. |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2842 |
] ifTrue:[ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2843 |
creatingNew := false. |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2844 |
]. |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2845 |
|
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2846 |
rslt := self |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2847 |
askForContainer:boxText title:title note:note |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2848 |
initialModule:module initialPackage:directory initialFileName:fileName |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2849 |
forNewContainer:true. |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2850 |
|
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2851 |
rslt isNil ifTrue:[ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2852 |
^ false |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2853 |
]. |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2854 |
|
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2855 |
module := rslt at:#module. |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2856 |
directory := rslt at:#package. |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2857 |
fileName := rslt at:#fileName. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2858 |
]. |
2688
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2859 |
(fileName endsWith:',v') ifTrue:[ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2860 |
fileName := fileName copyWithoutLast:2 |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2861 |
]. |
2688
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2862 |
(fileName endsWith:'.st') ifFalse:[ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2863 |
fileName := fileName , '.st' |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2864 |
]. |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
2865 |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2866 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2867 |
|
952
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2868 |
"/ we require the packageID to be <module>:<container-dir> |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2869 |
"/ check for this ... |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2870 |
|
1533 | 2871 |
requiredPackage := ((module ? '') , ':' , (directory ? '')) asSymbol. |
952
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2872 |
requiredPackage ~= aClass package ifTrue:[ |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2873 |
"/ doCheckinWithoutAsking ifFalse:[ |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2874 |
"/ (self confirm:'Change the classes packageID to: ''', requiredPackage , ''' ?') |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2875 |
"/ ifFalse:[ |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2876 |
"/ ^ false |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2877 |
"/ ] |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2878 |
"/ ]. |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1076
diff
changeset
|
2879 |
aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | mthd setPackage:requiredPackage]. |
952
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2880 |
aClass package:requiredPackage. |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2881 |
]. |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
2882 |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2883 |
info := aClass revisionInfo. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2884 |
info notNil ifTrue:[ |
2063 | 2885 |
(info repositoryPathName isNil) ifTrue:[ |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2886 |
info := nil |
2063 | 2887 |
]. |
2888 |
"/ (info includesKey:#repositoryPathName) ifFalse:[ |
|
2889 |
"/ info := nil |
|
2890 |
"/ ] |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2891 |
]. |
2175 | 2892 |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2893 |
info isNil ifTrue:[ |
1004
1bd564960810
dont ask if a version method should be created - just do it.
Claus Gittinger <cg@exept.de>
parents:
1000
diff
changeset
|
2894 |
true "doCheckinWithoutAsking" ifFalse:[ |
979 | 2895 |
answer := Dialog |
2896 |
confirmWithCancel:(resources string:'%1 does not have any (usable) revision info (#version method)\\Shall I create one ?' with:className) withCRs |
|
1076 | 2897 |
labels:(resources array:#( 'Cancel' 'No' 'Yes')). |
979 | 2898 |
answer isNil ifTrue:[^ false]. |
2899 |
] ifTrue:[ |
|
2900 |
answer := true. |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2901 |
]. |
979 | 2902 |
answer ifTrue:[ |
2637 | 2903 |
mgr |
2651 | 2904 |
updateVersionMethodOf:aClass |
2905 |
for:(mgr initialRevisionStringFor:aClass |
|
2906 |
inModule:module |
|
2907 |
directory:directory |
|
2908 |
container:fileName). |
|
979 | 2909 |
]. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2910 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2911 |
|
2691 | 2912 |
(self checkForExistingModule:module usingManager:mgr allowCreate:(createDirs or:[creatingNew])) |
2651 | 2913 |
ifFalse:[^ false]. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2914 |
LastModule := module. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2915 |
|
2691 | 2916 |
(self checkForExistingModule:module directory:directory usingManager:mgr allowCreate:(createDirs or:[creatingNew])) |
2651 | 2917 |
ifFalse:[^ false]. |
1533 | 2918 |
LastPackage := directory. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2919 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2920 |
"/ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2921 |
"/ check for the container itself |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2922 |
"/ |
2651 | 2923 |
(mgr isContainerBased not |
2924 |
or:[ mgr checkForExistingContainer:fileName inModule:module directory:directory ]) ifTrue:[ |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2925 |
"/ (oldModule notNil |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2926 |
"/ and:[(oldModule ~= module) |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2927 |
"/ or:[oldPackage ~= package |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2928 |
"/ or:[oldFileName ~= fileName]]]) |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2929 |
"/ ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2930 |
"/ self warn:(resources string:'no change'). |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2931 |
"/ ^ false. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2932 |
"/ ]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2933 |
|
2651 | 2934 |
mgr isContainerBased ifTrue:[ |
2935 |
creatingNew ifTrue:[ |
|
2936 |
self warn:(resources string:'Container for %1 already exists in %2/%3.' with:fileName with:module with:directory) withCRs. |
|
2937 |
]. |
|
2938 |
||
2939 |
doCheckinWithoutAsking ifFalse:[ |
|
2940 |
(Dialog |
|
2941 |
confirm:(resources string:'check %1 into the existing container |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2942 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2943 |
%2 / %3 / %4 ?' |
2651 | 2944 |
with:className |
2945 |
with:module |
|
2946 |
with:directory |
|
2947 |
with:fileName) withCRs |
|
2948 |
noLabel:'Cancel') |
|
2949 |
ifFalse:[ |
|
2950 |
^ false. |
|
2951 |
]. |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2952 |
]. |
2651 | 2953 |
]. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2954 |
|
2637 | 2955 |
mgr |
2651 | 2956 |
updateVersionMethodOf:aClass |
2957 |
for:('$' , 'Header' , '$'). "/ concatenated to avoid RCS-expansion |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2958 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2959 |
oldFileName notNil ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2960 |
msg := ('forced checkin / source container change from ' , oldFileName). |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2961 |
] ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2962 |
msg := 'defined source container' |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2963 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2964 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2965 |
(forceCheckIn := doCheckinWithoutAsking) ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2966 |
(mgr |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2967 |
checkinClass:aClass |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2968 |
fileName:fileName |
1533 | 2969 |
directory:directory |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2970 |
module:module |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2971 |
logMessage:msg) |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2972 |
ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2973 |
doCheckinWithoutAsking ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2974 |
(Dialog |
1076 | 2975 |
confirm:'No easy merge seems possible; force checkin (no merge) ?' |
2976 |
noLabel:'Cancel') |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2977 |
ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2978 |
^ false. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2979 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2980 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2981 |
forceCheckIn := true. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2982 |
] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2983 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2984 |
forceCheckIn ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2985 |
(mgr |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2986 |
checkinClass:aClass |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2987 |
fileName:fileName |
1533 | 2988 |
directory:directory |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2989 |
module:module |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2990 |
logMessage:msg |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2991 |
force:true) |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2992 |
ifFalse:[ |
1076 | 2993 |
self warn:(resources string:'Failed to check into existing container.'). |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2994 |
^ false. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2995 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2996 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2997 |
^ true |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2998 |
] ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
2999 |
(createContainer or:[creatingNew]) ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3000 |
(Dialog |
1076 | 3001 |
confirm:(resources string:'No container exists for %1 in %2/%3\\create ?' |
1533 | 3002 |
with:fileName with:module with:directory) withCRs |
1076 | 3003 |
noLabel:'Cancel') ifFalse:[ |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3004 |
^ false |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3005 |
] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3006 |
] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3007 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3008 |
|
1882
8b3a4c2a2c2a
when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents:
1879
diff
changeset
|
3009 |
aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | mthd setPackage:requiredPackage]. |
8b3a4c2a2c2a
when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents:
1879
diff
changeset
|
3010 |
aClass package:requiredPackage. |
1913 | 3011 |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3012 |
(mgr |
2651 | 3013 |
createContainerFor:aClass |
3014 |
inModule:module |
|
3015 |
package:directory |
|
3016 |
container:fileName |
|
3017 |
) ifFalse:[ |
|
1076 | 3018 |
self warn:(resources string:'Failed to create container.'). |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3019 |
^ false. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3020 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3021 |
^ true |
1533 | 3022 |
|
2651 | 3023 |
"Created: / 21-12-2011 / 18:34:02 / cg" |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3024 |
! |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3025 |
|
2189 | 3026 |
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest |
3027 |
|classesInImage filesInImage module directory perProjectInfo |
|
3028 |
classesNotInRepository filesNotInImage classesDeletedInRepository |
|
3029 |
classesModifiedInImage classesNotReallyModified classesReallyModified classesModifiedInRepository |
|
3030 |
classesAddedInImage extensionMethods extensionsInImage extensionsInRepository extensionDiffs |
|
3031 |
box doCleanup resources diffSet def autoloadedFilesNotInImage |
|
3032 |
autoloadedClassesInImage autoloadedFilesInImage| |
|
3033 |
||
3034 |
resources := self classResources. |
|
3035 |
||
3036 |
module := aProject asPackageId module. |
|
3037 |
directory := aProject asPackageId directory. |
|
3038 |
||
3039 |
perProjectInfo := SourceCodeManager revisionsInModule:module directory:directory fromDate:aDateOrNilForNewest. |
|
3040 |
perProjectInfo := perProjectInfo ? #(). |
|
3041 |
perProjectInfo := perProjectInfo select:[:info | info key asFilename hasSuffix:'st']. |
|
3042 |
perProjectInfo := Dictionary withAssociations:perProjectInfo. |
|
3043 |
||
3044 |
classesInImage := Smalltalk allClassesInPackage:aProject. |
|
3045 |
autoloadedClassesInImage := classesInImage reject:[:cls | cls isLoaded]. |
|
3046 |
classesInImage := classesInImage select:[:cls | cls isLoaded]. |
|
3047 |
classesInImage := classesInImage reject:[:cls | cls isPrivate]. |
|
3048 |
filesInImage := (classesInImage collect:[:cls | cls classBaseFilename]) asSet. |
|
3049 |
autoloadedFilesInImage := (autoloadedClassesInImage collect:[:cls | cls classBaseFilename]) asSet. |
|
3050 |
"/ any differences ? |
|
3051 |
classesNotInRepository := classesInImage reject:[:cls | (perProjectInfo includesKey:cls classBaseFilename)]. |
|
3052 |
classesDeletedInRepository := classesInImage select:[:cls | (perProjectInfo at:cls classBaseFilename ifAbsent:nil) == #deleted]. |
|
3053 |
perProjectInfo := perProjectInfo reject:[:v | v == #deleted]. |
|
3054 |
filesNotInImage := perProjectInfo keys reject:[:file | (filesInImage includes:file)]. |
|
3055 |
filesNotInImage := filesNotInImage reject:[:file | (autoloadedFilesInImage includes:file)]. |
|
3056 |
filesNotInImage remove:'extensions.st' ifAbsent:[]. |
|
3057 |
||
3058 |
"/ if comparing against the newest, only look for chaged stuff |
|
3059 |
classesModifiedInImage := classesInImage select:[:cls | ChangeSet current includesChangeForClassOrMetaclass:cls]. |
|
3060 |
classesModifiedInImage := classesModifiedInImage \ classesNotInRepository. |
|
3061 |
||
3062 |
classesModifiedInRepository := classesInImage select:[:cls | |v| |
|
3063 |
v := (perProjectInfo at:cls classBaseFilename ifAbsent:nil). |
|
3064 |
v notNil and:[ cls isLoaded and:[ v > cls revision ]]]. |
|
3065 |
||
3066 |
"/ stupid: as we do not have any revision information for extensions (sigh); |
|
3067 |
"/ we must checkout and look at the extension.st contents, to see if it has changed. |
|
3068 |
||
3069 |
extensionMethods := Smalltalk allExtensionsForPackage:aProject. |
|
3070 |
extensionsInImage := ChangeSet forExistingMethods:extensionMethods. |
|
3071 |
||
3072 |
[ |
|
3073 |
|s extensionsRevision| |
|
3074 |
||
3075 |
extensionsRevision := perProjectInfo at:'extensions.st' ifAbsent:#newest. |
|
3076 |
s := SourceCodeManager |
|
3077 |
streamForClass:nil fileName:'extensions.st' revision:extensionsRevision |
|
3078 |
directory:directory module:module cache:true. |
|
3079 |
s isNil ifTrue:[ |
|
3080 |
extensionsInRepository := ChangeSet new. |
|
3081 |
] ifFalse:[ |
|
3082 |
extensionsInRepository := ChangeSet fromStream:s. |
|
3083 |
s close. |
|
3084 |
]. |
|
3085 |
] value. |
|
3086 |
extensionDiffs := extensionsInRepository diffSetsAgainst:extensionsInImage. |
|
3087 |
||
3088 |
diffSet := extensionDiffs copy. |
|
3089 |
||
3090 |
aDateOrNilForNewest isNil ifTrue:[ |
|
3091 |
"/ we could do the same as above for each class. |
|
3092 |
"/ however - as we do have change-info and revision info, we can avoid checking out |
|
3093 |
"/ for all classes which are not changed and which have the same version info. |
|
3094 |
classesModifiedInImage notEmpty ifTrue:[ |
|
3095 |
classesReallyModified := |
|
3096 |
classesModifiedInImage select:[:eachChangedClass | |
|
3097 |
|currentVersion repositoryVersion s stFile diffs| |
|
3098 |
||
3099 |
stFile := eachChangedClass classBaseFilename. |
|
3100 |
s := SourceCodeManager |
|
3101 |
streamForClass:nil fileName:stFile revision:#newest |
|
3102 |
directory:directory module:module cache:true. |
|
3103 |
repositoryVersion := ChangeSet fromStream:s. |
|
3104 |
s close. |
|
3105 |
||
3106 |
currentVersion := ChangeSet forExistingClass:eachChangedClass. |
|
3107 |
diffs := repositoryVersion diffSetsAgainst:currentVersion . |
|
3108 |
diffSet addDiffSet:diffs. |
|
3109 |
diffs notEmpty |
|
3110 |
]. |
|
3111 |
||
3112 |
classesNotReallyModified := classesModifiedInImage \ classesReallyModified. |
|
3113 |
]. |
|
3114 |
] ifFalse:[ |
|
3115 |
classesReallyModified := |
|
3116 |
classesInImage select:[:eachClass | |
|
3117 |
|currentVersion repositoryVersion s stFile stRevision diffs| |
|
3118 |
||
3119 |
stFile := eachClass classBaseFilename. |
|
3120 |
stRevision := perProjectInfo at:stFile ifAbsent:#newest. |
|
3121 |
||
3122 |
s := SourceCodeManager |
|
3123 |
streamForClass:nil fileName:stFile revision:stRevision |
|
3124 |
directory:directory module:module cache:true. |
|
2295
505293d1cfbd
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2294
diff
changeset
|
3125 |
s isNil ifTrue:[ |
505293d1cfbd
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2294
diff
changeset
|
3126 |
repositoryVersion := ChangeSet new. |
505293d1cfbd
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2294
diff
changeset
|
3127 |
] ifFalse:[ |
505293d1cfbd
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2294
diff
changeset
|
3128 |
repositoryVersion := ChangeSet fromStream:s. |
505293d1cfbd
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2294
diff
changeset
|
3129 |
s close. |
505293d1cfbd
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2294
diff
changeset
|
3130 |
]. |
2189 | 3131 |
|
3132 |
currentVersion := ChangeSet forExistingClass:eachClass. |
|
3133 |
diffs := repositoryVersion diffSetsAgainst:currentVersion . |
|
3134 |
diffSet addDiffSet:diffs. |
|
3135 |
diffs notEmpty |
|
3136 |
]. |
|
3137 |
]. |
|
3138 |
||
3139 |
filesNotInImage notEmpty ifTrue:[ |
|
3140 |
"/ first, check if these are autoloaded classes which have NOT been installed |
|
3141 |
"/ (for example, due to a --quick argument during startup) |
|
3142 |
autoloadedFilesNotInImage := OrderedCollection new. |
|
3143 |
||
3144 |
def := ProjectDefinition definitionClassForPackage:aProject createIfAbsent:false projectType:nil. |
|
3145 |
def notNil ifTrue:[ |
|
3146 |
def classNamesAndAttributesDo:[:eachClassname :eachAttributes | |
|
3147 |
|cls eachFileName isAutoload| |
|
3148 |
||
3149 |
cls := Smalltalk classNamed:eachClassname. |
|
3150 |
cls isNil ifTrue:[ |
|
3151 |
isAutoload := eachAttributes includes:#autoload. |
|
3152 |
isAutoload ifTrue:[ |
|
3153 |
eachFileName := Smalltalk fileNameForClass:eachClassname. |
|
3154 |
autoloadedFilesNotInImage add:(eachFileName , '.st') |
|
3155 |
] |
|
3156 |
] |
|
3157 |
]. |
|
3158 |
]. |
|
3159 |
||
3160 |
(filesNotInImage \ autoloadedFilesNotInImage) do:[:eachSTFile | |
|
3161 |
|s chgSet classDefinitions| |
|
3162 |
||
3163 |
s := SourceCodeManager |
|
3164 |
streamForClass:nil fileName:eachSTFile revision:#newest directory:directory module:module cache:true. |
|
3165 |
chgSet := ChangeSet fromStream:s. |
|
3166 |
s close. |
|
3167 |
||
3168 |
diffSet onlyInReceiver addAll:chgSet |
|
3169 |
]. |
|
3170 |
]. |
|
3171 |
||
3172 |
classesModifiedInRepository notEmpty ifTrue:[ |
|
3173 |
classesModifiedInRepository do:[:eachClass| |
|
3174 |
|s diffs repositoryVersion currentVersion| |
|
3175 |
||
3176 |
s := SourceCodeManager |
|
3177 |
streamForClass:eachClass fileName:nil revision:#newest directory:directory module:module cache:true. |
|
3178 |
repositoryVersion := ChangeSet fromStream:s. |
|
3179 |
s close. |
|
3180 |
||
3181 |
currentVersion := ChangeSet forExistingClass:eachClass. |
|
3182 |
diffs := repositoryVersion diffSetsAgainst:currentVersion . |
|
3183 |
diffSet addDiffSet:diffs. |
|
3184 |
]. |
|
3185 |
]. |
|
3186 |
classesDeletedInRepository notEmpty ifTrue:[ |
|
3187 |
"/ self halt. |
|
3188 |
]. |
|
3189 |
classesNotInRepository notEmpty ifTrue:[ |
|
3190 |
"/ if there are no changeSet entries for those classes, they seem to be |
|
3191 |
"/ no longer in the repository (possibly moved ?) |
|
3192 |
"/ If there are entries, these might have been added in the image and need a check-in |
|
3193 |
||
3194 |
classesAddedInImage := classesNotInRepository \ classesDeletedInRepository. |
|
3195 |
classesAddedInImage do:[:eachAddedClass | |
|
3196 |
|currentVersion| |
|
3197 |
||
3198 |
currentVersion := ChangeSet forExistingClass:eachAddedClass. |
|
3199 |
diffSet onlyInArg addAll:currentVersion. |
|
3200 |
]. |
|
3201 |
]. |
|
3202 |
||
3203 |
diffSet isEmpty ifTrue:[ |
|
3204 |
"/ Dialog information:(resources string:'%1 is up-to-date.' with:eachProject allBold). |
|
3205 |
Transcript showCR:('%1 is up-to-date.' bindWith:aProject allBold). |
|
3206 |
(ChangeSet current includesChangeForPackage:aProject) ifTrue:[ |
|
3207 |
(Dialog confirm:('%1 is up-to-date.\\Cleanup ChangeSet ?' bindWith:aProject allBold) withCRs) ifTrue:[ |
|
3208 |
ChangeSet current condenseChangesForPackage:aProject. |
|
3209 |
]. |
|
3210 |
]. |
|
2286
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3211 |
^ diffSet. |
2189 | 3212 |
]. |
3213 |
||
3214 |
"/ as a side-effect, if we find that some classes are modified but the same as in the repository, |
|
3215 |
"/ give user a chance to cleanup the changeSet here. |
|
3216 |
aDateOrNilForNewest isNil ifTrue:[ |
|
3217 |
classesNotReallyModified notEmptyOrNil ifTrue:[ |
|
3218 |
doCleanup := false. |
|
3219 |
box := Dialog |
|
3220 |
forRequestText:(resources |
|
3221 |
stringWithCRs:'The following classes from %1 are equal to the repository version.\\Remove entries from the changeSet ?' |
|
3222 |
with:aProject allBold) |
|
3223 |
editViewClass:ListView |
|
3224 |
lines:10 columns:20 |
|
3225 |
initialAnswer:nil model:nil |
|
3226 |
setupWith: |
|
3227 |
[:v :d | |
|
3228 |
|removeButton| |
|
3229 |
||
3230 |
v list:classesNotReallyModified. |
|
3231 |
removeButton := Button label:(resources string:'Cleanup ChangeSet'). |
|
3232 |
removeButton action:[ doCleanup := true. box okPressed. ]. |
|
3233 |
d addButton:removeButton after:(d okButton). |
|
3234 |
d okButton label:(resources string:'Continue'). |
|
3235 |
d okButton isReturnButton:false. |
|
3236 |
removeButton isReturnButton:true. |
|
3237 |
]. |
|
3238 |
box open. |
|
2286
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3239 |
box accepted ifTrue:[ |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3240 |
doCleanup ifTrue:[ |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3241 |
classesNotReallyModified do:[:class | |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3242 |
ChangeSet current condenseChangesForClass:class. |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3243 |
] |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3244 |
]. |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3245 |
] |
2189 | 3246 |
]. |
3247 |
]. |
|
3248 |
^ diffSet |
|
2286
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3249 |
|
2295
505293d1cfbd
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2294
diff
changeset
|
3250 |
"Modified: / 01-11-2010 / 21:02:52 / cg" |
2189 | 3251 |
! |
3252 |
||
2691 | 3253 |
ensureCorrectVersionMethodsInClass:aClass usingManager:aManager |
2383 | 3254 |
|theMetaclass src newSrc versionMethodName oldVersionMethodName| |
3255 |
||
3256 |
theMetaclass := aClass theMetaclass. |
|
3257 |
versionMethodName := aManager nameOfVersionMethodInClasses. |
|
2442
7ecd9a4248bb
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2426
diff
changeset
|
3258 |
oldVersionMethodName := aClass nameOfOldVersionMethod. |
2383 | 3259 |
|
3260 |
(theMetaclass includesSelector:versionMethodName) ifTrue:[ |
|
2442
7ecd9a4248bb
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2426
diff
changeset
|
3261 |
"/ (theMetaclass includesSelector:oldVersionMethodName) ifTrue:[ |
7ecd9a4248bb
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2426
diff
changeset
|
3262 |
"/ theMetaclass removeSelector:oldVersionMethodName. |
7ecd9a4248bb
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2426
diff
changeset
|
3263 |
"/ ]. |
2383 | 3264 |
"/ ensure that my version method is parsable (contains $'s) |
3265 |
src := (theMetaclass compiledMethodAt:versionMethodName) source. |
|
3266 |
src notNil ifTrue:[ |
|
3267 |
newSrc := aManager ensureDollarsInVersionMethod:src. |
|
3268 |
newSrc ~= src ifTrue:[ |
|
3269 |
theMetaclass compile:newSrc. |
|
3270 |
] |
|
3271 |
]. |
|
3272 |
] ifFalse:[ |
|
3273 |
(theMetaclass includesSelector:oldVersionMethodName) ifTrue:[ |
|
2487
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
3274 |
"/ but make sure, it is a version method for this sourcecodemanager... |
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
3275 |
(theMetaclass methodDictionary keys count:[:sel | sel startsWith:'version']) size == 1 ifTrue:[ |
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
3276 |
src := (theMetaclass compiledMethodAt:oldVersionMethodName) source. |
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
3277 |
(src startsWith:oldVersionMethodName) ifTrue:[ |
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
3278 |
newSrc := versionMethodName |
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
3279 |
, (src copyFrom:(oldVersionMethodName size + 1)) |
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
3280 |
]. |
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
3281 |
theMetaclass compile:newSrc. |
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
3282 |
] |
2383 | 3283 |
]. |
3284 |
]. |
|
2442
7ecd9a4248bb
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2426
diff
changeset
|
3285 |
|
2487
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
3286 |
"Modified: / 20-08-2011 / 14:40:27 / cg" |
2691 | 3287 |
"Created: / 29-12-2011 / 14:33:46 / cg" |
2383 | 3288 |
! |
3289 |
||
3290 |
getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil forClass:aClass valuesInto:aBlock |
|
3291 |
"returns 2 values" |
|
3292 |
||
3293 |
|initialLogMessage checkinInfo logMessage| |
|
3294 |
||
3295 |
"/ heuristics for a useful initial log message... |
|
3296 |
aLogInfoOrNil isNil ifTrue:[ |
|
3297 |
initialLogMessage := (self goodInitialLogMessageForCheckinClassOfClass:aClass) ? ''. |
|
3298 |
"/ initial checkin ? |
|
3299 |
(aClass package isNil or:[aClass revision isNil]) ifTrue:[ |
|
3300 |
initialLogMessage := 'initial checkin\\' withCRs , initialLogMessage |
|
3301 |
]. |
|
3302 |
checkinInfo := self |
|
3303 |
getCheckinInfoFor:aClass name |
|
3304 |
initialAnswer:initialLogMessage. |
|
3305 |
checkinInfo isNil ifTrue:[^ false]. |
|
3306 |
logMessage := checkinInfo logMessage. |
|
3307 |
] ifFalse:[ |
|
3308 |
aLogInfoOrNil isString ifTrue:[ |
|
3309 |
"soon obsolete..." |
|
3310 |
logMessage := aLogInfoOrNil |
|
3311 |
] ifFalse:[ |
|
3312 |
checkinInfo := aLogInfoOrNil. |
|
3313 |
logMessage := checkinInfo logMessage. |
|
3314 |
]. |
|
3315 |
]. |
|
3316 |
logMessage notNil ifTrue:[ |
|
3317 |
logMessage := logMessage asSingleByteStringReplaceInvalidWith:$? |
|
3318 |
]. |
|
3319 |
aBlock value:logMessage value:checkinInfo. |
|
3320 |
^ true |
|
3321 |
! |
|
3322 |
||
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3323 |
removeSourceContainerForClass:aClass |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3324 |
"show container & let user confirm twice." |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3325 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3326 |
^ self removeSourceContainerForClass:aClass confirm:true warn:true |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3327 |
! |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3328 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3329 |
removeSourceContainerForClass:aClass confirm:doConfirm warn:doWarn |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3330 |
"show container & optionally let user confirm twice." |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3331 |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
3332 |
|module directory fileName info mgr resources| |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3333 |
|
1377
0fd99dd003f6
classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents:
1375
diff
changeset
|
3334 |
resources := self classResources. |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3335 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3336 |
aClass isLoaded ifFalse:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3337 |
doWarn ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3338 |
self warn:(resources string:'Please load the class first.'). |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3339 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3340 |
^ false. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3341 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3342 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3343 |
"/ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3344 |
"/ ask the sourceCodeManager if it knows anything about that class |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3345 |
"/ if so, take that as a default. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3346 |
"/ |
1782 | 3347 |
mgr := self sourceCodeManagerFor:aClass. |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3348 |
mgr isNil ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3349 |
^ false |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3350 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3351 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3352 |
info := mgr sourceInfoOfClass:aClass. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3353 |
info notNil ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3354 |
(info includesKey:#module) ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3355 |
module := (info at:#module). |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3356 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3357 |
(info includesKey:#directory) ifTrue:[ |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
3358 |
directory := (info at:#directory). |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3359 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3360 |
fileName := mgr containerFromSourceInfo:info. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3361 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3362 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3363 |
module isNil ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3364 |
doWarn ifTrue:[ |
1423 | 3365 |
self warn:(resources stringWithCRs:'classes module is unknown.\\It seems to not have a container.') . |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3366 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3367 |
^ false. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3368 |
]. |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
3369 |
directory isNil ifTrue:[ |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3370 |
doWarn ifTrue:[ |
1423 | 3371 |
self warn:(resources stringWithCRs:'classes package is unknown.\\It seems to not have a container.') . |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3372 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3373 |
^ false. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3374 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3375 |
fileName isNil ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3376 |
doWarn ifTrue:[ |
1423 | 3377 |
self warn:(resources stringWithCRs:'classes container fileName is unknown.\\It seems to not have a container.') . |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3378 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3379 |
^ false. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3380 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3381 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3382 |
OperatingSystem isMSDOSlike ifTrue:[ |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
3383 |
"cvs expects unix-filenames" |
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
3384 |
module := module copy replaceAll:$\ with:$/. |
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
3385 |
directory := directory copy replaceAll:$\ with:$/. |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3386 |
]. |
1787 | 3387 |
(mgr checkForExistingContainer:fileName inModule:module directory:directory) ifFalse:[ |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3388 |
doWarn ifTrue:[ |
1423 | 3389 |
self warn:(resources stringWithCRs:'Class has no source container.') . |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3390 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3391 |
^ false. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3392 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3393 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3394 |
doConfirm ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3395 |
(Dialog |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3396 |
choose:(resources |
1423 | 3397 |
stringWithCRs:'Please confirm removal of the container for %1: |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3398 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3399 |
container: %2 / %3 / %4 |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3400 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3401 |
Really remove ?' |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3402 |
with:aClass name |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3403 |
with:module |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
3404 |
with:directory |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3405 |
with:fileName) |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3406 |
labels:(Array |
1129 | 3407 |
with:(resources string:'No') |
3408 |
with:(resources string:'Remove')) |
|
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3409 |
values:#(false true) |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3410 |
default:false) ifFalse:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3411 |
^ false. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3412 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3413 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3414 |
|
1921
ab2e300fbc9c
oops - removeContainer for class got corrupted
Claus Gittinger <cg@exept.de>
parents:
1919
diff
changeset
|
3415 |
(mgr removeContainer:fileName |
ab2e300fbc9c
oops - removeContainer for class got corrupted
Claus Gittinger <cg@exept.de>
parents:
1919
diff
changeset
|
3416 |
inModule:module |
ab2e300fbc9c
oops - removeContainer for class got corrupted
Claus Gittinger <cg@exept.de>
parents:
1919
diff
changeset
|
3417 |
directory:directory) ifFalse:[ |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3418 |
doWarn ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3419 |
self warn:(resources string:'failed to remove container.'). |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3420 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3421 |
^ true. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3422 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
3423 |
^ false |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
3424 |
|
1921
ab2e300fbc9c
oops - removeContainer for class got corrupted
Claus Gittinger <cg@exept.de>
parents:
1919
diff
changeset
|
3425 |
"Modified: / 05-12-2006 / 18:40:16 / cg" |
1000 | 3426 |
! |
3427 |
||
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3428 |
repositoryLogOf:aClass onto:aStream |
2050
037e794f5857
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3429 |
self repositoryLogOf:aClass short:false onto:aStream |
037e794f5857
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3430 |
! |
037e794f5857
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3431 |
|
037e794f5857
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3432 |
repositoryLogOf:aClass short:shortOrNot onto:aStream |
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3433 |
|info rv mgr info2 module fn msg s| |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3434 |
|
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3435 |
info := aClass revisionInfo. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3436 |
|
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3437 |
rv := aClass binaryRevision. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3438 |
rv notNil ifTrue:[ |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3439 |
aStream nextPutLine:'**** Loaded classes binary information ****'; cr. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3440 |
aStream nextPutLine:' Binary based upon : ' , rv. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3441 |
aStream cr. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3442 |
]. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3443 |
|
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3444 |
info notNil ifTrue:[ |
2041 | 3445 |
(info revision notNil) ifFalse:[ |
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3446 |
aStream nextPutLine:'WARNING:'; cr. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3447 |
aStream nextPutLine:' The class seems not to be loaded from the repository.'. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3448 |
aStream nextPutLine:' Check carefully before checking anything in.'. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3449 |
aStream nextPutLine:' (i.e. compare with repository for renamed class(es), same-name but unrelated etc.)'. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3450 |
aStream cr. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3451 |
]. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3452 |
|
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3453 |
aStream nextPutLine:'**** Classes source information ****'; cr. |
2042 | 3454 |
s := info repositoryPathName. |
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3455 |
s notNil ifTrue:[ |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3456 |
aStream nextPutLine:' Source repository : ' , s |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3457 |
]. |
2042 | 3458 |
aStream nextPutLine:' Filename ........ : ' , (info fileName ? '?'). |
3459 |
aStream nextPutLine:' Revision ........ : ' , (info revision ? '?'). |
|
3460 |
aStream nextPutLine:' Checkin date .... : ' , (info date ? '?') , ' ' , |
|
3461 |
(info time ? '?'), ' ', |
|
3462 |
(info timezone ? ''). |
|
3463 |
aStream nextPutLine:' Checkin user .... : ' , (info user ? '?'). |
|
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3464 |
|
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3465 |
(info2 := aClass packageSourceCodeInfo) notNil ifTrue:[ |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3466 |
aStream nextPutLine:' Repository: ..... : ' , (info2 at:#module ifAbsent:'?'). |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3467 |
aStream nextPutLine:' Directory: ...... : ' , (info2 at:#directory ifAbsent:'?'). |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3468 |
]. |
2042 | 3469 |
aStream nextPutLine:' Container ....... : ' , (info repositoryPathName ? '?'). |
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3470 |
aStream cr. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3471 |
|
1782 | 3472 |
mgr := self sourceCodeManagerFor:aClass. |
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3473 |
mgr notNil ifTrue:[ |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3474 |
aStream nextPutLine:'**** Repository information ****'; cr. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3475 |
|
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3476 |
module := info2 at:#module ifAbsent:nil. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3477 |
module notNil ifTrue:[ |
2596 | 3478 |
aStream nextPutLine:(' Repository URL ......: ' , |
3479 |
((mgr repositoryNameForPackage:aClass package) ifNil:[mgr repositoryName , ' (default)'])). |
|
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3480 |
]. |
2050
037e794f5857
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
3481 |
mgr writeRevisionLogOf:aClass short:shortOrNot to:aStream. |
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3482 |
] |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3483 |
] ifFalse:[ |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3484 |
aStream nextPutLine:'No revision info found'. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3485 |
aClass isLoaded ifFalse:[ |
1835 | 3486 |
aStream cr; nextPutAll:'This is an autoloaded class - you may see more after it is loaded.' |
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3487 |
] ifTrue:[ |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3488 |
fn := aClass classFilename. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3489 |
aClass wasAutoloaded ifTrue:[ |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3490 |
msg := 'This class was autoloaded.'. |
1514 | 3491 |
msg := msg , ' (from ''' , fn , ''')'. |
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3492 |
] ifFalse:[ |
1514 | 3493 |
msg := 'This class was loaded from ''' , fn , '''.' |
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3494 |
]. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3495 |
msg notNil ifTrue:[ |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3496 |
aStream cr; nextPutAll:msg. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3497 |
] |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3498 |
] |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3499 |
] |
1782 | 3500 |
|
1835 | 3501 |
"Modified: / 06-10-2006 / 13:25:22 / cg" |
2596 | 3502 |
"Modified: / 12-10-2011 / 18:06:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1726 | 3503 |
! |
3504 |
||
3505 |
tagClass:aClass as:tag |
|
3506 |
|mgr| |
|
3507 |
||
3508 |
mgr := self sourceCodeManagerFor:aClass. |
|
1782 | 3509 |
mgr |
3510 |
setSymbolicName:tag |
|
3511 |
revision:nil |
|
3512 |
overWrite:true |
|
3513 |
class:aClass. |
|
3514 |
||
3515 |
"Modified: / 12-09-2006 / 13:03:59 / cg" |
|
3516 |
! |
|
3517 |
||
3518 |
tagClasses:aCollectionOfClasses as:tag |
|
3519 |
|classesPerManager| |
|
3520 |
||
3521 |
classesPerManager := Dictionary new. |
|
3522 |
aCollectionOfClasses |
|
3523 |
do:[:eachClass | |
|
3524 |
|manager| |
|
3525 |
||
3526 |
manager := self sourceCodeManagerFor:eachClass. |
|
3527 |
(classesPerManager at:manager ifAbsentPut:[Set new]) add:eachClass |
|
3528 |
]. |
|
3529 |
||
3530 |
classesPerManager keysAndValuesDo:[:manager :classesPerManager| |
|
3531 |
manager |
|
3532 |
setSymbolicName:tag |
|
3533 |
revision:nil |
|
3534 |
overWrite:true |
|
3535 |
classes:classesPerManager. |
|
3536 |
]. |
|
1726 | 3537 |
^ true |
1782 | 3538 |
|
3539 |
"Created: / 12-09-2006 / 13:04:29 / cg" |
|
1726 | 3540 |
! |
3541 |
||
2602 | 3542 |
tagPackage: package as:tag |
3543 |
||
3544 |
self tagClasses:(Smalltalk allClassesInPackage:package) as:tag. |
|
3545 |
||
3546 |
"Created: / 12-09-2006 / 13:04:29 / cg" |
|
3547 |
"Created: / 15-10-2011 / 22:47:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3548 |
! |
|
3549 |
||
2691 | 3550 |
tagPath:aPath as:tag usingManager:aManager |
1782 | 3551 |
aManager |
3552 |
setSymbolicName:tag |
|
1726 | 3553 |
revision:nil |
3554 |
overWrite:true |
|
3555 |
path:aPath. |
|
1782 | 3556 |
|
3557 |
"Modified: / 12-09-2006 / 12:04:44 / cg" |
|
2691 | 3558 |
"Created: / 29-12-2011 / 14:32:38 / cg" |
1375 | 3559 |
! ! |
3560 |
||
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
3561 |
!SourceCodeManagerUtilities methodsFor:'utilities-cvs-helpers'! |
1375 | 3562 |
|
3563 |
getMethodVersionsOfClass:aClass selector:selector numberOfRevisions:numberOfRevisionsOrNil |
|
3564 |
"check-out all previous versions of aClass and retrieve the history of selector. |
|
3565 |
Return a dictionary associating revision with a changeList entries for that method. |
|
3566 |
Unfinished - need a GUI for that." |
|
3567 |
||
3568 |
|mgr theClass revisionLog revisions items s entriesPerRevision previousVersion| |
|
3569 |
||
3570 |
theClass := aClass theNonMetaclass. |
|
3571 |
||
3572 |
mgr := self sourceCodeManagerFor:theClass. |
|
3573 |
mgr isNil ifTrue:[ |
|
3574 |
self error:'no sourceCodeManager'. |
|
3575 |
]. |
|
3576 |
||
3577 |
revisionLog := mgr |
|
3578 |
revisionLogOf:theClass |
|
3579 |
numberOfRevisions:numberOfRevisionsOrNil. |
|
3580 |
||
3581 |
revisions := revisionLog at:#revisions. |
|
3582 |
items := revisions collect:[:each | |rev date who| |
|
3583 |
rev := each at:#revision. |
|
3584 |
date := each at:#date. |
|
3585 |
who := each at:#author. |
|
3586 |
rev allBold , ' [' , date , ' by ' , who , ']' |
|
3587 |
]. |
|
3588 |
||
3589 |
revisions := revisions collect:[:each | each at:#revision]. |
|
3590 |
revisions addFirst:#current. |
|
3591 |
entriesPerRevision := Dictionary new. |
|
3592 |
||
3593 |
previousVersion := nil. |
|
3594 |
revisions reverseDo:[:eachRevision | |
|
3595 |
|srcStream entries thisVersion| |
|
3596 |
||
3597 |
eachRevision == #current ifTrue:[ |
|
3598 |
s := '' writeStream. |
|
3599 |
theClass fileOutOn:s withTimeStamp:false. |
|
3600 |
srcStream := s contents readStream. |
|
3601 |
] ifFalse:[ |
|
3602 |
self activityNotification:('checking out revision ' , eachRevision , '...'). |
|
3603 |
srcStream := mgr getSourceStreamFor:theClass revision:eachRevision. |
|
3604 |
]. |
|
3605 |
||
3606 |
entries := ChangeSet fromStream:srcStream. |
|
3607 |
srcStream close. |
|
3608 |
||
3609 |
"/ remove all definitions |
|
3610 |
entries := entries select:[:each | each isMethodChange]. |
|
3611 |
"/ remove all methods which are for other selectors |
|
3612 |
entries := entries select:[:each | each selector == selector]. |
|
3613 |
"/ remove all methods which are for private subclasses |
|
3614 |
entries := entries select:[:each | each className = aClass name]. |
|
3615 |
||
3616 |
entries size == 1 ifTrue:[ |
|
3617 |
"/ the method is there |
|
3618 |
thisVersion := entries first. |
|
3619 |
(previousVersion notNil and:[previousVersion sameAs:thisVersion]) ifTrue:[ |
|
3620 |
"/ no change |
|
3621 |
] ifFalse:[ |
|
3622 |
entriesPerRevision at:eachRevision put:thisVersion. |
|
3623 |
]. |
|
3624 |
] ifFalse:[ |
|
3625 |
"/ the method is not there |
|
3626 |
]. |
|
3627 |
previousVersion := thisVersion. |
|
3628 |
]. |
|
3629 |
self error:'unfinished code'. |
|
3630 |
||
3631 |
" |
|
3632 |
self getMethodVersionsOfClass:MenuPanel selector:#'helpTextForItem:' numberOfRevisions:20 |
|
3633 |
self getMethodVersionsOfClass:NewLauncher class selector:#'menu' numberOfRevisions:20 |
|
3634 |
" |
|
3635 |
! ! |
|
3636 |
||
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
3637 |
!SourceCodeManagerUtilities methodsFor:'utilities-cvs-user interaction'! |
1375 | 3638 |
|
3639 |
askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName |
|
3640 |
"open a dialog asking for a source container; |
|
3641 |
return a dictionary containing module, package and filename, |
|
3642 |
or nil if canceled." |
|
3643 |
||
3644 |
^ self |
|
3645 |
askForContainer:boxText title:title note:notice |
|
3646 |
initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName |
|
3647 |
forNewContainer:true |
|
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3648 |
! |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
3649 |
|
1375 | 3650 |
askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName forNewContainer:forNewContainer |
3651 |
"open a dialog asking for a source container; |
|
3652 |
return a dictionary containing module, package and filename, |
|
3653 |
or nil if canceled." |
|
3654 |
||
3655 |
|box y component resources answer |
|
3656 |
moduleHolder packageHolder fileNameHolder |
|
3657 |
module package fileName |
|
3658 |
knownContainers knownPackages packageUpdater |
|
3659 |
packageBoxComponent fileNameBoxComponent fileNameUpdater| |
|
3660 |
||
3661 |
knownContainers := Set new. |
|
3662 |
Smalltalk allClassesDo:[:cls | |pckg| |
|
3663 |
pckg := cls package. |
|
3664 |
pckg size > 0 ifTrue:[ |
|
3665 |
knownContainers add:(pckg upTo:$:) |
|
3666 |
] |
|
3667 |
]. |
|
3668 |
knownContainers := knownContainers asOrderedCollection. |
|
3669 |
knownContainers := knownContainers select:[:module | module isBlank not]. |
|
3670 |
knownContainers sort. |
|
3671 |
||
3672 |
packageUpdater := [ |
|
3673 |
|theModulePrefix| |
|
3674 |
||
3675 |
theModulePrefix := moduleHolder value , ':'. |
|
3676 |
||
3677 |
Cursor wait showWhile:[ |
|
3678 |
knownPackages := Set new. |
|
3679 |
Smalltalk allClassesDo:[:cls | |pckg idx| |
|
3680 |
pckg := cls package. |
|
3681 |
pckg size > 0 ifTrue:[ |
|
3682 |
(pckg startsWith:theModulePrefix) ifTrue:[ |
|
3683 |
idx := pckg indexOf:$:. |
|
3684 |
knownPackages add:(pckg copyFrom:idx + 1) |
|
3685 |
] |
|
3686 |
] |
|
3687 |
]. |
|
3688 |
knownPackages := knownPackages asOrderedCollection. |
|
3689 |
knownPackages := knownPackages select:[:package | package isBlank not]. |
|
3690 |
knownPackages sort. |
|
3691 |
packageBoxComponent list:knownPackages. |
|
3692 |
]. |
|
3693 |
]. |
|
3694 |
||
3695 |
fileNameUpdater := [ |
|
3696 |
|module package files| |
|
3697 |
||
3698 |
Cursor read showWhile:[ |
|
2209
e3a4510c45f2
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
2200
diff
changeset
|
3699 |
module := moduleHolder value ? (PackageId noProjectID). |
e3a4510c45f2
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
2200
diff
changeset
|
3700 |
package := packageHolder value ? (PackageId noProjectID). |
1375 | 3701 |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
3702 |
files := SourceCodeManager getExistingContainersInModule:module directory:package. |
1375 | 3703 |
files := files asOrderedCollection. |
3704 |
files := files select:[:eachFile | eachFile asFilename hasSuffix:'st']. |
|
3705 |
files sort. |
|
3706 |
fileNameBoxComponent list:files. |
|
3707 |
]. |
|
3708 |
]. |
|
3709 |
||
3710 |
moduleHolder := initialModule asValue. |
|
3711 |
packageHolder := initialPackage asValue. |
|
3712 |
fileNameHolder := initialFileName asValue. |
|
3713 |
||
1377
0fd99dd003f6
classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents:
1375
diff
changeset
|
3714 |
resources := self classResources. |
1375 | 3715 |
|
3716 |
"/ |
|
3717 |
"/ open a dialog for this |
|
3718 |
"/ |
|
3719 |
box := DialogBox new. |
|
3720 |
box label:title. |
|
3721 |
||
3722 |
component := box addTextLabel:boxText withCRs. |
|
3723 |
component adjust:#left; borderWidth:0. |
|
3724 |
box addVerticalSpace. |
|
3725 |
box addVerticalSpace. |
|
1000 | 3726 |
|
1375 | 3727 |
y := box yPosition. |
3728 |
component := box addTextLabel:(resources string:'Module:'). |
|
3729 |
component width:0.4; adjust:#right. |
|
3730 |
box yPosition:y. |
|
3731 |
component := box addComboBoxOn:moduleHolder tabable:true. |
|
3732 |
component list:knownContainers. |
|
3733 |
||
3734 |
"/ component := box addInputFieldOn:moduleHolder tabable:true. |
|
3735 |
component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
3736 |
||
3737 |
box addVerticalSpace. |
|
3738 |
y := box yPosition. |
|
3739 |
component := box addTextLabel:(resources string:'Package:'). |
|
3740 |
component width:0.4; adjust:#right. |
|
3741 |
box yPosition:y. |
|
3742 |
packageBoxComponent := component := box addComboBoxOn:packageHolder tabable:true. |
|
3743 |
"/ component := box addInputFieldOn:packageHolder tabable:true. |
|
3744 |
component width:0.6; left:0.4; "immediateAccept:true; "acceptOnLeave:true; cursorMovementWhenUpdating:#beginOfLine. |
|
3745 |
packageUpdater value. |
|
3746 |
moduleHolder onChangeEvaluate:packageUpdater. |
|
3747 |
||
3748 |
box addVerticalSpace. |
|
3749 |
y := box yPosition. |
|
3750 |
component := box addTextLabel:(resources string:'Filename:'). |
|
3751 |
component width:0.4; adjust:#right. |
|
3752 |
box yPosition:y. |
|
3753 |
||
3754 |
forNewContainer ifTrue:[ |
|
3755 |
component := box addInputFieldOn:fileNameHolder tabable:true. |
|
3756 |
component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
3757 |
] ifFalse:[ |
|
3758 |
fileNameBoxComponent := component := box addComboBoxOn:fileNameHolder tabable:true. |
|
3759 |
component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
3760 |
fileNameUpdater value. |
|
3761 |
packageHolder onChangeEvaluate:fileNameUpdater. |
|
3762 |
]. |
|
3763 |
||
3764 |
box addVerticalSpace. |
|
3765 |
||
3766 |
notice notNil ifTrue:[ |
|
3767 |
component := box addTextLabel:notice. |
|
3768 |
component adjust:#left; borderWidth:0. |
|
3769 |
]. |
|
3770 |
||
3771 |
box addVerticalSpace. |
|
3772 |
box addAbortAndOkButtons. |
|
3773 |
||
3774 |
(YesToAllNotification notNil and:[YesToAllNotification isHandled]) ifTrue:[ |
|
3775 |
component := Button label:'Yes to all'. |
|
3776 |
component action:[ |
|
3777 |
YesToAllNotification queryWith:true. |
|
3778 |
box doAccept. |
|
2253
7d7b0d2d1fe7
changed: #askForContainer:title:note:initialModule:initialPackage:initialFileName:forNewContainer:
Claus Gittinger <cg@exept.de>
parents:
2242
diff
changeset
|
3779 |
box okPressed. |
1375 | 3780 |
]. |
3781 |
(DialogBox defaultOKButtonAtLeft) ifTrue:[ |
|
3782 |
box addButton:component after:nil. |
|
3783 |
] ifFalse:[ |
|
3784 |
box addButton:component before:nil. |
|
3785 |
]. |
|
3786 |
]. |
|
3787 |
(AbortAllSignal isHandled) ifTrue:[ |
|
3788 |
component := Button label:'Cancel all'. |
|
3789 |
component action:[ |
|
3790 |
box hide. |
|
3791 |
AbortAllSignal raiseSignal. |
|
3792 |
]. |
|
3793 |
(DialogBox defaultOKButtonAtLeft) ifTrue:[ |
|
3794 |
box addButton:component before:nil. |
|
3795 |
] ifFalse:[ |
|
3796 |
box addButton:component after:nil. |
|
3797 |
]. |
|
3798 |
]. |
|
3799 |
||
3800 |
(YesToAllQuery notNil and:[YesToAllQuery isHandled]) ifTrue:[ |
|
3801 |
answer := YesToAllQuery query. |
|
3802 |
]. |
|
3803 |
||
3804 |
answer isNil ifTrue:[ |
|
3805 |
box showAtPointer. |
|
3806 |
answer := box accepted |
|
3807 |
]. |
|
3808 |
||
3809 |
box destroy. |
|
3810 |
answer ifFalse:[ |
|
3811 |
^ nil |
|
3812 |
]. |
|
1000 | 3813 |
|
1375 | 3814 |
module := moduleHolder value withoutSpaces. |
3815 |
package := packageHolder value withoutSpaces. |
|
3816 |
fileName := fileNameHolder value withoutSpaces. |
|
3817 |
^ Dictionary new |
|
3818 |
at:#module put:module; |
|
3819 |
at:#package put:package; |
|
3820 |
at:#fileName put:fileName; |
|
3821 |
yourself |
|
3822 |
||
3823 |
" |
|
3824 |
self |
|
3825 |
askForContainer:'enter container' title:'container' note:'some note' |
|
3826 |
initialModule:'foo' initialPackage:'bar' initialFileName:'baz' |
|
3827 |
" |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
3828 |
|
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
3829 |
"Modified: / 23-08-2006 / 14:13:04 / cg" |
1375 | 3830 |
! |
3831 |
||
2570 | 3832 |
askForExistingRevision:boxText title:title class:aClass |
3833 |
"open a dialog asking for a containers revision; |
|
3834 |
return a revision number, or nil if canceled." |
|
3835 |
||
3836 |
|mgr sourceInfo module package fileName| |
|
3837 |
||
3838 |
mgr := self sourceCodeManagerFor:aClass. |
|
3839 |
sourceInfo := mgr sourceInfoOfClass:aClass. |
|
3840 |
sourceInfo isNil ifTrue:[^ nil]. |
|
3841 |
||
3842 |
package := mgr directoryFromSourceInfo:sourceInfo. |
|
3843 |
module := mgr moduleFromSourceInfo:sourceInfo. |
|
3844 |
fileName := mgr containerFromSourceInfo:sourceInfo. |
|
3845 |
^ self |
|
3846 |
askForExistingRevision:boxText |
|
3847 |
title:title |
|
3848 |
class:aClass |
|
3849 |
manager:mgr |
|
3850 |
module:module package:package |
|
3851 |
fileName:fileName |
|
3852 |
||
3853 |
" |
|
3854 |
SourceCodeManagerUtilities |
|
3855 |
askForRevisionToCompare:'enter revision' |
|
3856 |
title:'revision' |
|
3857 |
class:Array |
|
3858 |
" |
|
3859 |
||
3860 |
"Modified: / 12-09-2006 / 14:17:04 / cg" |
|
3861 |
! |
|
3862 |
||
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
3863 |
askForExistingRevision:boxText title:title class:clsOrNil manager:aSourceCodeManager module:module package:directory fileName:fileName |
1375 | 3864 |
"open a dialog asking for a containers revision; |
3865 |
return a revision number, or nil if canceled." |
|
3866 |
||
3867 |
|partialLog revisions items newestRev |
|
3868 |
box y component resources |
|
2325 | 3869 |
revisionHolder symbolicNames stableRevision releasedRevision |
3870 |
tagHolder tagList lockChange| |
|
3871 |
||
3872 |
resources := self classResources. |
|
1375 | 3873 |
|
3874 |
partialLog := aSourceCodeManager |
|
3875 |
revisionLogOf:clsOrNil |
|
3876 |
numberOfRevisions:20 |
|
3877 |
fileName:fileName |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
3878 |
directory:directory |
1375 | 3879 |
module:module. |
1522 | 3880 |
|
1375 | 3881 |
partialLog notNil ifTrue:[ |
3882 |
newestRev := partialLog at:#newestRevision. |
|
3883 |
revisions := partialLog at:#revisions. |
|
1456
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3884 |
symbolicNames := partialLog at:#symbolicNames ifAbsent:[]. |
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3885 |
symbolicNames notNil ifTrue:[ |
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3886 |
stableRevision := symbolicNames at:'stable' ifAbsent:[]. |
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3887 |
releasedRevision := symbolicNames at:'released' ifAbsent:[]. |
2326
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
3888 |
tagList := ((symbolicNames associations sort:[:a :b | self versionString:(a value) isLessThan:(b value)]) |
2325 | 3889 |
collect:[:assoc | assoc key]) reverse. |
1456
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3890 |
]. |
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3891 |
|
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3892 |
items := revisions collect:[:each | |rev date who flag| |
1375 | 3893 |
rev := each at:#revision. |
2670 | 3894 |
date := (each at:#date ifAbsent:nil) ? '?'. |
3895 |
who := (each at:#author ifAbsent:nil) ? '?'. |
|
1456
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3896 |
rev = stableRevision ifTrue:[ |
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3897 |
flag := ' Stable' allBold. |
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3898 |
] ifFalse:[rev = releasedRevision ifTrue:[ |
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3899 |
flag := ' Released' allBold. |
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3900 |
] ifFalse:[ |
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3901 |
flag := ' ' |
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3902 |
]]. |
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
3903 |
rev allBold , flag, ' [' , date , ' by ' , who , ']' |
1375 | 3904 |
]. |
3905 |
revisions := revisions collect:[:each | each at:#revision]. |
|
3906 |
] ifFalse:[ |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
3907 |
newestRev := aSourceCodeManager newestRevisionInFile:fileName directory:directory module:module. |
1375 | 3908 |
revisions := items := nil. |
3909 |
||
3910 |
newestRev isNil ifTrue:[ |
|
1787 | 3911 |
(aSourceCodeManager checkForExistingContainer:fileName inModule:module directory:directory) |
1375 | 3912 |
ifFalse:[ |
3913 |
self warn:'Could not find/access the container for ',fileName,' in the repository. |
|
3914 |
This could be due to: |
|
3915 |
- invalid/wrong CVS-Root setting |
|
3916 |
- missing CVS access rights |
|
3917 |
(no access / not logged in) |
|
3918 |
- changed CVSRoot after compilation |
|
3919 |
(i.e. wrong CVS-path in classes version method) |
|
3920 |
'. |
|
3921 |
^ nil |
|
3922 |
] |
|
3923 |
] |
|
3924 |
]. |
|
2325 | 3925 |
|
3926 |
lockChange := false. |
|
3927 |
revisionHolder := newestRev asValue. |
|
1375 | 3928 |
revisionHolder onChangeEvaluate:[ |
3929 |
"/ cut off everything after revision |
|
2325 | 3930 |
|s first words tag| |
1375 | 3931 |
|
3932 |
s := revisionHolder value. |
|
3933 |
words := s asCollectionOfWords. |
|
3934 |
words size > 0 ifTrue:[ |
|
3935 |
first := words first string. |
|
3936 |
first ~= s ifTrue:[ |
|
3937 |
revisionHolder value:first |
|
3938 |
] |
|
2325 | 3939 |
]. |
3940 |
lockChange ifFalse:[ |
|
3941 |
tagHolder value:'' |
|
3942 |
]. |
|
1375 | 3943 |
]. |
3944 |
||
2325 | 3945 |
tagHolder := '' asValue. |
3946 |
tagHolder |
|
3947 |
onChangeEvaluate:[ |
|
3948 |
|tag rev| |
|
3949 |
||
3950 |
(tag := tagHolder value) notEmptyOrNil ifTrue:[ |
|
3951 |
rev := symbolicNames at:tag. |
|
3952 |
rev ~= revisionHolder value ifTrue:[ |
|
3953 |
lockChange := true. |
|
3954 |
revisionHolder value:rev. |
|
3955 |
lockChange := false. |
|
3956 |
]. |
|
3957 |
] |
|
3958 |
]. |
|
3959 |
||
1375 | 3960 |
"/ |
3961 |
"/ open a dialog for this |
|
3962 |
"/ |
|
3963 |
box := DialogBox new. |
|
3964 |
box label:title. |
|
3965 |
||
3966 |
component := box addTextLabel:boxText withCRs. |
|
3967 |
component adjust:#left; borderWidth:0. |
|
3968 |
box addVerticalSpace. |
|
3969 |
box addVerticalSpace. |
|
3970 |
||
3971 |
y := box yPosition. |
|
3972 |
component := box addTextLabel:(resources string:'Revision:'). |
|
3973 |
component width:0.4; adjust:#right. |
|
3974 |
box yPosition:y. |
|
3975 |
component := box addComboBoxOn:revisionHolder tabable:true. |
|
3976 |
component list:items. |
|
3977 |
component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
3978 |
||
2325 | 3979 |
y := box yPosition. |
3980 |
component := box addTextLabel:(resources string:'or Tag:'). |
|
3981 |
component width:0.4; adjust:#right. |
|
3982 |
box yPosition:y. |
|
3983 |
component := box addComboListOn:tagHolder tabable:true. |
|
3984 |
component list:tagList. |
|
3985 |
component width:0.6; left:0.4. |
|
3986 |
tagList isNil ifTrue:[ |
|
3987 |
component disable |
|
3988 |
]. |
|
3989 |
||
1375 | 3990 |
box addVerticalSpace. |
3991 |
||
3992 |
box addAbortAndOkButtons. |
|
3993 |
||
2325 | 3994 |
AbortAllOperationWantedQuery query ifTrue:[ |
1375 | 3995 |
(box addAbortButtonLabelled:'Cancel all') action:[AbortAllSignal raise]. |
3996 |
]. |
|
3997 |
||
3998 |
box showAtPointer. |
|
3999 |
||
4000 |
box accepted ifFalse:[ |
|
4001 |
box destroy. |
|
4002 |
^ nil |
|
4003 |
]. |
|
4004 |
box destroy. |
|
4005 |
||
4006 |
^ revisionHolder value withoutSpaces. |
|
4007 |
||
4008 |
" |
|
4009 |
SourceCodeManagerUtilities |
|
4010 |
askForRevisionToCompare:'enter revision' |
|
4011 |
title:'revision' |
|
4012 |
class:nil |
|
4013 |
manager:SourceCodeManager |
|
4014 |
module:'stx' |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
4015 |
directory:'libbasic' |
1375 | 4016 |
fileName:'Array.st' |
4017 |
" |
|
1522 | 4018 |
|
2670 | 4019 |
"Modified: / 21-12-2011 / 23:09:26 / cg" |
1375 | 4020 |
! |
4021 |
||
1426 | 4022 |
checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder |
1375 | 4023 |
"check if a class contains message-sends to: |
2237
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4024 |
#halt , #halt: |
1375 | 4025 |
#error |
2237
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4026 |
#todo , #todo: |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4027 |
(and maybe more in the future) |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4028 |
|
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4029 |
Only checks in non-extension methods - as this is only called when checking " |
1375 | 4030 |
|
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4031 |
|badStuff whatIsBad msg answer labels values defaultAnswer dontShowAgain |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4032 |
methodsWithBadStuff resources| |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4033 |
|
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4034 |
resources := Dialog classResources. |
1375 | 4035 |
|
4036 |
badStuff := #( |
|
2237
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4037 |
( halt 'send of #halt (use for debugging only) - better use #error:''some message'' or #breakPoint:') |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4038 |
( halt: 'send of #halt: (use for debugging only) - better use #error: or #breakPoint:') |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4039 |
( error 'send of #error without descriptive message - better use #error:''some message''' ) |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4040 |
( todo 'send of #todo - unfinished code present?' ) |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4041 |
( todo: 'send of #todo:- unfinished code present?' ) |
1375 | 4042 |
). |
4043 |
||
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4044 |
methodsWithBadStuff := Set new. |
1375 | 4045 |
whatIsBad := Set new. |
4046 |
aClass theNonMetaclass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
|
2237
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4047 |
|setOfLiterals setOfSentMessages| |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4048 |
|
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4049 |
mthd package = aClass package ifTrue:[ |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4050 |
setOfLiterals := mthd literals. "/ try without parsing first. |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4051 |
(badStuff contains:[:eachEntry | setOfLiterals includes:eachEntry first]) ifTrue:[ |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4052 |
setOfSentMessages := mthd messagesSent. |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4053 |
badStuff do:[:eachEntry | |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4054 |
(setOfSentMessages includes:eachEntry first) ifTrue:[ |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4055 |
whatIsBad add:eachEntry second. |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4056 |
methodsWithBadStuff add:mthd. |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4057 |
] |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
4058 |
]. |
1000 | 4059 |
]. |
4060 |
]. |
|
1375 | 4061 |
]. |
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4062 |
whatIsBad isEmpty ifTrue:[^ true]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4063 |
|
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4064 |
(YesToAllQuery notNil and:[YesToAllQuery isHandled]) ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4065 |
answer := YesToAllQuery query. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4066 |
answer notNil ifTrue:[ ^ answer ]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4067 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4068 |
|
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4069 |
msg := resources string:'%1 contains the following (considered bad style) message sends:' with:aClass name. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4070 |
msg := msg , '\\'. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4071 |
whatIsBad do:[:each | |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4072 |
msg := msg , ' ' , each , '\' |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4073 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4074 |
msg := msg , '\'. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4075 |
methodsWithBadStuff size == 1 ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4076 |
msg := msg , (resources string:'In %1.' |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4077 |
with:methodsWithBadStuff anElement whoString allBold). |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4078 |
] ifFalse:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4079 |
msg := msg , (resources string:'In %1 and %2 other methods.' |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4080 |
with:methodsWithBadStuff anElement whoString allBold |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4081 |
with:methodsWithBadStuff size-1). |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4082 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4083 |
msg := msg , '\\' , (resources string:'Do you really want to checkIn the %1 class ?' with:aClass name). |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4084 |
|
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4085 |
(YesToAllNotification notNil and:[YesToAllNotification isHandled]) ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4086 |
labels := #('Cancel All' 'Cancel' 'No to All' 'No' 'No, Browse' 'Yes to All' 'Yes') "#('Yes' 'Yes to All' 'No' 'No to All' 'Cancel')". |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4087 |
values := #(#cancelAll nil #noToAll #noBrowse false #yesToAll true) "#(true #yesToAll false #noToAll nil)". |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4088 |
defaultAnswer := #yesToAll. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4089 |
] ifFalse:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4090 |
labels := #('No' 'No, Browse' 'Yes'). |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4091 |
values := #(false #noBrowse true). |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4092 |
defaultAnswer := true. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4093 |
]. |
1426 | 4094 |
|
1456
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
4095 |
"/ AbortAllOperationRequest isHandled ifTrue:[ |
1426 | 4096 |
"/ labels := #('Cancel All') , labels. |
4097 |
"/ values := #(#cancelAll) , values. |
|
4098 |
"/ ]. |
|
4099 |
||
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4100 |
DialogBox aboutToOpenBoxNotificationSignal handle:[:ex | |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4101 |
|box| |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4102 |
|
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4103 |
checkAgainHolder isValueModel ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4104 |
dontShowAgain := checkAgainHolder value not asValue. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4105 |
box := ex parameter. |
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4106 |
box addCheckBox:(resources string:'Do not show this Dialog again (reenable in Launcher).') |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4107 |
on:dontShowAgain. |
1426 | 4108 |
]. |
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4109 |
ex proceed. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4110 |
] do:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4111 |
answer := OptionBox |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4112 |
request:msg withCRs |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4113 |
label:(resources string:'Really CheckIn ?') |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4114 |
image:(InfoBox iconBitmap) |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4115 |
buttonLabels:(resources array:labels) |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4116 |
values:values |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4117 |
default:defaultAnswer |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4118 |
onCancel:nil. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4119 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4120 |
answer isNil ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4121 |
AbortSignal raise. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4122 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4123 |
|
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4124 |
dontShowAgain notNil ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4125 |
checkAgainHolder value:dontShowAgain value not |
1000 | 4126 |
]. |
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4127 |
|
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4128 |
answer == #noBrowse ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4129 |
UserPreferences browserClass browseMethods:methodsWithBadStuff title:'Methods with Bad Stuff'. |
1995
f832f7ec6ccf
Don't use possibly uninitialized class variable
Stefan Vogel <sv@exept.de>
parents:
1994
diff
changeset
|
4130 |
self yesToAllNotification queryWith:false. |
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4131 |
^ false |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4132 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4133 |
answer == #cancelAll ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4134 |
AbortAllSignal raise. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4135 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4136 |
answer == #yesToAll ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4137 |
YesToAllNotification queryWith:true. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4138 |
^ true |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4139 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4140 |
answer == #noToAll ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4141 |
YesToAllNotification queryWith:false. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4142 |
^ false |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4143 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
4144 |
^ answer |
1375 | 4145 |
|
4146 |
" |
|
4147 |
self checkAndWarnAboutBadMessagesInClass:(SourceCodeManagerUtilities) |
|
4148 |
" |
|
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
4149 |
! |
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
4150 |
|
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4151 |
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil |
2283 | 4152 |
"ask for a log message for checking in a class (plus checkinQuick state info), |
4153 |
and other info (mark as stable, for example). |
|
4154 |
Return the info-object (actually: the dialog) or nil if aborted." |
|
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
4155 |
|
1704 | 4156 |
^ self |
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4157 |
getCheckinInfoFor:aClassNameOrPackageNameString |
1704 | 4158 |
initialAnswer:initialAnswerOrNil |
4159 |
withQuickOption:false |
|
4160 |
||
4161 |
" |
|
4162 |
SourceCodeManagerUtilities getCheckinInfoFor:'hello' initialAnswer:'bla' |
|
4163 |
" |
|
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
4164 |
|
2283 | 4165 |
"Modified: / 06-07-2010 / 11:22:15 / cg" |
1704 | 4166 |
! |
4167 |
||
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4168 |
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption |
2283 | 4169 |
"ask for a log message for checking in a class (plus checkinQuick state info), |
4170 |
and other info (mark as stable, for example). |
|
2106 | 4171 |
Return the info-object (actually: the dialog) or nil if aborted." |
4172 |
||
4173 |
|logMsg infoDialog| |
|
4174 |
||
4175 |
infoDialog := Tools::CheckinInfoDialog |
|
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4176 |
getCheckinInfoFor:aClassNameOrPackageNameString |
1704 | 4177 |
initialAnswer:(initialAnswerOrNil ? LastSourceLogMessage) |
4178 |
withQuickOption:withQuickOption. |
|
2106 | 4179 |
infoDialog notNil ifTrue:[ |
4180 |
logMsg := infoDialog logMessage. |
|
2284 | 4181 |
logMsg notEmptyOrNil ifTrue:[ |
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
4182 |
LastSourceLogMessage := logMsg |
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
4183 |
]. |
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
4184 |
]. |
2106 | 4185 |
^ infoDialog |
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
4186 |
|
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
4187 |
" |
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
4188 |
SourceCodeManagerUtilities getCheckinInfoFor:'hello' initialAnswer:'bla' |
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
4189 |
" |
1501 | 4190 |
|
2283 | 4191 |
"Modified: / 06-07-2010 / 11:21:28 / cg" |
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4192 |
! |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4193 |
|
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4194 |
goodInitialLogMessageForCheckinClassOfClass:aClass |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4195 |
"figure out, if there were any non-comment changes. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4196 |
Provide a reasonable initial log message (I am tired of typing in 'comment only')" |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4197 |
|
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4198 |
|selectorsInChangeSet newSelectors modifiedSelectors |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4199 |
classChanges changesForThisClass definitionChangesForThisClass methodChangesForThisClass |
2194
c45cd185ee80
changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
4200 |
allMethodChangesForThisClass modifiedMethodsForThisClass newMethodsForThisClass removedMethodsForThisClass |
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4201 |
initialLogStream printSelectors selectorsWithCommentOrFormattingChangeOnly |
2194
c45cd185ee80
changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
4202 |
selectorsWithVariableChangeOnly |
c45cd185ee80
changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
4203 |
removedSelectors categoryChanges categoryChangeSelectors| |
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4204 |
|
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4205 |
"/ a helper function |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4206 |
printSelectors := |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4207 |
[:what :selectors | |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4208 |
initialLogStream |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4209 |
nextPutAll:(what,':'). |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4210 |
selectors size < 5 ifTrue:[ |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4211 |
selectors size == 1 ifTrue:[ |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4212 |
initialLogStream |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4213 |
print: ' #'; |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4214 |
print: (selectors first); |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4215 |
cr. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4216 |
] ifFalse:[ |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4217 |
initialLogStream cr. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4218 |
selectors asSortedCollection do:[:sel | initialLogStream tab; nextPutAll:'#'; nextPutLine:sel]. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4219 |
] |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4220 |
] ifFalse:[ |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4221 |
initialLogStream |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4222 |
print: (selectors size); |
2142 | 4223 |
print: ' methods'; |
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4224 |
cr. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4225 |
]. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4226 |
]. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4227 |
|
2312 | 4228 |
classChanges := ChangeSet current select:[:aChange | aChange isClassChange]. |
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4229 |
|
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4230 |
changesForThisClass := classChanges |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4231 |
select:[:aChange | aChange className = aClass theNonMetaclass name |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4232 |
or:[aChange className = aClass theMetaclass name] ]. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4233 |
|
2312 | 4234 |
definitionChangesForThisClass := changesForThisClass select:[:aChange | aChange isMethodChange not]. |
4235 |
categoryChanges := changesForThisClass select:[:aChange | aChange isMethodCategoryChange]. |
|
2194
c45cd185ee80
changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
4236 |
categoryChangeSelectors := categoryChanges collect:[:aChange | aChange changeSelector] as:Set. |
2312 | 4237 |
allMethodChangesForThisClass := changesForThisClass select:[:aChange | aChange isMethodCodeChange]. |
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4238 |
selectorsInChangeSet := allMethodChangesForThisClass collect:[:aChange | aChange changeSelector] as:Set. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4239 |
methodChangesForThisClass := selectorsInChangeSet collect:[:eachSelector | |
2161
c1d39e2f7115
changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2142
diff
changeset
|
4240 |
allMethodChangesForThisClass detectLast:[:change | change changeSelector = eachSelector]] as:OrderedCollection. |
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4241 |
|
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4242 |
modifiedMethodsForThisClass := methodChangesForThisClass |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4243 |
select:[:aChange | aChange previousVersion notNil]. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4244 |
modifiedSelectors := modifiedMethodsForThisClass collect:[:aChange | aChange changeSelector] as:Set. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4245 |
|
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4246 |
newMethodsForThisClass := allMethodChangesForThisClass |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4247 |
select:[:aChange | aChange previousVersion isNil]. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4248 |
newSelectors := newMethodsForThisClass collect:[:aChange | aChange changeSelector] as:Set. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4249 |
|
2194
c45cd185ee80
changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
4250 |
removedMethodsForThisClass := allMethodChangesForThisClass |
c45cd185ee80
changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
4251 |
select:[:aChange | aChange isMethodRemoveChange]. |
c45cd185ee80
changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
4252 |
removedSelectors := removedMethodsForThisClass collect:[:aChange | aChange changeSelector] as:Set. |
c45cd185ee80
changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
4253 |
|
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4254 |
initialLogStream := '' writeStream. |
2313 | 4255 |
"/ definition? |
2312 | 4256 |
"/ suppress definition-message if initial checkin |
4257 |
(aClass package isNil or:[aClass revision isNil]) ifFalse:[ |
|
4258 |
definitionChangesForThisClass notEmpty ifTrue:[ |
|
4259 |
initialLogStream |
|
4260 |
print:'class definition'; cr. |
|
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4261 |
]. |
2312 | 4262 |
]. |
4263 |
||
2313 | 4264 |
"/ added selectors? |
2312 | 4265 |
newSelectors notEmpty ifTrue:[ |
4266 |
printSelectors value:'added' value:newSelectors. |
|
4267 |
]. |
|
4268 |
modifiedSelectors removeAllFoundIn:newSelectors. |
|
4269 |
categoryChangeSelectors removeAllFoundIn:newSelectors. |
|
4270 |
||
2313 | 4271 |
"/ removed selectors? |
4272 |
removedSelectors notEmpty ifTrue:[ |
|
4273 |
printSelectors value:'removed' value:removedSelectors. |
|
4274 |
]. |
|
4275 |
modifiedSelectors removeAllFoundIn:removedSelectors. |
|
4276 |
categoryChangeSelectors removeAllFoundIn:removedSelectors. |
|
4277 |
||
4278 |
"/ modifications? |
|
2312 | 4279 |
modifiedSelectors notEmpty ifTrue:[ |
4280 |
selectorsWithCommentOrFormattingChangeOnly := Set new. |
|
4281 |
selectorsWithVariableChangeOnly := Set new. |
|
2313 | 4282 |
|
4283 |
"/ cehck for format/comment change |
|
2312 | 4284 |
RBParser notNil ifTrue:[ |
4285 |
modifiedSelectors do:[:eachSelector | |
|
4286 |
|oldest newest oldMethod newMethod oldTree newTree variableMapping| |
|
4287 |
||
4288 |
(newSelectors includes:eachSelector) ifFalse:[ |
|
4289 |
oldest := allMethodChangesForThisClass detect:[:change | change changeSelector = eachSelector]. |
|
4290 |
newest := allMethodChangesForThisClass detectLast:[:change | change changeSelector = eachSelector]. |
|
4291 |
||
4292 |
oldest := oldest previousVersion notNil ifTrue:[oldest previousVersion] ifFalse:[oldest]. |
|
4293 |
||
4294 |
oldTree := RBParser parseMethod:oldest source onError:[:aString :pos | nil]. |
|
4295 |
newTree := RBParser parseMethod:newest source onError:[:aString :pos | nil]. |
|
4296 |
(oldTree notNil and:[newTree notNil]) ifTrue:[ |
|
4297 |
variableMapping := Dictionary new. |
|
4298 |
(oldTree equalTo:newTree withMapping: variableMapping) ifTrue:[ |
|
4299 |
(variableMapping at:'self' ifAbsent:nil) = 'self' ifTrue:[ |
|
4300 |
((variableMapping associations count:[:assoc | assoc key ~= assoc value]) == 0) ifTrue:[ |
|
4301 |
selectorsWithCommentOrFormattingChangeOnly add:eachSelector. |
|
4302 |
] ifFalse:[ |
|
4303 |
selectorsWithVariableChangeOnly add:eachSelector. |
|
2142 | 4304 |
]. |
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4305 |
]. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4306 |
]. |
2312 | 4307 |
]. |
4308 |
] |
|
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4309 |
]. |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4310 |
]. |
2313 | 4311 |
|
2312 | 4312 |
modifiedSelectors removeAllFoundIn:selectorsWithCommentOrFormattingChangeOnly. |
4313 |
modifiedSelectors removeAllFoundIn:selectorsWithVariableChangeOnly. |
|
4314 |
||
4315 |
(selectorsWithCommentOrFormattingChangeOnly notEmpty) ifTrue:[ |
|
4316 |
printSelectors value:'comment/format in' value:selectorsWithCommentOrFormattingChangeOnly. |
|
4317 |
]. |
|
4318 |
(selectorsWithVariableChangeOnly notEmpty) ifTrue:[ |
|
4319 |
printSelectors value:'variable renamed in' value:selectorsWithVariableChangeOnly. |
|
4320 |
]. |
|
4321 |
(modifiedSelectors notEmpty) ifTrue:[ |
|
4322 |
printSelectors value:'changed' value:modifiedSelectors. |
|
2194
c45cd185ee80
changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
4323 |
]. |
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4324 |
]. |
2312 | 4325 |
categoryChanges notEmpty ifTrue:[ |
4326 |
printSelectors value:'category of' value:categoryChangeSelectors. |
|
4327 |
]. |
|
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
4328 |
^ initialLogStream contents |
2312 | 4329 |
|
2313 | 4330 |
"Modified: / 27-01-2011 / 09:25:30 / cg" |
1375 | 4331 |
! ! |
4332 |
||
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
4333 |
!SourceCodeManagerUtilities methodsFor:'utilities-encoding'! |
1375 | 4334 |
|
4335 |
guessEncodingOfFile:aFilename |
|
4336 |
"look for a string |
|
4337 |
encoding #name |
|
4338 |
or: |
|
4339 |
encoding: name |
|
4340 |
within the given buffer |
|
4341 |
(which is usually the first few bytes of a textFile). |
|
4342 |
If thats not found, use heuristics (in CharacterArray) to guess." |
|
4343 |
||
1433
c3696ad0922b
mark obsolete messages as obsolete
Stefan Vogel <sv@exept.de>
parents:
1429
diff
changeset
|
4344 |
<resource: #obsolete> |
c3696ad0922b
mark obsolete messages as obsolete
Stefan Vogel <sv@exept.de>
parents:
1429
diff
changeset
|
4345 |
|
1414
f67d4b166606
guessEncoding now implemented in CharacterEncoder
Claus Gittinger <cg@exept.de>
parents:
1403
diff
changeset
|
4346 |
self obsoleteMethodWarning:'ask CharacterEncoder'. |
f67d4b166606
guessEncoding now implemented in CharacterEncoder
Claus Gittinger <cg@exept.de>
parents:
1403
diff
changeset
|
4347 |
^ CharacterEncoder guessEncodingOfFile:aFilename |
1375 | 4348 |
|
4349 |
" |
|
4350 |
SourceCodeManagerUtilities guessEncodingOfFile:'../../libview2/resources/ApplicationModel_de.rs' asFilename |
|
4351 |
SourceCodeManagerUtilities guessEncodingOfFile:'../../libview2/resources/ApplicationModel_ru.rs' asFilename |
|
4352 |
" |
|
4353 |
! |
|
4354 |
||
4355 |
guessEncodingOfStream:aStream |
|
4356 |
"look for a string of the form |
|
4357 |
encoding #name |
|
4358 |
or: |
|
4359 |
encoding: name |
|
4360 |
in the first few bytes of aStream." |
|
4361 |
||
1433
c3696ad0922b
mark obsolete messages as obsolete
Stefan Vogel <sv@exept.de>
parents:
1429
diff
changeset
|
4362 |
<resource: #obsolete> |
c3696ad0922b
mark obsolete messages as obsolete
Stefan Vogel <sv@exept.de>
parents:
1429
diff
changeset
|
4363 |
|
1414
f67d4b166606
guessEncoding now implemented in CharacterEncoder
Claus Gittinger <cg@exept.de>
parents:
1403
diff
changeset
|
4364 |
self obsoleteMethodWarning:'ask CharacterEncoder'. |
f67d4b166606
guessEncoding now implemented in CharacterEncoder
Claus Gittinger <cg@exept.de>
parents:
1403
diff
changeset
|
4365 |
^ CharacterEncoder guessEncodingOfStream:aStream |
873 | 4366 |
! ! |
4367 |
||
4368 |
!SourceCodeManagerUtilities class methodsFor:'documentation'! |
|
4369 |
||
2487
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
4370 |
version |
2691 | 4371 |
^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.237 2011-12-29 13:37:43 cg Exp $' |
2487
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
4372 |
! |
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
4373 |
|
2175 | 4374 |
version_CVS |
2691 | 4375 |
^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.237 2011-12-29 13:37:43 cg Exp $' |
873 | 4376 |
! ! |