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