author | Claus Gittinger <cg@exept.de> |
Tue, 09 Jul 2019 15:23:29 +0200 | |
changeset 4456 | df14ee79655a |
parent 4448 | 0bb397930dcb |
child 4458 | abe7565c10fb |
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 |
||
3812
173678af0074
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3692
diff
changeset
|
14 |
"{ NameSpace: Smalltalk }" |
173678af0074
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3692
diff
changeset
|
15 |
|
873 | 16 |
Object subclass:#SourceCodeManagerUtilities |
2847 | 17 |
instanceVariableNames:'manager resources confirmNewFiles' |
18 |
classVariableNames:'LastSourceLogMessage LastModule LastPackage YesToAllQuery |
|
4174 | 19 |
YesToAllNotification LastSourceLogMessages DefaultUtilities |
4448 | 20 |
LastTag LastComparedTag AlwaysUpdateVersionMethodsIfNoOtherChange |
21 |
DoNotAskForCondenseIfSameAsRepository' |
|
2847 | 22 |
poolDictionaries:'' |
23 |
category:'System-SourceCodeManagement' |
|
873 | 24 |
! |
25 |
||
26 |
!SourceCodeManagerUtilities class methodsFor:'documentation'! |
|
27 |
||
906 | 28 |
copyright |
29 |
" |
|
30 |
COPYRIGHT (c) 2000 eXept Software AG |
|
31 |
All Rights Reserved |
|
32 |
||
33 |
This software is furnished under a license and may be used |
|
34 |
only in accordance with the terms of that license and with the |
|
35 |
inclusion of the above copyright notice. This software may not |
|
36 |
be provided or otherwise made available to, or used by, any |
|
37 |
other person. No title to or ownership of the software is |
|
38 |
hereby transferred. |
|
39 |
" |
|
40 |
||
41 |
! |
|
42 |
||
873 | 43 |
documentation |
44 |
" |
|
45 |
utility code which is useful at more than one place |
|
46 |
(extracted from the browser) |
|
47 |
||
48 |
[author:] |
|
49 |
Claus Gittinger (cg@exept) |
|
50 |
||
51 |
[see also:] |
|
52 |
||
53 |
[instance variables:] |
|
54 |
||
55 |
[class variables:] |
|
56 |
" |
|
57 |
! ! |
|
58 |
||
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
59 |
!SourceCodeManagerUtilities class methodsFor:'instance creation'! |
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 |
forManager: aSourceCodeManager |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
62 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
63 |
^self new setManager: aSourceCodeManager |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
64 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
65 |
"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
|
66 |
! |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
67 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
68 |
new |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
69 |
"return an initialized instance" |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
70 |
|
2969 | 71 |
self == SourceCodeManagerUtilities ifTrue:[ |
72 |
self abstractClassInstantiationError |
|
73 |
]. |
|
2597
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
74 |
^ self basicNew initialize. |
2847 | 75 |
|
76 |
"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
|
77 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
78 |
|
992 | 79 |
!SourceCodeManagerUtilities class methodsFor:'Signal constants'! |
80 |
||
81 |
yesToAllNotification |
|
82 |
YesToAllNotification isNil ifTrue:[ |
|
83 |
YesToAllNotification := QuerySignal new. |
|
84 |
]. |
|
85 |
^ YesToAllNotification |
|
86 |
! |
|
87 |
||
88 |
yesToAllQuery |
|
89 |
YesToAllQuery isNil ifTrue:[ |
|
90 |
YesToAllQuery := QuerySignal new. |
|
91 |
]. |
|
92 |
^ YesToAllQuery |
|
93 |
! ! |
|
94 |
||
1084 | 95 |
!SourceCodeManagerUtilities class methodsFor:'accessing'! |
96 |
||
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
97 |
default |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
98 |
|
3635
765b567f596a
oops - a global variable named "Default" was introduced
Claus Gittinger <cg@exept.de>
parents:
3633
diff
changeset
|
99 |
DefaultUtilities isNil ifTrue:[DefaultUtilities := SourceCodeManagerUtilitiesForContainerBasedManagers new]. |
3642
28683778b9c3
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3635
diff
changeset
|
100 |
^ DefaultUtilities |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
101 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
102 |
"Created: / 10-10-2011 / 11:28:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2864 | 103 |
"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
|
104 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
105 |
|
1084 | 106 |
lastModule |
107 |
"return the value of the static variable 'LastModule' (automatically generated)" |
|
108 |
||
109 |
^ LastModule |
|
110 |
! |
|
111 |
||
112 |
lastModule:something |
|
113 |
"set the value of the static variable 'LastModule' (automatically generated)" |
|
114 |
||
115 |
LastModule := something. |
|
116 |
! |
|
117 |
||
118 |
lastPackage |
|
119 |
"return the value of the static variable 'LastPackage' (automatically generated)" |
|
120 |
||
121 |
^ LastPackage |
|
122 |
! |
|
123 |
||
124 |
lastPackage:something |
|
125 |
"set the value of the static variable 'LastPackage' (automatically generated)" |
|
126 |
||
127 |
LastPackage := something. |
|
128 |
! ! |
|
129 |
||
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
130 |
!SourceCodeManagerUtilities class methodsFor:'error handling'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
131 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
132 |
doesNotUnderstand: aMessage |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
133 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
134 |
(self default respondsTo: aMessage selector) ifTrue:[ |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
135 |
"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
|
136 |
self breakPoint: #jv. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
137 |
self breakPoint: #cg. |
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 |
^aMessage sendTo: self default |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
140 |
] ifFalse:[ |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
141 |
^super doesNotUnderstand: aMessage |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
142 |
] |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
143 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
144 |
"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
|
145 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
146 |
|
2569 | 147 |
!SourceCodeManagerUtilities class methodsFor:'private-migration'! |
148 |
||
149 |
compileForwarders |
|
150 |
||
151 |
"Utility method" |
|
152 |
||
153 |
" |
|
154 |
SourceCodeManagerUtilities compileForwarders. |
|
155 |
" |
|
156 |
||
157 |
self methodsDo:[:m| |
|
158 |
| sel | |
|
159 |
sel := m selector. |
|
160 |
((self class includesSelector: sel) and: [(self class >> sel) source = m source]) ifTrue:[ |
|
161 |
| source header | |
|
162 |
||
163 |
header := m source asStringCollection first. |
|
164 |
source := '%1 |
|
165 |
||
166 |
<resource: #obsolete> |
|
167 |
||
168 |
self obsoleteMethodWarning: ''Please use instance protocol (SourceCodeManagerUtilities default doSomething)''. |
|
169 |
||
170 |
^self default %1' bindWith: header with: header. |
|
171 |
||
172 |
self halt: 'Inspect source'. |
|
173 |
self class compile: source classified: m category. |
|
174 |
]. |
|
175 |
||
176 |
] |
|
177 |
||
178 |
"Created: / 11-10-2011 / 10:55:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
179 |
! ! |
|
180 |
||
1806 | 181 |
!SourceCodeManagerUtilities class methodsFor:'resources'! |
182 |
||
183 |
resourcePackage |
|
184 |
^ #'stx:libtool' |
|
185 |
! ! |
|
186 |
||
873 | 187 |
!SourceCodeManagerUtilities class methodsFor:'utilities'! |
188 |
||
1882
8b3a4c2a2c2a
when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents:
1879
diff
changeset
|
189 |
classIsNotYetInRepository:aClass withManager:mgr |
2570 | 190 |
|
191 |
<resource: #obsolete> |
|
192 |
||
193 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
194 |
||
195 |
^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
|
196 |
! |
8b3a4c2a2c2a
when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents:
1879
diff
changeset
|
197 |
|
1704 | 198 |
nameOfExtensionsContainer |
2556
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 |
<resource: #obsolete> |
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 |
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
|
203 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
204 |
^self default nameOfExtensionsContainer |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
205 |
! |
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 |
setPackageOfAllMethodsIn:aClass to:aPackage |
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 |
<resource: #obsolete> |
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 |
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
|
212 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
213 |
^self default setPackageOfAllMethodsIn:aClass to:aPackage |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
214 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
215 |
"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
|
216 |
! |
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 |
setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage |
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 |
<resource: #obsolete> |
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 |
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
|
223 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
224 |
^self default setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
225 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
226 |
"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
|
227 |
! |
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 |
sourceCodeManagerFor:aClass |
3370
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
230 |
|mgr assumption| |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
231 |
|
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
232 |
mgr := aClass theNonMetaclass sourceCodeManager. |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
233 |
mgr isNil ifTrue:[ |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
234 |
SourceCodeManager isNil ifTrue:[ |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
235 |
"/ self warn:'SourceCodeManagement is disabled or not configured.\\Please setup in the Launcher.' withCRs. |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
236 |
^ nil. |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
237 |
]. |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
238 |
assumption := AbstractSourceCodeManager defaultManager ? CVSSourceCodeManager. |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
239 |
assumption notNil ifTrue:[ |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
240 |
(self confirm:('Class does not seem to provide a valid sourceCodeManager.\\Assume %1 ?' bindWith:assumption managerTypeName) withCRs) ifFalse:[ |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
241 |
^ nil |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
242 |
]. |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
243 |
mgr := assumption. |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
244 |
]. |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
245 |
]. |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
246 |
^ mgr |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
247 |
! |
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 |
sourceCodeOfClass:aClass |
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 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
252 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
253 |
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
|
254 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
255 |
^self default sourceCodeOfClass:aClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
256 |
! |
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 |
versionString:a isLessThan:b |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
259 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
260 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
261 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
262 |
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
|
263 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
264 |
^self default versionString:a isLessThan:b |
4436 | 265 |
|
266 |
" |
|
267 |
SourceCodeManagerUtilities default versionString:'1.10.2' isLessThan:'1.100.1' |
|
268 |
" |
|
269 |
||
270 |
"Modified (comment): / 28-05-2019 / 15:47:35 / Claus Gittinger" |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
271 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
272 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
273 |
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
274 |
|
2691 | 275 |
changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
276 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
277 |
<resource: #obsolete> |
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 |
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
|
280 |
|
2691 | 281 |
^self default changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager |
282 |
||
283 |
"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
|
284 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
285 |
|
2691 | 286 |
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
|
287 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
288 |
<resource: #obsolete> |
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 |
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
|
291 |
|
2691 | 292 |
^self default |
293 |
changeSetForExtensionMethodsForPackage:packageToCheckOut |
|
294 |
revision:revisionOrNil |
|
295 |
orAskForRevision:askForRevision |
|
296 |
usingManager:aSourceCodeManager |
|
297 |
||
298 |
"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
|
299 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
300 |
|
2691 | 301 |
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
|
302 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
303 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
304 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
305 |
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
|
306 |
|
2691 | 307 |
^self default checkForExistingModule:module directory:directory container:containerFileName usingManager:mgr allowCreate:allowCreate |
308 |
||
309 |
"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
|
310 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
311 |
|
2691 | 312 |
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
|
313 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
314 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
315 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
316 |
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
|
317 |
|
2691 | 318 |
^self default checkForExistingModule:module directory:directory usingManager:mgr allowCreate:allowCreate |
319 |
||
320 |
"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
|
321 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
322 |
|
2691 | 323 |
checkForExistingModule:module usingManager:mgr allowCreate:allowCreate |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
324 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
325 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
326 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
327 |
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
|
328 |
|
2691 | 329 |
^self default checkForExistingModule:module usingManager:mgr allowCreate:allowCreate |
330 |
||
331 |
"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
|
332 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
333 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
334 |
checkinClass:aClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
335 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
336 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
337 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
338 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
339 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
340 |
^self default checkinClass:aClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
341 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
342 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
343 |
checkinClass:aClass withInfo:aLogInfoOrNil |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
344 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
345 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
346 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
347 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
348 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
349 |
^self default checkinClass:aClass withInfo:aLogInfoOrNil |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
350 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
351 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
352 |
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass |
2569 | 353 |
|
354 |
<resource: #obsolete> |
|
355 |
||
356 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
357 |
||
358 |
^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
|
359 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
360 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
361 |
checkinClasses:aCollectionOfClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
362 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
363 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
364 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
365 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
366 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
367 |
^self default checkinClasses:aCollectionOfClass |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
368 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
369 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
370 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
371 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
372 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
373 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
374 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
375 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
376 |
^self default checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil |
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 |
|
4276 | 379 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil onBranch:branchNameOrNil |
380 |
||
381 |
<resource: #obsolete> |
|
382 |
||
383 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
384 |
||
385 |
^self default checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil onBranch:branchNameOrNil |
|
386 |
||
387 |
"Created: / 05-12-2017 / 20:15:04 / cg" |
|
388 |
! |
|
389 |
||
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
390 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses |
2569 | 391 |
|
392 |
<resource: #obsolete> |
|
393 |
||
394 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
395 |
||
396 |
^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
|
397 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
398 |
|
4276 | 399 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses onBranch:branchNameOrNil |
400 |
||
401 |
<resource: #obsolete> |
|
402 |
||
403 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
404 |
||
405 |
^self default checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses onBranch:branchNameOrNil |
|
406 |
||
407 |
"Created: / 05-12-2017 / 20:15:55 / cg" |
|
408 |
! |
|
409 |
||
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
410 |
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
411 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
412 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
413 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
414 |
self 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
|
415 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
416 |
^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
|
417 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
418 |
|
4276 | 419 |
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil onBranch:branchNameOrNil |
420 |
||
421 |
<resource: #obsolete> |
|
422 |
||
423 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
424 |
||
425 |
^self default checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil onBranch:branchNameOrNil |
|
426 |
||
427 |
"Created: / 05-12-2017 / 20:13:44 / cg" |
|
428 |
! |
|
429 |
||
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
430 |
checkoutClass:aClass askForMerge:askForMerge |
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 |
<resource: #obsolete> |
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 |
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
|
435 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
436 |
^self default checkoutClass:aClass askForMerge:askForMerge |
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 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
439 |
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge |
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 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
442 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
443 |
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
|
444 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
445 |
^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
|
446 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
447 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
448 |
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
|
449 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
450 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
451 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
452 |
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
|
453 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
454 |
^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
|
455 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
456 |
|
2691 | 457 |
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
|
458 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
459 |
<resource: #obsolete> |
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 |
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
|
462 |
|
2691 | 463 |
^self default checkoutExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision askForMerge:askForMerge usingManager:aSourceCodeManager |
464 |
||
465 |
"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
|
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 |
compareClassWithRepository:aClass |
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 compareClassWithRepository:aClass |
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 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
477 |
compareClassWithRepository:aClass askForRevision:askForRevision |
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 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
483 |
^self default compareClassWithRepository:aClass askForRevision:askForRevision |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
484 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
485 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
486 |
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest |
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 |
<resource: #obsolete> |
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 |
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
|
491 |
|
3926 | 492 |
^self compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:false |
493 |
! |
|
494 |
||
495 |
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:extensionsOnly |
|
496 |
||
497 |
<resource: #obsolete> |
|
498 |
||
499 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
500 |
||
501 |
^self default compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:extensionsOnly |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
502 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
503 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
504 |
compareProjectWithRepository:aProject |
2569 | 505 |
|
506 |
<resource: #obsolete> |
|
507 |
||
508 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
509 |
||
510 |
^self default compareProjectWithRepository:aProject |
|
2556
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 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
513 |
createSourceContainerForClass:aClass |
2569 | 514 |
|
515 |
<resource: #obsolete> |
|
516 |
||
517 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
518 |
||
519 |
^self default createSourceContainerForClass:aClass |
|
2556
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 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
522 |
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
|
523 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
524 |
<resource: #obsolete> |
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 |
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
|
527 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
528 |
^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
|
529 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
530 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
531 |
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest |
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 |
<resource: #obsolete> |
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 |
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
|
536 |
|
3926 | 537 |
^self diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:false |
538 |
! |
|
539 |
||
540 |
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:extensionsOnly |
|
541 |
||
542 |
<resource: #obsolete> |
|
543 |
||
544 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
545 |
||
546 |
^self default |
|
547 |
diffSetOfProject:aProject |
|
548 |
againstRepositoryVersionFrom:aDateOrNilForNewest |
|
549 |
extensionsOnly:extensionsOnly |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
550 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
551 |
|
2691 | 552 |
ensureCorrectVersionMethodsInClass:aClass usingManager:aManager |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
553 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
554 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
555 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
556 |
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
|
557 |
|
2691 | 558 |
^self default ensureCorrectVersionMethodsInClass:aClass usingManager:aManager |
559 |
||
560 |
"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
|
561 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
562 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
563 |
getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil forClass:aClass valuesInto:aBlock |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
564 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
565 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
566 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
567 |
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
|
568 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
569 |
^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
|
570 |
! |
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 |
removeSourceContainerForClass:aClass |
2569 | 573 |
|
574 |
<resource: #obsolete> |
|
575 |
||
576 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
577 |
||
578 |
^self default removeSourceContainerForClass:aClass |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
579 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
580 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
581 |
removeSourceContainerForClass:aClass confirm:doConfirm warn:doWarn |
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 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
584 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
585 |
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
|
586 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
587 |
^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
|
588 |
! |
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 |
repositoryLogOf:aClass onto:aStream |
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 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
593 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
594 |
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
|
595 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
596 |
^self default repositoryLogOf:aClass onto:aStream |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
597 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
598 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
599 |
repositoryLogOf:aClass short:shortOrNot onto:aStream |
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 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
602 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
603 |
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
|
604 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
605 |
^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
|
606 |
! |
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 |
tagClass:aClass as:tag |
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 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
611 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
612 |
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
|
613 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
614 |
^self default tagClass:aClass as:tag |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
615 |
! |
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 |
tagClasses:aCollectionOfClasses as:tag |
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 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
620 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
621 |
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
|
622 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
623 |
^self default tagClasses:aCollectionOfClasses as:tag |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
624 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
625 |
|
2691 | 626 |
tagPath:aPath as:tag usingManager:aManager |
2556
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 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
629 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
630 |
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
|
631 |
|
2691 | 632 |
^self default tagPath:aPath as:tag usingManager:aManager |
633 |
||
634 |
"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
|
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 |
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs-helpers'! |
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 |
getMethodVersionsOfClass:aClass selector:selector numberOfRevisions:numberOfRevisionsOrNil |
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 |
<resource: #obsolete> |
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 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
|
644 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
645 |
^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
|
646 |
! ! |
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 |
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs-user interaction'! |
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 |
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
|
651 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
652 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
653 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
654 |
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
|
655 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
656 |
^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
|
657 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
658 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
659 |
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
|
660 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
661 |
<resource: #obsolete> |
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 |
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
|
664 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
665 |
^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
|
666 |
! |
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 |
askForExistingRevision:boxText title:title class:aClass |
2570 | 669 |
|
670 |
<resource: #obsolete> |
|
671 |
||
672 |
self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'. |
|
673 |
||
674 |
^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
|
675 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
676 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
677 |
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
|
678 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
679 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
680 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
681 |
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
|
682 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
683 |
^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
|
684 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
685 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
686 |
checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
687 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
688 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
689 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
690 |
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
|
691 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
692 |
^self default checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
693 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
694 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
695 |
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil |
2795 | 696 |
^self default |
697 |
getCheckinInfoFor:aClassNameOrPackageNameString |
|
698 |
initialAnswer:initialAnswerOrNil |
|
699 |
||
700 |
"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
|
701 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
702 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
703 |
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption |
2795 | 704 |
^self default |
705 |
getCheckinInfoFor:aClassNameOrPackageNameString |
|
706 |
initialAnswer:initialAnswerOrNil |
|
707 |
withQuickOption:withQuickOption |
|
708 |
||
709 |
"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
|
710 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
711 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
712 |
goodInitialLogMessageForCheckinClassOfClass:aClass |
4230 | 713 |
"figure out, if there were any non-comment changes. |
714 |
Provide a reasonable initial log message (I am tired of typing in 'comment only'). |
|
715 |
This is a q&d hack - not complete and not correct (for example, it will generate a method change |
|
716 |
info line, even if the selector was removed afterwards). |
|
717 |
So check the outcome." |
|
718 |
||
4301 | 719 |
|printSelectors initialLogStream additionalInfoPerChangedSelector changesForThisCheckin changesPerClass| |
4230 | 720 |
|
721 |
"/ a helper function |
|
722 |
printSelectors := |
|
723 |
[:what :selectors :more | |
|
724 |
|sel moreInfo| |
|
725 |
||
726 |
selectors remove:nil ifAbsent:[]. |
|
727 |
initialLogStream nextPutAll:(what,':'). |
|
728 |
selectors size < 15 ifTrue:[ |
|
729 |
selectors size == 1 ifTrue:[ |
|
730 |
sel := selectors first. |
|
731 |
initialLogStream nextPutAll: ' #'; nextPutAll:sel. |
|
732 |
more ifTrue:[ |
|
733 |
(moreInfo := additionalInfoPerChangedSelector at:sel ifAbsent:nil) notNil ifTrue:[ |
|
734 |
initialLogStream space; nextPutAll:moreInfo. |
|
735 |
] |
|
736 |
]. |
|
737 |
initialLogStream cr. |
|
738 |
] ifFalse:[ |
|
739 |
initialLogStream cr. |
|
740 |
selectors asSortedCollection do:[:sel | |
|
741 |
initialLogStream tab; nextPutAll:'#'; nextPutAll:sel. |
|
742 |
more ifTrue:[ |
|
743 |
(moreInfo := additionalInfoPerChangedSelector at:sel ifAbsent:nil) notNil ifTrue:[ |
|
744 |
initialLogStream space; nextPutAll:moreInfo. |
|
745 |
]. |
|
746 |
]. |
|
747 |
initialLogStream cr |
|
748 |
]. |
|
749 |
]. |
|
750 |
] ifFalse:[ |
|
751 |
initialLogStream |
|
752 |
print: (selectors size); nextPutAll: ' methods'; cr. |
|
753 |
]. |
|
754 |
]. |
|
755 |
||
756 |
changesForThisCheckin := ChangeSet current |
|
757 |
select:[:aChange | |
|
758 |
|changeClass| |
|
759 |
||
4241 | 760 |
aChange isClassChange |
761 |
and:[ aChange changeClass notNil |
|
762 |
and:[ |
|
4230 | 763 |
changeClass := aChange changeClass theNonMetaclass. |
764 |
changeClass == aClass or:[changeClass topOwningClass == aClass] |
|
4241 | 765 |
]]. |
4230 | 766 |
]. |
767 |
||
768 |
changesForThisCheckin sort:[:a :b| a className < b className]. |
|
769 |
changesPerClass := changesForThisCheckin asCollectionOfSubCollectionsSeparatedByAnyChange:[:prev :curr| prev className ~= curr className]. |
|
770 |
||
771 |
initialLogStream := '' writeStream. |
|
772 |
||
773 |
changesPerClass do:[:changesForThisClass| |
|
774 |
|selectorsInChangeSet newSelectors modifiedSelectors definitionChangesForThisClass methodChangesForThisClass |
|
775 |
allMethodChangesForThisClass modifiedMethodsForThisClass newMethodsForThisClass removedMethodsForThisClass |
|
776 |
selectorsWithCommentOrFormattingChangeOnly |
|
777 |
selectorsWithVariableChangeOnly newSelectorsRemoved |
|
778 |
removedSelectors categoryChanges categoryChangeSelectors| |
|
779 |
||
780 |
additionalInfoPerChangedSelector := Dictionary new. |
|
781 |
definitionChangesForThisClass := changesForThisClass reject:[:aChange | aChange isMethodChange]. |
|
782 |
categoryChanges := changesForThisClass select:[:aChange | aChange isMethodCategoryChange]. |
|
783 |
categoryChangeSelectors := categoryChanges collect:[:aChange | aChange changeSelector] as:Set. |
|
784 |
allMethodChangesForThisClass := changesForThisClass select:[:aChange | aChange isMethodCodeChange]. |
|
785 |
selectorsInChangeSet := allMethodChangesForThisClass collect:[:aChange | aChange changeSelector] as:Set. |
|
786 |
methodChangesForThisClass := selectorsInChangeSet collect:[:eachSelector | |
|
787 |
allMethodChangesForThisClass detectLast:[:change | change changeSelector = eachSelector]] as:OrderedCollection. |
|
788 |
||
789 |
modifiedMethodsForThisClass := methodChangesForThisClass |
|
790 |
select:[:aChange | aChange previousVersion notNil]. |
|
791 |
modifiedSelectors := modifiedMethodsForThisClass collect:[:aChange | aChange changeSelector] as:Set. |
|
792 |
||
793 |
newMethodsForThisClass := allMethodChangesForThisClass |
|
794 |
select:[:aChange | aChange previousVersion isNil]. |
|
795 |
newSelectors := newMethodsForThisClass collect:[:aChange | aChange changeSelector] as:Set. |
|
796 |
||
797 |
removedMethodsForThisClass := changesForThisClass |
|
798 |
select:[:aChange | aChange isMethodRemoveChange and:[ aChange changeMethod isNil ]]. |
|
799 |
removedSelectors := removedMethodsForThisClass collect:[:aChange | aChange changeSelector] as:Set. |
|
800 |
||
801 |
"/ get rid of category changes for new and removed methods |
|
802 |
categoryChanges := categoryChanges reject:[:chg | |
|
803 |
|methodWithChangedCat| |
|
804 |
||
805 |
(methodWithChangedCat := chg changeMethod) isNil |
|
806 |
or:[ newMethodsForThisClass contains:[:newChg | newChg changeMethod = methodWithChangedCat]]]. |
|
807 |
||
808 |
initialLogStream nextPutLine:'class: ', changesForThisClass first className. |
|
809 |
||
810 |
"/ definition? |
|
811 |
"/ suppress definition-message if initial checkin |
|
812 |
(aClass package isNil or:[aClass revision isNil]) ifFalse:[ |
|
813 |
definitionChangesForThisClass notEmpty ifTrue:[ |
|
814 |
"/ self halt. |
|
815 |
initialLogStream nextPutLine:'class definition'. |
|
816 |
]. |
|
817 |
]. |
|
818 |
||
819 |
"/ added selectors? |
|
820 |
newSelectorsRemoved := newSelectors select:[:sel | removedSelectors includes:sel]. |
|
821 |
||
822 |
newSelectors removeAllFoundIn:removedSelectors. |
|
823 |
newSelectors notEmpty ifTrue:[ |
|
824 |
printSelectors value:'added' value:newSelectors value:false. |
|
825 |
]. |
|
826 |
modifiedSelectors removeAllFoundIn:newSelectors. |
|
827 |
categoryChangeSelectors removeAllFoundIn:newSelectors. |
|
828 |
||
829 |
"/ removed selectors? |
|
830 |
removedSelectors removeAllFoundIn:newSelectorsRemoved. |
|
831 |
removedSelectors notEmpty ifTrue:[ |
|
832 |
printSelectors value:'removed' value:removedSelectors value:false. |
|
833 |
]. |
|
834 |
modifiedSelectors removeAllFoundIn:removedSelectors. |
|
835 |
categoryChangeSelectors removeAllFoundIn:removedSelectors. |
|
836 |
||
837 |
"/ modifications? |
|
838 |
modifiedSelectors notEmpty ifTrue:[ |
|
839 |
selectorsWithCommentOrFormattingChangeOnly := Set new. |
|
840 |
selectorsWithVariableChangeOnly := Set new. |
|
841 |
||
842 |
"/ check for format/comment change |
|
843 |
RBParser notNil ifTrue:[ |
|
844 |
modifiedSelectors do:[:eachSelector | |
|
845 |
|oldest newest oldMethod newMethod oldTree newTree |
|
846 |
variableMapping selectorMapping unchangedVariables unchangedSelectors| |
|
847 |
||
848 |
(newSelectors includes:eachSelector) ifFalse:[ |
|
849 |
oldest := allMethodChangesForThisClass detect:[:change | change changeSelector = eachSelector]. |
|
850 |
newest := allMethodChangesForThisClass detectLast:[:change | change changeSelector = eachSelector]. |
|
851 |
||
852 |
oldest := oldest previousVersion notNil ifTrue:[oldest previousVersion] ifFalse:[oldest]. |
|
853 |
||
854 |
oldTree := RBParser parseMethod:oldest source onError:[:aString :pos | nil]. |
|
855 |
newTree := RBParser parseMethod:newest source onError:[:aString :pos | nil]. |
|
856 |
||
857 |
(oldTree notNil and:[newTree notNil]) ifTrue:[ |
|
858 |
variableMapping := Dictionary new. |
|
859 |
(oldTree "semanticallyEqualTo:" equalTo:newTree withMapping: variableMapping) ifTrue:[ |
|
860 |
unchangedVariables := variableMapping keys select:[:k | (variableMapping at:k) = k]. |
|
861 |
variableMapping removeAllKeys:unchangedVariables. |
|
862 |
||
4301 | 863 |
(((variableMapping at:'self' ifAbsent:'self') = 'self') |
864 |
and:[ (variableMapping keyAtEqualValue:'self' ifAbsent:'self') = 'self']) ifTrue:[ |
|
4230 | 865 |
((variableMapping associations count:[:assoc | assoc key ~= assoc value]) == 0) ifTrue:[ |
866 |
selectorsWithCommentOrFormattingChangeOnly add:eachSelector. |
|
867 |
] ifFalse:[ |
|
868 |
"/ check, if a global has changed (aka sends to another global) |
|
4245 | 869 |
((variableMapping keys contains:[:var | var isUppercaseFirst]) |
870 |
or:[ (variableMapping values contains:[:var | var isUppercaseFirst]) ]) ifFalse:[ |
|
4230 | 871 |
selectorsWithVariableChangeOnly add:eachSelector. |
872 |
]. |
|
873 |
]. |
|
874 |
]. |
|
875 |
] ifFalse:[ |
|
876 |
selectorMapping := Dictionary new. |
|
877 |
(oldTree equalTo:newTree withSelectorMapping: selectorMapping) ifTrue:[ |
|
878 |
unchangedSelectors := selectorMapping keys select:[:k | (selectorMapping at:k) = k]. |
|
879 |
selectorMapping removeAllKeys:unchangedSelectors. |
|
880 |
(selectorMapping notEmpty and:[selectorMapping size <= 2]) ifTrue:[ |
|
881 |
additionalInfoPerChangedSelector at:eachSelector put:( |
|
882 |
String streamContents:[:s | |
|
883 |
|first| |
|
884 |
||
885 |
s nextPutAll:'('. |
|
886 |
first := true. |
|
887 |
selectorMapping keysAndValuesDo:[:selOld :selNew | |
|
888 |
first ifFalse:[s nextPutAll:', ']. |
|
889 |
s print:('send #',selNew,' instead of #',selOld). |
|
890 |
first := false. |
|
891 |
]. |
|
892 |
s nextPutAll:')'. |
|
893 |
]). |
|
894 |
] |
|
895 |
] |
|
896 |
]. |
|
897 |
]. |
|
898 |
] |
|
899 |
]. |
|
900 |
]. |
|
901 |
||
902 |
modifiedSelectors removeAllFoundIn:selectorsWithCommentOrFormattingChangeOnly. |
|
903 |
modifiedSelectors removeAllFoundIn:selectorsWithVariableChangeOnly. |
|
904 |
||
905 |
(selectorsWithCommentOrFormattingChangeOnly notEmpty) ifTrue:[ |
|
906 |
printSelectors value:'comment/format in' value:selectorsWithCommentOrFormattingChangeOnly value:false. |
|
907 |
]. |
|
908 |
(selectorsWithVariableChangeOnly notEmpty) ifTrue:[ |
|
909 |
printSelectors value:'variable renamed in' value:selectorsWithVariableChangeOnly value:false. |
|
910 |
]. |
|
911 |
(modifiedSelectors notEmpty) ifTrue:[ |
|
912 |
printSelectors value:'changed' value:modifiedSelectors value:true. |
|
913 |
]. |
|
914 |
]. |
|
915 |
categoryChanges notEmpty ifTrue:[ |
|
916 |
printSelectors value:'category of' value:categoryChangeSelectors value:false. |
|
917 |
]. |
|
918 |
] separatedBy:[ |
|
919 |
initialLogStream cr. |
|
920 |
]. |
|
921 |
^ initialLogStream contents |
|
922 |
||
923 |
"Modified: / 17-03-2017 / 18:39:28 / stefan" |
|
4245 | 924 |
"Modified: / 22-06-2017 / 06:54:44 / cg" |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
925 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
926 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
927 |
!SourceCodeManagerUtilities class methodsFor:'utilities-encoding'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
928 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
929 |
guessEncodingOfFile:aFilename |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
930 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
931 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
932 |
|
2818 | 933 |
self obsoleteMethodWarning:'ask CharacterEncoder'. |
934 |
^ CharacterEncoder guessEncodingOfFile:aFilename |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
935 |
! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
936 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
937 |
guessEncodingOfStream:aStream |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
938 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
939 |
<resource: #obsolete> |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
940 |
|
2817
8a836ca902d4
changed: #guessEncodingOfStream:
Stefan Vogel <sv@exept.de>
parents:
2796
diff
changeset
|
941 |
self obsoleteMethodWarning:'ask CharacterEncoder'. |
8a836ca902d4
changed: #guessEncodingOfStream:
Stefan Vogel <sv@exept.de>
parents:
2796
diff
changeset
|
942 |
^ CharacterEncoder guessEncodingOfStream:aStream |
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
943 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
944 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
945 |
!SourceCodeManagerUtilities methodsFor:'accessing'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
946 |
|
2847 | 947 |
confirmNewFiles:aBoolean |
948 |
"if true, ask if new files are about to be added to the repo" |
|
949 |
||
950 |
confirmNewFiles := aBoolean. |
|
951 |
||
952 |
"Modified (comment): / 24-07-2012 / 18:18:34 / cg" |
|
953 |
! |
|
954 |
||
2795 | 955 |
lastSourceLogMessageHeadlines |
956 |
LastSourceLogMessage isNil ifTrue:[ |
|
957 |
LastSourceLogMessages := OrderedCollection new. |
|
958 |
]. |
|
959 |
^ LastSourceLogMessages |
|
960 |
collect:[:msg | |
|
961 |
msg withoutLeadingSeparators asCollectionOfLines first , '...' |
|
962 |
] |
|
963 |
||
964 |
"Created: / 12-03-2012 / 12:34:35 / cg" |
|
965 |
! |
|
966 |
||
2569 | 967 |
yesToAllNotification |
968 |
||
969 |
^self class yesToAllNotification |
|
970 |
||
971 |
"Created: / 11-10-2011 / 12:01:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
972 |
! |
|
973 |
||
974 |
yesToAllQuery |
|
975 |
||
976 |
^self class yesToAllQuery |
|
977 |
||
978 |
"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
|
979 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
980 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
981 |
!SourceCodeManagerUtilities methodsFor:'error handling'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
982 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
983 |
doesNotUnderstand: aMessage |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
984 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
985 |
(self class respondsTo: aMessage selector) ifTrue:[ |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
986 |
"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
|
987 |
self breakPoint: #jv. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
988 |
self breakPoint: #cg. |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
989 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
990 |
^aMessage sendTo: self class |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
991 |
] ifFalse:[ |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
992 |
^super doesNotUnderstand: aMessage |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
993 |
] |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
994 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
995 |
"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
|
996 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
997 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
998 |
!SourceCodeManagerUtilities methodsFor:'initialization'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
999 |
|
2597
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1000 |
initialize |
2847 | 1001 |
confirmNewFiles := true. |
3551
e8feddd829f9
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3546
diff
changeset
|
1002 |
resources := self class classResources. |
2597
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1003 |
|
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1004 |
"Modified: / 13-10-2011 / 11:03:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2847 | 1005 |
"Modified: / 24-07-2012 / 18:17:57 / cg" |
2597
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1006 |
! |
fcb5d74b32d2
More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents:
2596
diff
changeset
|
1007 |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
1008 |
setManager: aSourceCodeManager |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
1009 |
|
2847 | 1010 |
manager := aSourceCodeManager. |
1011 |
manager isContainerBased ifFalse:[ |
|
1012 |
confirmNewFiles isNil "not yet set by user" ifTrue:[ |
|
1013 |
confirmNewFiles := false. |
|
1014 |
] |
|
1015 |
]. |
|
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
1016 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
1017 |
"Created: / 10-10-2011 / 11:47:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2847 | 1018 |
"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
|
1019 |
! ! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
1020 |
|
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
1021 |
!SourceCodeManagerUtilities methodsFor:'utilities'! |
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
1022 |
|
2569 | 1023 |
classIsNotYetInRepository:aClass withManager:mgr |
1024 |
|info| |
|
1025 |
||
1026 |
info := mgr sourceInfoOfClass:aClass. |
|
1027 |
||
1028 |
^ (info isNil |
|
1029 |
or:[(info at:#fileName ifAbsent:nil) isNil |
|
1030 |
or:[(info at:#module ifAbsent:nil) isNil |
|
1031 |
or:[(info at:#directory ifAbsent:nil) isNil]]]) |
|
1032 |
||
1033 |
"Created: / 25-10-2006 / 09:43:00 / cg" |
|
1034 |
! |
|
1035 |
||
2673 | 1036 |
defaultManager |
1037 |
^ manager |
|
1038 |
||
1039 |
"Created: / 22-12-2011 / 10:59:28 / cg" |
|
1040 |
! |
|
1041 |
||
2556
7d79bba1a1fa
Methods moved to an instance side (with forwarding from class side)
vrany
parents:
2539
diff
changeset
|
1042 |
nameOfExtensionsContainer |
1704 | 1043 |
^ 'extensions.st' |
1044 |
! |
|
1045 |
||
1375 | 1046 |
setPackageOfAllMethodsIn:aClass to:aPackage |
1047 |
"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
|
1048 |
|
1375 | 1049 |
|anyChange anyChangeHere| |
893 | 1050 |
|
1375 | 1051 |
anyChange := false. |
1052 |
aClass withAllPrivateClassesDo:[:eachClass | |
|
1053 |
anyChangeHere := false. |
|
1054 |
eachClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
|
1055 |
mthd package ~= aPackage ifTrue:[ |
|
1056 |
mthd setPackage:aPackage. |
|
1057 |
anyChangeHere := true. |
|
1058 |
]. |
|
1059 |
]. |
|
1060 |
anyChangeHere ifTrue:[ |
|
1061 |
eachClass changed:#projectOrganization |
|
1062 |
]. |
|
1063 |
anyChangeHere ifTrue:[anyChange := true]. |
|
893 | 1064 |
]. |
1375 | 1065 |
anyChange ifTrue:[ |
1066 |
Smalltalk changed:#projectOrganization |
|
1185 | 1067 |
]. |
1375 | 1068 |
^ anyChange |
893 | 1069 |
! |
1070 |
||
2193 | 1071 |
setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage |
1072 |
"make all methods belong to the classes project" |
|
1073 |
||
1074 |
aChangeSet do:[:eachChange | |
|
1075 |
eachChange isMethodCodeChange ifTrue:[ |
|
1076 |
eachChange changeMethod package ~= aPackage ifTrue:[ |
|
1077 |
Transcript showCR:'change package of ',eachChange changeMethod whoString. |
|
1078 |
eachChange changeMethod setPackage:aPackage. |
|
1079 |
] |
|
1080 |
] |
|
1081 |
]. |
|
1082 |
! |
|
1083 |
||
3134
93b8f75424c5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
2977
diff
changeset
|
1084 |
sourceCodeForExtensions:aCollectionOfMethods package:aPackageID forManager:scmManagerOrNil |
2847 | 1085 |
|s methodsSortedByName defClass| |
1086 |
||
3201
f0993e3fdf02
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3199
diff
changeset
|
1087 |
s := CharacterWriteStream on:(String new:1000). |
2847 | 1088 |
|
1089 |
s nextPutAll:'"{ Package: '''. |
|
1090 |
s nextPutAll:aPackageID asString. |
|
1091 |
s nextPutAll:''' }"'; nextPutChunkSeparator; cr; cr. |
|
1092 |
||
1093 |
"/ don't write a timestamp. Otherwise we would always generate a new version, even if nothing changed |
|
1094 |
"/ s nextPutAll:(Smalltalk timeStamp). |
|
1095 |
"/ s nextPutChunkSeparator. |
|
1096 |
"/ s cr; cr. |
|
1097 |
||
1098 |
"/ sort them by name (to avoid conflicts due to SCM merge) |
|
1099 |
methodsSortedByName := aCollectionOfMethods asOrderedCollection. |
|
1100 |
methodsSortedByName sort:[:a :b | |
|
1101 |
|clsA clsB| |
|
1102 |
||
1103 |
clsA := a mclass name. |
|
1104 |
clsB := b mclass name. |
|
1105 |
clsA < clsB ifTrue:[ |
|
1106 |
true |
|
1107 |
] ifFalse:[ |
|
1108 |
clsA > clsB ifTrue:[ |
|
1109 |
false |
|
1110 |
] ifFalse:[ |
|
1111 |
a selector < b selector |
|
1112 |
] |
|
1113 |
] |
|
1114 |
]. |
|
1115 |
methodsSortedByName do:[:aMethod | |
|
1116 |
aMethod mclass fileOutMethod:aMethod on:s. |
|
1117 |
s cr. |
|
1118 |
]. |
|
1119 |
||
3134
93b8f75424c5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
2977
diff
changeset
|
1120 |
scmManagerOrNil notNil ifTrue:[ |
93b8f75424c5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
2977
diff
changeset
|
1121 |
defClass := ProjectDefinition definitionClassForPackage:aPackageID. |
93b8f75424c5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
2977
diff
changeset
|
1122 |
defClass notNil ifTrue:[ |
93b8f75424c5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
2977
diff
changeset
|
1123 |
"/ make sure, an extensionVersion_XXX method is included... |
93b8f75424c5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
2977
diff
changeset
|
1124 |
"/ (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
|
1125 |
(methodsSortedByName contains:[:aMethod | aMethod selector == scmManagerOrNil nameOfVersionMethodForExtensions]) ifFalse:[ |
93b8f75424c5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
2977
diff
changeset
|
1126 |
s nextPutLine:('!!%1 class methodsFor:''documentation''!!' bindWith:defClass name). |
93b8f75424c5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
2977
diff
changeset
|
1127 |
s cr. |
93b8f75424c5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
2977
diff
changeset
|
1128 |
s nextChunkPut: |
93b8f75424c5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
2977
diff
changeset
|
1129 |
(scmManagerOrNil versionMethodTemplateForSmalltalkFor:(scmManagerOrNil nameOfVersionMethodForExtensions)). |
93b8f75424c5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
2977
diff
changeset
|
1130 |
s space; nextPutChunkSeparator; cr. |
93b8f75424c5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
2977
diff
changeset
|
1131 |
]. |
2847 | 1132 |
]. |
1133 |
]. |
|
1134 |
||
1135 |
^ s contents. |
|
1136 |
||
1137 |
"Created: / 25-07-2012 / 18:38:05 / cg" |
|
1138 |
! |
|
1139 |
||
1375 | 1140 |
sourceCodeManagerFor:aClass |
3370
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
1141 |
manager notNil ifTrue:[^ manager]. |
9953065c1ea1
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3354
diff
changeset
|
1142 |
^ self class sourceCodeManagerFor:aClass. |
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
1143 |
! |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
1144 |
|
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
1145 |
sourceCodeOfClass:aClass |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
1146 |
|stream src| |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
1147 |
|
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
1148 |
stream := '' writeStream. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
1149 |
Method flushSourceStreamCache. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
1150 |
aClass fileOutOn:stream withTimeStamp:false. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
1151 |
src := stream contents asString. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
1152 |
stream close. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
1153 |
^ src |
2326
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
1154 |
! |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
1155 |
|
3140
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1156 |
validateConsistencyOfPackage:aPackage |
3146
913e76c86499
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3140
diff
changeset
|
1157 |
^ self validateConsistencyOfPackage:aPackage doClasses:true doExtensions:true |
913e76c86499
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3140
diff
changeset
|
1158 |
! |
913e76c86499
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3140
diff
changeset
|
1159 |
|
4359 | 1160 |
validateConsistencyOfPackage:aPackageSymbolOrClass doClasses:doClasses doExtensions:doExtensions |
3692
ce00ca02e94a
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3683
diff
changeset
|
1161 |
|checker report msg answer dialog problems numProblems| |
3155
9c22d8b4315b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3153
diff
changeset
|
1162 |
|
9c22d8b4315b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3153
diff
changeset
|
1163 |
"/ also done by ProjectChecker... |
9c22d8b4315b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3153
diff
changeset
|
1164 |
"/ defClass := aPackage asPackageId projectDefinitionClass. |
3140
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1165 |
"/ defClass validateDescription. |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1166 |
|
3146
913e76c86499
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3140
diff
changeset
|
1167 |
checker := ProjectChecker new. |
913e76c86499
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3140
diff
changeset
|
1168 |
checker checkExtensionsOnly:(doClasses not and:[ doExtensions ]). |
4456 | 1169 |
checker skipCheckClasses:doClasses not. |
4359 | 1170 |
report := checker check: aPackageSymbolOrClass. |
3692
ce00ca02e94a
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3683
diff
changeset
|
1171 |
(report notNil and:[(problems := report problems) notEmptyOrNil]) ifTrue:[ |
ce00ca02e94a
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3683
diff
changeset
|
1172 |
numProblems := problems size. |
ce00ca02e94a
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3683
diff
changeset
|
1173 |
numProblems == 1 ifTrue:[ |
3140
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1174 |
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
|
1175 |
] ifFalse:[ |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1176 |
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
|
1177 |
]. |
4402 | 1178 |
answer := Dialog confirmWithRaiseAbortOnCancel: |
1179 |
(msg bindWith:numProblems |
|
1180 |
with:problems first label) withCRs. |
|
3140
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1181 |
answer == true ifTrue:[ |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1182 |
dialog := Tools::ProjectCheckerBrowser new. |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1183 |
dialog |
4359 | 1184 |
projectChecker: (ProjectChecker forPackage: aPackageSymbolOrClass); |
3692
ce00ca02e94a
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3683
diff
changeset
|
1185 |
problemList:problems; |
3140
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1186 |
showCancel:true; |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1187 |
openModal. |
3155
9c22d8b4315b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3153
diff
changeset
|
1188 |
|
3140
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1189 |
dialog accepted ifFalse:[ |
3433
eee3079d18d3
AbortSignal -> AbortOperationRequest
Stefan Vogel <sv@exept.de>
parents:
3425
diff
changeset
|
1190 |
AbortOperationRequest raiseRequest |
3140
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1191 |
]. |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1192 |
]. |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1193 |
]. |
4402 | 1194 |
|
1195 |
"Modified: / 15-02-2019 / 09:27:46 / Claus Gittinger" |
|
3140
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1196 |
! |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
1197 |
|
2326
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
1198 |
versionString:a isLessThan:b |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
1199 |
"compare two strings of the form: a.b.c..." |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
1200 |
|
4287 | 1201 |
|i1 i2 a1 b1 restA restB| |
1202 |
||
1203 |
restA := a. |
|
1204 |
restB := b. |
|
1205 |
[ |
|
1206 |
i1 := restA indexOf:$. . |
|
1207 |
i2 := restB indexOf:$. . |
|
1208 |
i1 == 0 ifTrue:[ |
|
1209 |
i1 := restA size + 1. |
|
1210 |
]. |
|
1211 |
i2 == 0 ifTrue:[ |
|
1212 |
i2 := restB size + 1. |
|
1213 |
]. |
|
1214 |
||
1215 |
a1 := Integer readFrom:(restA copyTo:i1-1). |
|
1216 |
b1 := Integer readFrom:(restB copyTo:i2-1). |
|
1217 |
a1 < b1 ifTrue:[^ true]. |
|
1218 |
a1 > b1 ifTrue:[^ false]. |
|
1219 |
restA := (restA copyFrom:i1+1). |
|
1220 |
restB := (restB copyFrom:i2+1). |
|
1221 |
restA isEmpty ifTrue:[ |
|
1222 |
^ restB notEmpty |
|
1223 |
]. |
|
1224 |
restB isEmpty ifTrue:[ |
|
1225 |
^ false |
|
1226 |
]. |
|
1227 |
] loop. |
|
2326
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
1228 |
|
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
1229 |
" |
4287 | 1230 |
self assert:(self default versionString:'12.34.66' isLessThan:'12.35.66'). |
1231 |
self assert:(self default versionString:'12.34.66' isLessThan:'12.35.67'). |
|
1232 |
self assert:(self default versionString:'11.34.66' isLessThan:'12.34.67'). |
|
1233 |
self assert:(self default versionString:'11.35.66' isLessThan:'12.34.67'). |
|
1234 |
self assert:(self default versionString:'13.35.66' isLessThan:'12.34.67') not. |
|
1235 |
self assert:(self default versionString:'13.35.66' isLessThan:'13.34.67') not. |
|
1236 |
self assert:(self default versionString:'13.35.66' isLessThan:'13.35.67'). |
|
1237 |
self assert:(self default versionString:'13.35.66' isLessThan:'13.35.65') not. |
|
1238 |
self assert:(self default versionString:'13.35.66.1' isLessThan:'13.35.66') not. |
|
1239 |
self assert:(self default versionString:'13.35.66' isLessThan:'13.35.66.1'). |
|
1240 |
self assert:(self default versionString:'13.35.66.2' isLessThan:'13.35.66.1') not. |
|
1241 |
self assert:(self default versionString:'13.35.66.1' isLessThan:'13.35.66.2'). |
|
2326
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
1242 |
" |
c0b55d3a8f08
added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents:
2325
diff
changeset
|
1243 |
|
4287 | 1244 |
"Modified (comment): / 06-12-2017 / 12:21:56 / cg" |
1375 | 1245 |
! ! |
1160 | 1246 |
|
4226 | 1247 |
!SourceCodeManagerUtilities methodsFor:'utilities-encoding'! |
1248 |
||
1249 |
guessEncodingOfFile:aFilename |
|
1250 |
"look for a string |
|
1251 |
encoding #name |
|
1252 |
or: |
|
1253 |
encoding: name |
|
1254 |
within the given buffer |
|
1255 |
(which is usually the first few bytes of a textFile). |
|
1256 |
If that's not found, use heuristics (in CharacterArray) to guess." |
|
1257 |
||
1258 |
<resource: #obsolete> |
|
1259 |
||
1260 |
self obsoleteMethodWarning:'ask CharacterEncoder'. |
|
1261 |
^ CharacterEncoder guessEncodingOfFile:aFilename |
|
1262 |
||
1263 |
" |
|
1264 |
SourceCodeManagerUtilities guessEncodingOfFile:'../../libview2/resources/ApplicationModel_de.rs' asFilename |
|
1265 |
SourceCodeManagerUtilities guessEncodingOfFile:'../../libview2/resources/ApplicationModel_ru.rs' asFilename |
|
1266 |
" |
|
1267 |
||
1268 |
"Modified (comment): / 14-01-2012 / 20:54:35 / cg" |
|
1269 |
! |
|
1270 |
||
1271 |
guessEncodingOfStream:aStream |
|
1272 |
"look for a string of the form |
|
1273 |
encoding #name |
|
1274 |
or: |
|
1275 |
encoding: name |
|
1276 |
in the first few bytes of aStream." |
|
1277 |
||
1278 |
<resource: #obsolete> |
|
1279 |
||
1280 |
self obsoleteMethodWarning:'ask CharacterEncoder'. |
|
1281 |
^ CharacterEncoder guessEncodingOfStream:aStream |
|
1282 |
! ! |
|
1283 |
||
1284 |
!SourceCodeManagerUtilities methodsFor:'utilities-scm'! |
|
973
b9004b37290a
check for #halt and #error when checking in
Claus Gittinger <cg@exept.de>
parents:
958
diff
changeset
|
1285 |
|
4201 | 1286 |
askForPackageVersion:question with:includeSubProjectsHolderOrNil knownTags:knownTags into:aTwoArgBlock |
1287 |
|dateFormat string dateOrNil symbolicNameOrNil| |
|
1288 |
||
1289 |
dateFormat := UserPreferences current dateInputFormat. |
|
1290 |
||
1291 |
Dialog |
|
1292 |
modifyingBoxWith:[:box | |
|
1293 |
includeSubProjectsHolderOrNil notNil ifTrue:[ |
|
1294 |
box verticalPanel |
|
1295 |
add:(CheckBox label:(resources string:'Include Subprojects') |
|
1296 |
model:includeSubProjectsHolderOrNil). |
|
1297 |
] |
|
1298 |
] |
|
1299 |
do:[ |
|
1300 |
|suggestion| |
|
1301 |
||
1302 |
suggestion := LastComparedTag. |
|
1303 |
suggestion isNil ifTrue:[ suggestion := Date today printStringFormat:dateFormat ]. |
|
1304 |
||
1305 |
string := Dialog |
|
1306 |
request:(resources string:question with:dateFormat) |
|
1307 |
initialAnswer:suggestion |
|
1308 |
list:knownTags. |
|
1309 |
]. |
|
1310 |
||
1311 |
string notEmptyOrNil ifTrue:[ |
|
1312 |
dateOrNil := Date readFrom:string printFormat:dateFormat onError:nil. |
|
1313 |
dateOrNil isNil ifTrue:[ |
|
1314 |
symbolicNameOrNil := string |
|
1315 |
]. |
|
1316 |
aTwoArgBlock value:dateOrNil value:symbolicNameOrNil. |
|
1317 |
]. |
|
1318 |
^ string |
|
1319 |
||
1320 |
"Created: / 04-02-2017 / 18:39:11 / cg" |
|
1321 |
"Modified: / 05-02-2017 / 04:24:23 / cg" |
|
1322 |
! |
|
1323 |
||
2691 | 1324 |
changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager |
4266 | 1325 |
"check-out an extension container from the source repository, |
1326 |
and return the methods there as a change set. |
|
1841
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1327 |
If askForRevision is false, check-out the newest version. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1328 |
Return a changeSet or nil (if any error occurred)" |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1329 |
|
2242
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1330 |
^ self |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1331 |
changeSetForExtensionMethodsForPackage:packageToCheckOut |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1332 |
revision:nil orAskForRevision:askForRevision |
2691 | 1333 |
usingManager:aSourceCodeManager |
1334 |
||
1335 |
"Created: / 29-12-2011 / 14:26:01 / cg" |
|
4266 | 1336 |
"Modified (comment): / 21-11-2017 / 13:08:54 / cg" |
2242
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1337 |
! |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1338 |
|
2691 | 1339 |
changeSetForExtensionMethodsForPackage:packageToCheckOut revision:revisionOrNil orAskForRevision:askForRevision usingManager:aSourceCodeManager |
2242
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1340 |
"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
|
1341 |
If askForRevision is false, check-out the newest version. |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1342 |
Return a changeSet or nil (if any error occurred)" |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1343 |
|
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
1344 |
|directory module file aStream sourceToLoad rev msg newestRev | |
1841
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1345 |
|
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1346 |
directory := packageToCheckOut asPackageId directory. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1347 |
module := packageToCheckOut asPackageId module. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1348 |
file := self nameOfExtensionsContainer. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1349 |
|
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1350 |
"/ |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1351 |
"/ ask for revision |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1352 |
"/ |
2242
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1353 |
(rev := revisionOrNil) isNil ifTrue:[ |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1354 |
newestRev := aSourceCodeManager newestRevisionInFile:file directory:directory module:module. |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1355 |
askForRevision ifFalse:[ |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1356 |
rev := newestRev ? '' |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1357 |
] ifTrue:[ |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1358 |
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
|
1359 |
newestRev notNil ifTrue:[ |
3261
7a585999dcef
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3259
diff
changeset
|
1360 |
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
|
1361 |
]. |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1362 |
|
2791 | 1363 |
rev := self |
2242
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1364 |
askForExistingRevision:msg |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1365 |
title:'CheckOut from repository' |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1366 |
class:nil |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1367 |
manager:aSourceCodeManager |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1368 |
module:module package:directory fileName:file. |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1369 |
|
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1370 |
rev isNil ifTrue:[ |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1371 |
^ nil "/ canceled |
8ea64354212d
added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
1372 |
]. |
1841
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1373 |
]. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1374 |
]. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1375 |
rev withoutSpaces isEmpty ifTrue:[ |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1376 |
rev := #newest. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1377 |
msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1378 |
] ifFalse:[ |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1379 |
msg := 'extracting previous %1'. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1380 |
]. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1381 |
aStream := aSourceCodeManager |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1382 |
streamForClass:nil |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1383 |
fileName:file |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1384 |
revision:rev |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1385 |
directory:directory |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1386 |
module:module |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1387 |
cache:true. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1388 |
|
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1389 |
aStream isNil ifTrue:[ |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1390 |
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
|
1391 |
^ nil |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1392 |
]. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1393 |
aStream class readErrorSignal handle:[:ex | |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1394 |
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
|
1395 |
aStream close. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1396 |
^ nil |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1397 |
] do:[ |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1398 |
sourceToLoad := aStream contents asString. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1399 |
]. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1400 |
aStream close. |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1401 |
^ ChangeSet fromStream:(sourceToLoad readStream). |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1402 |
|
2691 | 1403 |
"Created: / 29-12-2011 / 14:27:00 / cg" |
1841
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1404 |
! |
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
1405 |
|
2691 | 1406 |
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
|
1407 |
|moduleName directoryName containerName| |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
1408 |
|
1158 | 1409 |
moduleName := module allBold. |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
1410 |
directoryName := directory allBold. |
1158 | 1411 |
containerName := containerFileName allBold. |
1412 |
||
1413 |
"/ |
|
1414 |
"/ check for the container |
|
1415 |
"/ |
|
1787 | 1416 |
(mgr checkForExistingContainer:containerFileName inModule:module directory:directory) ifFalse:[ |
1158 | 1417 |
allowCreate ifFalse:[ |
1418 |
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
|
1419 |
with:containerName with:moduleName with:directoryName) withCRs. |
1158 | 1420 |
^ false |
1421 |
]. |
|
1422 |
(Dialog |
|
1423 |
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
|
1424 |
with:containerName with:moduleName with:directoryName) withCRs |
1158 | 1425 |
noLabel:'Cancel') |
1426 |
ifFalse:[ |
|
1427 |
^ false. |
|
1428 |
]. |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
1429 |
(mgr createContainerForText:'' inModule:module package:directory container:containerFileName) ifFalse:[ |
1158 | 1430 |
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
|
1431 |
with:containerName with:moduleName with:directoryName). |
1158 | 1432 |
^ false. |
1433 |
] |
|
1434 |
]. |
|
1435 |
^ true. |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
1436 |
|
1787 | 1437 |
"Modified: / 13-09-2006 / 18:24:57 / cg" |
2691 | 1438 |
"Created: / 29-12-2011 / 14:35:36 / cg" |
1158 | 1439 |
! |
1440 |
||
2691 | 1441 |
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
|
1442 |
|moduleNameBold directoryNameBold| |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
1443 |
|
1704 | 1444 |
moduleNameBold := module allBold. |
1445 |
directoryNameBold := directory allBold. |
|
1158 | 1446 |
|
1447 |
"/ |
|
1704 | 1448 |
"/ check for the directory |
1158 | 1449 |
"/ |
1840 | 1450 |
(mgr checkForExistingModule:module directory:directory) ifFalse:[ |
1158 | 1451 |
allowCreate ifFalse:[ |
1704 | 1452 |
self warn:(resources string:'A directory for ''%1'' does not exist in module ''%2''' |
1453 |
with:directoryNameBold with:moduleNameBold) withCRs. |
|
1158 | 1454 |
^ false |
1455 |
]. |
|
1456 |
(Dialog |
|
2651 | 1457 |
confirm:(resources stringWithCRs:'''%1'' is a new directory in module ''%2''.\\Create it in %3?' |
1458 |
with:directoryNameBold |
|
1459 |
with:moduleNameBold |
|
1460 |
with:mgr managerTypeName) |
|
1158 | 1461 |
noLabel:'Cancel') |
1462 |
ifFalse:[ |
|
1463 |
^ false. |
|
1464 |
]. |
|
1840 | 1465 |
(mgr createModule:module directory:directory) ifFalse:[ |
2651 | 1466 |
self warn:(resources stringWithCRs:'Cannot create new directory: ''%1'' in module ''%2'' in %3' |
1467 |
with:directoryNameBold |
|
1468 |
with:moduleNameBold |
|
1469 |
with:mgr managerTypeName). |
|
1158 | 1470 |
^ false. |
1471 |
] |
|
1472 |
]. |
|
1473 |
^ true. |
|
1840 | 1474 |
|
2651 | 1475 |
"Modified: / 21-12-2011 / 18:46:11 / cg" |
2691 | 1476 |
"Created: / 29-12-2011 / 14:35:20 / cg" |
1158 | 1477 |
! |
1478 |
||
2691 | 1479 |
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
|
1480 |
|moduleName answer| |
1158 | 1481 |
|
1482 |
(mgr checkForExistingModule:module) ifFalse:[ |
|
1483 |
moduleName := module allBold. |
|
1484 |
||
1485 |
allowCreate ifFalse:[ |
|
1423 | 1486 |
self warn:(resources stringWithCRs:'A module named ''%1'' does not exist in the repository' |
1487 |
with:moduleName) . |
|
1158 | 1488 |
^ false |
1489 |
]. |
|
2325 | 1490 |
AbortAllOperationWantedQuery query ifTrue:[ |
1483 | 1491 |
answer := Dialog |
1492 |
confirmWithCancel:(resources stringWithCRs:'''%1'' is a new module.\\create it ?' with:moduleName) |
|
1493 |
labels:(resources array:#('Cancel All' 'Cancel' 'Yes' )). |
|
1494 |
answer isNil ifTrue:[ AbortAllOperationRequest raise ]. |
|
1495 |
] ifFalse:[ |
|
1496 |
answer := Dialog |
|
2651 | 1497 |
confirm:(resources stringWithCRs:'''%1'' is a new module in %2.\\create it ?' with:moduleName with:mgr managerTypeName) |
1483 | 1498 |
noLabel:'Cancel' |
1499 |
]. |
|
1500 |
answer ifFalse:[ ^ false]. |
|
1158 | 1501 |
|
1502 |
(mgr createModule:module) ifFalse:[ |
|
2651 | 1503 |
self warn:(resources stringWithCRs:'Cannot create new module: ''%1'' in %2' with:moduleName with:mgr managerTypeName) . |
1158 | 1504 |
^ false. |
1505 |
] |
|
1506 |
]. |
|
1507 |
^ true. |
|
2325 | 1508 |
|
2651 | 1509 |
"Modified: / 21-12-2011 / 18:42:03 / cg" |
2691 | 1510 |
"Created: / 29-12-2011 / 14:35:06 / cg" |
1158 | 1511 |
! |
1512 |
||
3534
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1513 |
checkOutPackages: packages askForRevision: askForRevision |
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1514 |
"Updates code of given packages (loaded in the image) to a specific revision. |
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1515 |
If `askForRevision` is true, then user is asked to specify to which revision to |
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1516 |
update. If `askForRevision` is false, then packages are updated to a 'newest' |
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1517 |
revision. |
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1518 |
|
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1519 |
NOTE: Definition of `newest` revision may vary. For SCMs which allows for multiple |
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1520 |
heads, it is not clear which one it is. In that case, even if `askForRevision` is |
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1521 |
false, this method may result in user interation, asking user to select which of the |
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1522 |
newest she wants. |
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1523 |
|
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1524 |
NOTE: Naming is bit confusing, it should be something like #updatePackages:ask... |
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1525 |
but to keep this in line with other methods, we use #checkOutPackages" |
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1526 |
|
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1527 |
^ self subclassResponsibility. |
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1528 |
|
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1529 |
"Created: / 01-04-2014 / 21:50:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1530 |
! |
914309d517ed
class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3514
diff
changeset
|
1531 |
|
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1532 |
checkinClass:aClass |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1533 |
"check a class into the source repository. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1534 |
Asks interactively for a log-message." |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1535 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1536 |
^ self checkinClass:aClass withInfo:nil |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1537 |
! |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1538 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1539 |
checkinClass:aClass withInfo:aLogInfoOrNil |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1540 |
"check a class into the source repository. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1541 |
If the argument, aLogInfoOrNil isNil, ask interactively for a log-message." |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1542 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1543 |
^ self checkinClass:aClass withInfo:aLogInfoOrNil withCheck:true |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1544 |
! |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1545 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1546 |
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1547 |
"check a class into the source repository. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1548 |
If the argument, aLogInfoOrNil isNil, ask interactively for log-message. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1549 |
If doCheckClass is true, the class is checked for send of halts etc." |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1550 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1551 |
^ self |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1552 |
checkinClass:aClass |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1553 |
withInfo:aLogInfoOrNil |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1554 |
withCheck:doCheckClass |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1555 |
usingManager:(self sourceCodeManagerFor:aClass) |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1556 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1557 |
"Modified: / 21-12-2011 / 18:19:55 / cg" |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1558 |
! |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1559 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1560 |
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClassHolder usingManager:managerOrNil |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1561 |
"check a class into the source repository. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1562 |
If the argument, aLogInfoOrNil isNil, ask interactively for log-message. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1563 |
If doCheckClass is true, the class is checked for send of halts etc." |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1564 |
|
3992 | 1565 |
^ self |
1566 |
checkinClass:aClass |
|
1567 |
withInfo:aLogInfoOrNil withCheck:doCheckClassHolder |
|
1568 |
usingManager:managerOrNil |
|
1569 |
confirmNewContainer:confirmNewFiles |
|
1570 |
! |
|
1571 |
||
1572 |
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClassHolder usingManager:managerOrNil confirmNewContainer:confirmNewContainer |
|
1573 |
"check a class into the source repository. |
|
1574 |
If the argument, aLogInfoOrNil isNil, ask interactively for log-message. |
|
1575 |
If doCheckClass is true, the class is checked for send of halts etc." |
|
1576 |
||
4276 | 1577 |
^ self |
1578 |
checkinClass:aClass |
|
1579 |
withInfo:aLogInfoOrNil withCheck:doCheckClassHolder |
|
1580 |
usingManager:managerOrNil confirmNewContainer:confirmNewContainer |
|
1581 |
onBranch:nil |
|
1582 |
||
1583 |
"Created: / 21-12-2011 / 18:19:14 / cg" |
|
1584 |
"Modified: / 05-12-2017 / 20:26:38 / cg" |
|
1585 |
! |
|
1586 |
||
1587 |
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClassHolder usingManager:managerOrNil confirmNewContainer:confirmNewContainer onBranch:branchNameOrNil |
|
1588 |
"check a class into the source repository. |
|
1589 |
If the argument, aLogInfoOrNil isNil, ask interactively for log-message. |
|
1590 |
If doCheckClass is true, the class is checked for send of halts etc." |
|
1591 |
||
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1592 |
|logMessage checkinInfo mgr pri| |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1593 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1594 |
aClass isLoaded ifFalse:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1595 |
self information:(resources string:'Cannot checkin unloaded classes (%1)' with:aClass name). |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1596 |
^ false. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1597 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1598 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1599 |
mgr := managerOrNil. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1600 |
mgr isNil ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1601 |
mgr := self sourceCodeManagerFor:aClass. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1602 |
mgr isNil ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1603 |
^ false |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1604 |
] |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1605 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1606 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1607 |
self ensureCorrectVersionMethodsInClass:aClass usingManager:mgr. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1608 |
mgr supportsCheckinLogMessages ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1609 |
(self |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1610 |
getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1611 |
forClass:aClass |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1612 |
valuesInto:[:logMessageRet :checkinInfoRet | |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1613 |
logMessage := logMessageRet. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1614 |
checkinInfo := checkinInfoRet. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1615 |
] |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1616 |
) ifFalse:[^ false]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1617 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1618 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1619 |
(self classIsNotYetInRepository:aClass withManager:mgr) ifTrue:[ |
3992 | 1620 |
(self createSourceContainerForClass:aClass usingManager:mgr confirmNewContainer:confirmNewContainer) ifFalse:[ |
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1621 |
"/ self warn:'did not create a container for ''' , aClass name , ''''. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1622 |
^ false |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1623 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1624 |
^ true. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1625 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1626 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1627 |
self activityNotification:(resources string:'checking in %1' with:aClass name). |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1628 |
pri := Processor activePriority. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1629 |
Processor activeProcess withPriority:pri-1 to:pri |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1630 |
do:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1631 |
|revision aborted freshCreated| |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1632 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1633 |
freshCreated := false. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1634 |
revision := aClass revision. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1635 |
revision isNil ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1636 |
mgr isContainerBased ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1637 |
"/ mhmh - check if it has a container. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1638 |
(mgr checkForExistingContainerForClass:aClass) ifFalse:[ |
3992 | 1639 |
(self createSourceContainerForClass:aClass usingManager:mgr confirmNewContainer:confirmNewContainer) ifFalse:[ |
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1640 |
self warn:'Did not create/change repository container for ''' , aClass name allBold , ''''. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1641 |
^ false. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1642 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1643 |
freshCreated := true. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1644 |
] |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1645 |
] |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1646 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1647 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1648 |
doCheckClassHolder value ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1649 |
"/ check if the class contains halts, error-sends etc. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1650 |
(self checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:doCheckClassHolder) ifFalse:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1651 |
^ false |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1652 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1653 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1654 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1655 |
freshCreated ifFalse:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1656 |
aborted := false. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1657 |
AbortOperationRequest handle:[:ex | |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1658 |
aborted := true. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1659 |
ex return. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1660 |
] do:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1661 |
|checkinState cause| |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1662 |
checkinState := false. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1663 |
cause := ''. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1664 |
[ |
4276 | 1665 |
checkinState := mgr checkinClass:aClass logMessage:logMessage onBranch:branchNameOrNil |
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1666 |
] on:SourceCodeManagerError do:[:ex| |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1667 |
cause := ex description. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1668 |
"/ ex proceed. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1669 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1670 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1671 |
checkinState ifFalse:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1672 |
Transcript showCR:'checkin of ''' , aClass name , ''' failed - ', cause. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1673 |
self warn:(resources stringWithCRs:'Checkin of "%1" failed\\' with:aClass name allBold),cause. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1674 |
AbortOperationRequest raise. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1675 |
"/ ^ false. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1676 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1677 |
checkinInfo notNil ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1678 |
checkinInfo isStable ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1679 |
"set stable tag for class that has been checked in" |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1680 |
self tagClass:aClass as:#stable. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1681 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1682 |
checkinInfo tagIt ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1683 |
"set any additional tags for the class that has been checked in" |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1684 |
(checkinInfo tag asCollectionOfSubstringsSeparatedByAny:',;') do:[:eachTag | |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1685 |
self tagClass:aClass as:eachTag withoutSeparators. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1686 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1687 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1688 |
CVSSourceCodeManager recentTag:checkinInfo tag. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1689 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1690 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1691 |
aborted ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1692 |
Transcript showCR:'Checkin of ''' , aClass name , ''' aborted'. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1693 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1694 |
AbortAllOperationWantedQuery query ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1695 |
(Dialog |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1696 |
confirm:(resources stringWithCRs:'Checkin of "%1" aborted.\\Cancel all ?' with:aClass name) |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1697 |
default:false) |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1698 |
ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1699 |
AbortAllOperationRequest raise. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1700 |
] |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1701 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1702 |
^ false. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1703 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1704 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1705 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1706 |
^ true |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1707 |
|
4276 | 1708 |
"Created: / 05-12-2017 / 20:26:09 / cg" |
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1709 |
! |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1710 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1711 |
checkinClasses:aCollectionOfClass |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1712 |
"check a collection of classes into the source repository. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1713 |
Asks interactively for log-message." |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1714 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1715 |
^ self checkinClasses:aCollectionOfClass withInfo:nil |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1716 |
! |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1717 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1718 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1719 |
"check a bunch of classes into the source repository. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1720 |
If the argument, aLogInfoOrNil isNil, ask interactively for log-message." |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1721 |
|
4276 | 1722 |
^ self checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil onBranch:nil |
1723 |
||
1724 |
"Modified: / 05-12-2017 / 20:15:25 / cg" |
|
1725 |
! |
|
1726 |
||
1727 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil onBranch:branchNameOrNil |
|
1728 |
"check a bunch of classes into the source repository. |
|
1729 |
If the argument, aLogInfoOrNil isNil, ask interactively for log-message." |
|
1730 |
||
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1731 |
|checkClassWhenCheckingInHolder| |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1732 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1733 |
checkClassWhenCheckingInHolder := ValueHolder with:(UserPreferences current at:#checkClassesWhenCheckingIn ifAbsent:true). |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1734 |
checkClassWhenCheckingInHolder |
4276 | 1735 |
onChangeEvaluate:[ |
1736 |
UserPreferences current at:#checkClassesWhenCheckingIn put:checkClassWhenCheckingInHolder value |
|
1737 |
]. |
|
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1738 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1739 |
^ self |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1740 |
checkinClasses:aCollectionOfClasses |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1741 |
withInfo:aLogInfoOrNil |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1742 |
withCheck:checkClassWhenCheckingInHolder |
4276 | 1743 |
onBranch:branchNameOrNil |
1744 |
||
1745 |
"Created: / 05-12-2017 / 20:15:09 / cg" |
|
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1746 |
! |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1747 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1748 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1749 |
"check a bunch of classes into the source repository. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1750 |
If the argument, aLogInfoOrStringNil isNil, ask interactively for log-message." |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1751 |
|
4276 | 1752 |
^ self checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder onBranch:nil |
1753 |
||
1754 |
"Modified: / 05-12-2017 / 20:16:18 / cg" |
|
1755 |
! |
|
1756 |
||
1757 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder onBranch:branchNameOrNil |
|
1758 |
"check a bunch of classes into the source repository. |
|
1759 |
If the argument, aLogInfoOrStringNil isNil, ask interactively for log-message." |
|
1760 |
||
1761 |
^ self checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder usingManager:nil onBranch:branchNameOrNil |
|
1762 |
||
1763 |
"Created: / 05-12-2017 / 20:15:59 / cg" |
|
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1764 |
! |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1765 |
|
3818
25607a4f1e98
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3814
diff
changeset
|
1766 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder usingManager:aManagerOrNil |
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1767 |
"check a bunch of classes into the source repository. |
3818
25607a4f1e98
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3814
diff
changeset
|
1768 |
If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message." |
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1769 |
|
3992 | 1770 |
^ self |
4276 | 1771 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder usingManager:aManagerOrNil |
1772 |
onBranch:nil |
|
1773 |
||
1774 |
"Modified: / 05-12-2017 / 20:17:32 / cg" |
|
3992 | 1775 |
! |
1776 |
||
1777 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder |
|
1778 |
usingManager:aManagerOrNil confirmNewContainer:confirmNewContainer |
|
4276 | 1779 |
|
1780 |
"check a bunch of classes into the source repository. |
|
1781 |
If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message." |
|
1782 |
||
1783 |
^ self |
|
1784 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder |
|
1785 |
usingManager:aManagerOrNil confirmNewContainer:confirmNewContainer onBranch:nil |
|
1786 |
||
1787 |
"Created: / 21-12-2011 / 18:24:25 / cg" |
|
1788 |
"Modified (format): / 05-12-2017 / 20:24:09 / cg" |
|
1789 |
! |
|
1790 |
||
1791 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder |
|
1792 |
usingManager:aManagerOrNil confirmNewContainer:confirmNewContainer onBranch:branchNameOrNil |
|
3992 | 1793 |
"check a bunch of classes into the source repository. |
1794 |
If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message." |
|
1795 |
||
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1796 |
|classes allClasses checkinInfoOrString yesOrNoToAll unchangedClasses| |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1797 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1798 |
"/ ignore private classes |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1799 |
classes := aCollectionOfClasses select:[:aClass | aClass owningClass isNil]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1800 |
classes isEmpty ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1801 |
self information:'Only private classes given - nothing checked in.'. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1802 |
^ self |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1803 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1804 |
classes := classes select:[:aClass | aClass isLoaded]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1805 |
classes isEmpty ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1806 |
self information:'Only unloaded classes given - nothing checked in.'. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1807 |
^ self |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1808 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1809 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1810 |
classes size == 1 ifTrue:[ |
3992 | 1811 |
self |
1812 |
checkinClass:classes first |
|
1813 |
withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder |
|
1814 |
usingManager:aManagerOrNil |
|
4281 | 1815 |
confirmNewContainer:confirmNewContainer |
1816 |
onBranch:branchNameOrNil. |
|
3992 | 1817 |
^ self |
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1818 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1819 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1820 |
"ask once, for all classes" |
3818
25607a4f1e98
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3814
diff
changeset
|
1821 |
aLogInfoOrStringOrNil isNil ifTrue:[ |
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1822 |
checkinInfoOrString := self |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1823 |
getCheckinInfoFor:(resources string:'%1 classes to checkin' with:aCollectionOfClasses size) |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1824 |
initialAnswer:nil |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1825 |
withQuickOption:true. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1826 |
checkinInfoOrString isNil ifTrue:[^ self]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1827 |
] ifFalse:[ |
3818
25607a4f1e98
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3814
diff
changeset
|
1828 |
checkinInfoOrString := aLogInfoOrStringOrNil. |
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1829 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1830 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1831 |
allClasses := classes. |
3818
25607a4f1e98
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3814
diff
changeset
|
1832 |
(checkinInfoOrString isString not and:[checkinInfoOrString quickCheckIn]) ifTrue:[ |
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1833 |
"/ not only the one's in the changeSet; |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1834 |
"/ also those which have not been checked in before. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1835 |
classes := classes select:[:each | each hasUnsavedChanges or:[ (each revisionOfManager:aManagerOrNil) isNil ]]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1836 |
classes isEmpty ifTrue:[ Dialog information:'no changes to checkin (quickCheckIn)' ] |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1837 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1838 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1839 |
"abortAll is handled, and also asked for here!!" |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1840 |
AbortAllOperationRequest handleAndAnswerQueryIn:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1841 |
classes notEmpty ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1842 |
self yesToAllNotification handle:[:ex | |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1843 |
yesOrNoToAll := ex parameter. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1844 |
ex proceed |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1845 |
] do:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1846 |
self yesToAllQuery handle:[:ex | |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1847 |
ex proceedWith:yesOrNoToAll |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1848 |
] do:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1849 |
classes do:[:aClass | |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1850 |
self activityNotification:(resources string:'checking in %1' with:aClass name). |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1851 |
"/ ca does not want boxes to pop up all over ... |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1852 |
UserInformation handle:[:ex | |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1853 |
Transcript showCR:ex description. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1854 |
ex proceed. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1855 |
] do:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1856 |
AbortOperationRequest catch:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1857 |
self |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1858 |
checkinClass:aClass |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1859 |
withInfo:checkinInfoOrString |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1860 |
withCheck:doCheckClassesHolder |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1861 |
usingManager:aManagerOrNil |
3992 | 1862 |
confirmNewContainer:confirmNewContainer |
4281 | 1863 |
onBranch:branchNameOrNil |
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1864 |
] |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1865 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1866 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1867 |
] |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1868 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1869 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1870 |
|
3818
25607a4f1e98
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3814
diff
changeset
|
1871 |
(checkinInfoOrString isString not and:[ (checkinInfoOrString isStable or:[checkinInfoOrString tagIt]) ]) |
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1872 |
ifTrue:[ |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1873 |
"/mhmh - but tag should be set on all (even unchanged ones) |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1874 |
"/ the other onces have already been tagged |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1875 |
unchangedClasses := allClasses reject:[:eachClass | (classes includes:eachClass)]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1876 |
|
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1877 |
"mhmh - could still have to tag them" |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1878 |
checkinInfoOrString isStable ifTrue:[ |
4281 | 1879 |
self tagClasses:unchangedClasses as:#stable. |
1880 |
"/ unchangedClasses do:[:eachClass | |
|
1881 |
"/ self tagClass:eachClass as:#stable. |
|
1882 |
"/ ]. |
|
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1883 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1884 |
checkinInfoOrString tagIt ifTrue:[ |
4281 | 1885 |
self tagClasses:unchangedClasses as:(checkinInfoOrString tag). |
1886 |
"/ unchangedClasses do:[:eachClass | |
|
1887 |
"/ self tagClass:eachClass as:(checkinInfoOrString tag). |
|
1888 |
"/ ]. |
|
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1889 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1890 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1891 |
]. |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1892 |
|
4276 | 1893 |
"Created: / 05-12-2017 / 20:23:37 / cg" |
4281 | 1894 |
"Modified: / 05-12-2017 / 23:34:56 / cg" |
4276 | 1895 |
! |
1896 |
||
1897 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder usingManager:aManagerOrNil onBranch:branchNameOrNil |
|
1898 |
"check a bunch of classes into the source repository. |
|
1899 |
If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message." |
|
1900 |
||
1901 |
^ self |
|
1902 |
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder |
|
1903 |
usingManager:aManagerOrNil |
|
1904 |
confirmNewContainer:confirmNewFiles |
|
1905 |
onBranch:branchNameOrNil |
|
1906 |
||
1907 |
"Created: / 05-12-2017 / 20:17:16 / cg" |
|
1908 |
! |
|
1909 |
||
1910 |
checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages |
|
1911 |
^ self |
|
1912 |
checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions |
|
1913 |
buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages |
|
1914 |
onBranch:nil |
|
1915 |
||
1916 |
"Created: / 05-12-2017 / 20:02:49 / cg" |
|
1917 |
! |
|
1918 |
||
1919 |
checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages onBranch:branchNameOrNil |
|
1920 |
self subclassResponsibility |
|
1921 |
||
1922 |
"Created: / 05-12-2017 / 20:02:34 / cg" |
|
3602
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1923 |
! |
d5a67c9e51dd
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3594
diff
changeset
|
1924 |
|
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1925 |
checkoutClass:aClass askForMerge:askForMerge |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1926 |
"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
|
1927 |
|
1006 | 1928 |
self |
1929 |
checkoutClass:aClass |
|
1930 |
askForRevision:true |
|
1931 |
askForMerge:askForMerge |
|
1932 |
! |
|
1933 |
||
1934 |
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge |
|
1935 |
"check-out a class from the source repository. |
|
1936 |
If askForRevision is false, check-out the newest version." |
|
1937 |
||
2013
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1938 |
self |
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1939 |
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge |
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1940 |
askForConfirmation:true |
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1941 |
! |
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1942 |
|
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1943 |
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge askForConfirmation:askForConfirmation |
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1944 |
"check-out a class from the source repository. |
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1945 |
If askForRevision is false, check-out the newest version." |
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
1946 |
|
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
1947 |
|mgr sourceInfo |
1339 | 1948 |
currentClass inChangeSet |
1055
f44b12442c58
version update after load from rep.
Claus Gittinger <cg@exept.de>
parents:
1054
diff
changeset
|
1949 |
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
|
1950 |
nm msg rev2 newestRev |
1030 | 1951 |
containerModule containerPackage containerFile rslt |
1952 |
pkg listHere listRep diffSet |
|
1054 | 1953 |
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
|
1954 |
changedClasses default versionMethodsHere versionMethodsRep changedClassDefinitions |
3ca8838014ee
dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents:
1877
diff
changeset
|
1955 |
wasInChangeSetBefore| |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1956 |
|
1189
fdc5e747c184
refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents:
1185
diff
changeset
|
1957 |
aClass isNil ifTrue:[self error:'nil class']. |
1158 | 1958 |
|
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1959 |
currentClass := aClass theNonMetaclass. |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1960 |
|
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1961 |
nm := currentClass name. |
1189
fdc5e747c184
refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents:
1185
diff
changeset
|
1962 |
mgr := self sourceCodeManagerFor:currentClass. |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1963 |
mgr isNil ifTrue:[ |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1964 |
^ self |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
1965 |
]. |
1084 | 1966 |
|
1967 |
sourceInfo := mgr sourceInfoOfClass:currentClass. |
|
1968 |
sourceInfo notNil ifTrue:[ |
|
2209
e3a4510c45f2
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
2200
diff
changeset
|
1969 |
currentClass package ~= PackageId noProjectID ifTrue:[ |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
1970 |
containerPackage := mgr directoryFromSourceInfo:sourceInfo. |
1084 | 1971 |
containerModule := mgr moduleFromSourceInfo:sourceInfo. |
1972 |
]. |
|
1973 |
containerFile := mgr containerFromSourceInfo:sourceInfo. |
|
1974 |
]. |
|
1975 |
||
989
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1976 |
currentClass isLoaded ifTrue:[ |
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1977 |
rev := currentClass binaryRevision. |
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1978 |
rev2 := currentClass revision. |
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1979 |
rev isNil ifTrue:[ |
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1980 |
rev := rev2 |
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1981 |
]. |
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
1982 |
rev isNil ifTrue:[ |
1084 | 1983 |
pkg := currentClass package. |
2209
e3a4510c45f2
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
2200
diff
changeset
|
1984 |
(pkg notNil and:[pkg ~= PackageId noProjectID]) ifTrue:[ |
1019 | 1985 |
containerModule := pkg upTo:$:. |
1986 |
containerPackage := pkg copyFrom:(containerModule size + 2). |
|
1987 |
]. |
|
1988 |
containerModule size == 0 ifTrue:[ |
|
2791 | 1989 |
containerModule := (self class lastModule ) ? Project current repositoryModule. |
1019 | 1990 |
]. |
1991 |
containerPackage size == 0 ifTrue:[ |
|
2791 | 1992 |
containerPackage := (self class lastPackage ) ? Project current package. |
1019 | 1993 |
]. |
1030 | 1994 |
answer := self confirmWithCancel:(resources |
1035 | 1995 |
string:'The class %3 seems to have no (valid) repository information.\\I assume you want to check it out from: %1/%2.' |
1030 | 1996 |
with:containerModule allBold |
1035 | 1997 |
with:containerPackage allBold |
1084 | 1998 |
with:currentClass name allBold) withCRs. |
1030 | 1999 |
answer isNil ifTrue:[^ self "cancelled"]. |
2000 |
answer ifFalse:[ |
|
2791 | 2001 |
rslt := self |
1030 | 2002 |
askForContainer:(resources string:'The class seems to have no repository information.\\Do you want to checkOut from an existing containers contents ?') |
2003 |
title:'Container to load from' note:nil |
|
2004 |
initialModule:containerModule |
|
2005 |
initialPackage:containerPackage |
|
1158 | 2006 |
initialFileName:(currentClass nameWithoutPrefix , '.st') |
1030 | 2007 |
forNewContainer:false. |
1084 | 2008 |
|
1030 | 2009 |
rslt isNil ifTrue:[ |
2010 |
"/ canel |
|
2011 |
^ self |
|
2012 |
]. |
|
2013 |
containerModule := "lastModule :=" rslt at:#module. |
|
2014 |
containerPackage := "lastPackage :=" rslt at:#package. |
|
2015 |
containerFile := rslt at:#fileName. |
|
2016 |
]. |
|
1019 | 2017 |
|
2791 | 2018 |
"/ rslt := self |
1019 | 2019 |
"/ askForContainer:(resources string:'The class seems to have no (valid) repository information.\\Do you want to check it out from an existing container ?') |
2020 |
"/ title:'Container to checkOut' note:nil |
|
2021 |
"/ initialModule:containerModule |
|
2022 |
"/ initialPackage:containerPackage |
|
2023 |
"/ initialFileName:(currentClass name , '.st'). |
|
1030 | 2024 |
"/ forNewContainer:false. |
1019 | 2025 |
"/ rslt isNil ifTrue:[^ self]. |
2026 |
"/ self warn:(resources string:'Class %1 seems to be not yet in the repository' with:currentClass name allBold). |
|
2027 |
"/ ^ self |
|
989
bb70a0f30e98
care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents:
987
diff
changeset
|
2028 |
]. |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
2029 |
]. |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
2030 |
|
1966 | 2031 |
containerFile isNil ifTrue:[ |
2032 |
containerFile := currentClass classFilename. |
|
2033 |
]. |
|
2034 |
||
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
2035 |
"/ |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
2036 |
"/ 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
|
2037 |
"/ |
1978 | 2038 |
containerModule isNil ifTrue:[ |
1982 | 2039 |
containerModule := Dialog request:(resources |
2040 |
stringWithCRs:'Missing Module Information for CheckOut of "%1".\\Module:' |
|
2041 |
with:aClass name allBold). |
|
1978 | 2042 |
containerModule isEmptyOrNil ifTrue:[^ self]. |
2043 |
]. |
|
2044 |
containerPackage isNil ifTrue:[ |
|
1982 | 2045 |
containerPackage := Dialog request:(resources |
2046 |
stringWithCRs:'Missing Package Information for CheckOut of "%1".\\Package:' |
|
2047 |
with:aClass name allBold). |
|
1978 | 2048 |
containerPackage isEmptyOrNil ifTrue:[^ self]. |
2049 |
]. |
|
2050 |
||
1084 | 2051 |
newestRev := mgr newestRevisionInFile:containerFile directory:containerPackage module:containerModule. |
1006 | 2052 |
askForRevision ifFalse:[ |
2053 |
rev := newestRev ? '' |
|
2054 |
] ifTrue:[ |
|
1019 | 2055 |
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
|
2056 |
rev notNil ifTrue:[ |
1006 | 2057 |
msg := msg , '\\' , (resources string:'Current ''%1'' is based upon rev %2.' |
1019 | 2058 |
with:nm allBold with:rev). |
1006 | 2059 |
(rev2 notNil and:[rev2 ~= rev]) ifTrue:[ |
2539
abce5c41eef8
comment/format in: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2522
diff
changeset
|
2060 |
msg := msg , '\' , (resources string:'And has been checked into the repository as %1.' with:rev2) |
1006 | 2061 |
] |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
2062 |
]. |
1006 | 2063 |
newestRev notNil ifTrue:[ |
2539
abce5c41eef8
comment/format in: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2522
diff
changeset
|
2064 |
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
|
2065 |
]. |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
2066 |
|
2791 | 2067 |
rev := self |
1006 | 2068 |
askForExistingRevision:msg |
2069 |
title:'CheckOut from repository' |
|
2070 |
class:currentClass. |
|
2071 |
rev isNil ifTrue:[ |
|
1339 | 2072 |
^ self "/ canceled |
987 | 2073 |
]. |
1006 | 2074 |
]. |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
2075 |
|
1006 | 2076 |
rev withoutSpaces isEmpty ifTrue:[ |
2077 |
msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'. |
|
2078 |
"/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm. |
|
2079 |
aStream := mgr getSourceStreamFor:currentClass revision:newestRev. |
|
2080 |
revString := '(newest: ' , (newestRev ? '???') , ')'. |
|
2081 |
] ifFalse:[ |
|
2082 |
msg := 'extracting previous %1'. |
|
1084 | 2083 |
"/ aStream := mgr getSourceStreamFor:currentClass revision:rev. |
2084 |
"/ revString := rev |
|
2085 |
aStream := mgr |
|
2086 |
streamForClass:currentClass |
|
2087 |
fileName:containerFile |
|
2088 |
revision:rev |
|
2089 |
directory:containerPackage |
|
2090 |
module:containerModule |
|
2091 |
cache:true. |
|
1006 | 2092 |
]. |
996 | 2093 |
|
1006 | 2094 |
aStream isNil ifTrue:[ |
1800
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
2095 |
self warn:(resources string:'Could not extract source of %1 from repository' with:aClass name allBold). |
1006 | 2096 |
^ self |
2097 |
]. |
|
2098 |
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
|
2099 |
self warn:('Read error while reading extracted source\\' , ex description) withCRs. |
1006 | 2100 |
aStream close. |
2101 |
^ self |
|
2102 |
] do:[ |
|
2103 |
sourceToLoad := aStream contents asString. |
|
2104 |
]. |
|
2105 |
aStream close. |
|
987 | 2106 |
|
1919 | 2107 |
wasInChangeSetBefore := ChangeSet current includesChangeForClassOrMetaclass:currentClass. |
1879
3ca8838014ee
dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents:
1877
diff
changeset
|
2108 |
|
1006 | 2109 |
currentClass isLoaded ifFalse:[ |
2110 |
rev = newestRev ifTrue:[ |
|
2111 |
currentClass autoload. |
|
996 | 2112 |
] ifFalse:[ |
1006 | 2113 |
sourceToLoad readStream fileIn. |
996 | 2114 |
]. |
1879
3ca8838014ee
dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents:
1877
diff
changeset
|
2115 |
wasInChangeSetBefore ifFalse:[ |
3ca8838014ee
dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents:
1877
diff
changeset
|
2116 |
ChangeSet current condenseChangesForClass:currentClass. |
3ca8838014ee
dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents:
1877
diff
changeset
|
2117 |
]. |
1006 | 2118 |
^ self. |
2119 |
]. |
|
2120 |
||
2236 | 2121 |
inChangeSet := aClass hasUnsavedChanges. |
1800
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
2122 |
|
1972
32853d3cb43a
care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents:
1971
diff
changeset
|
2123 |
Error handle:[:ex | |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2124 |
(Dialog |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2125 |
confirm:(resources |
2426
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2126 |
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
|
2127 |
with:ex description |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2128 |
with:currentClass name allBold) |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2129 |
noLabel:'Cancel') |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2130 |
ifFalse:[ |
1999 | 2131 |
AbortOperationRequest raise |
1972
32853d3cb43a
care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents:
1971
diff
changeset
|
2132 |
]. |
2426
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2133 |
sourceToLoad readStream fileIn. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2134 |
^ self. |
1972
32853d3cb43a
care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents:
1971
diff
changeset
|
2135 |
] do:[ |
2426
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2136 |
self activityNotification:'generating current source...'. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2137 |
|
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2138 |
currentSource := self sourceCodeOfClass:currentClass. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2139 |
|
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2140 |
self activityNotification:'comparing...'. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2141 |
|
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2142 |
sourceToLoad = currentSource ifTrue:[ |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2143 |
"/ make all methods belong to the classes project |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2144 |
self setPackageOfAllMethodsIn:aClass to:aClass package. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2145 |
inChangeSet ifTrue:[ |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2146 |
rev = newestRev ifTrue:[ |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2147 |
(askForConfirmation not |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2148 |
or:[ wasInChangeSetBefore not |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2149 |
or:[ self confirm:(resources |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2150 |
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
|
2151 |
with:aClass name)]]) |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2152 |
ifTrue:[ |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2153 |
ChangeSet current condenseChangesForClass:aClass. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2154 |
]. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2155 |
]. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2156 |
]. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2157 |
self activityNotification:'... nothing changed in repository'. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2158 |
^ self. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2159 |
]. |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2160 |
|
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2161 |
self activityNotification:'generating diffSet...'. |
1972
32853d3cb43a
care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents:
1971
diff
changeset
|
2162 |
listHere := ChangeSet fromStream:(currentSource readStream). |
32853d3cb43a
care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents:
1971
diff
changeset
|
2163 |
]. |
2426
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2164 |
|
1006 | 2165 |
listRep := ChangeSet fromStream:(sourceToLoad readStream). |
1051 | 2166 |
|
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2167 |
Error handle:[:ex | |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2168 |
(Dialog |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2169 |
confirm:(resources |
2426
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2170 |
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
|
2171 |
with:ex description |
d698fb5ebbd7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2397
diff
changeset
|
2172 |
) |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2173 |
noLabel:'Cancel') |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2174 |
ifFalse:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2175 |
^ self |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2176 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2177 |
sourceToLoad readStream fileIn. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2178 |
^ self. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2179 |
] do:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2180 |
versionMethodsHere := listHere select:[:change | (change isMethodChange |
3354
d36778f0ff0b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3351
diff
changeset
|
2181 |
and:[((self sourceCodeManagerFor:aClass) "AbstractSourceCodeManager" isVersionMethodSelector:change selector) |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2182 |
and:[change changeClass isMeta]])]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2183 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2184 |
versionMethodsRep := listRep select:[:change | (change isMethodChange |
3354
d36778f0ff0b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3351
diff
changeset
|
2185 |
and:[((self sourceCodeManagerFor:aClass) "AbstractSourceCodeManager" isVersionMethodSelector:change selector) |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2186 |
and:[change changeClass isMeta]])]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2187 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2188 |
"/ compare all but the version methods |
3291 | 2189 |
listHere := listHere reject:[:change | (change isMethodChange |
2184
4bb6267612be
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
fm
parents:
2175
diff
changeset
|
2190 |
and:[(AbstractSourceCodeManager isVersionMethodSelector:change selector) |
3291 | 2191 |
and:[change changeClass isMeta]])]. |
2192 |
listRep := listRep reject:[:change | (change isMethodChange |
|
2184
4bb6267612be
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
fm
parents:
2175
diff
changeset
|
2193 |
and:[(AbstractSourceCodeManager isVersionMethodSelector:change selector) |
3291 | 2194 |
and:[change changeClass isMeta]])]. |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2195 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2196 |
diffSet := listHere diffSetsAgainst:listRep. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2197 |
changed := diffSet changed. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2198 |
onlyHere := diffSet onlyInReceiver. |
2794
77c62d93cc76
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2793
diff
changeset
|
2199 |
|
77c62d93cc76
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2793
diff
changeset
|
2200 |
"/ reject extensions |
77c62d93cc76
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2793
diff
changeset
|
2201 |
onlyHere := onlyHere reject:[:eachDiff| |
4416 | 2202 |
|changeClass method methodsPackage| |
2794
77c62d93cc76
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2793
diff
changeset
|
2203 |
|
3272
6ce72ad3d416
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3261
diff
changeset
|
2204 |
eachDiff isMethodChange |
4416 | 2205 |
and:[ (changeClass := eachDiff changeClass) notNil |
2206 |
and:[ (method := (changeClass compiledMethodAt:eachDiff selector)) notNil |
|
2207 |
and:[ (methodsPackage := method package) ~= changeClass package |
|
2794
77c62d93cc76
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2793
diff
changeset
|
2208 |
and:[ methodsPackage ~= PackageId noProjectID ]]]] |
77c62d93cc76
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2793
diff
changeset
|
2209 |
]. |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2210 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2211 |
onlyInRep := diffSet onlyInArg. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2212 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2213 |
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
|
2214 |
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
|
2215 |
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
|
2216 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2217 |
labels := #('Cancel' 'Merge' 'Load'). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2218 |
values := #(nil #merge #load). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2219 |
default := askForRevision |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2220 |
ifTrue:[3. "i.e. load"] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2221 |
ifFalse:[2. "i.e. merge"]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2222 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2223 |
msg := 'About to load ''%4''.\\'. |
4416 | 2224 |
onlyInRep notEmpty ifTrue:[ |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2225 |
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
|
2226 |
]. |
4416 | 2227 |
onlyHere notEmpty ifTrue:[ |
2794
77c62d93cc76
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2793
diff
changeset
|
2228 |
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
|
2229 |
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
|
2230 |
]. |
4416 | 2231 |
changed notEmpty ifTrue:[ |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2232 |
changed size == 1 ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2233 |
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
|
2234 |
singleChangeSelector := changed first first selector allBold |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2235 |
] ifFalse:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2236 |
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
|
2237 |
] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2238 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2239 |
changedClassDefinitions size > 0 ifTrue:[ |
2794
77c62d93cc76
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2793
diff
changeset
|
2240 |
msg := msg , (changedClassDefinitions size == 1 |
77c62d93cc76
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2793
diff
changeset
|
2241 |
ifTrue:['The class definition is different.\\'] |
77c62d93cc76
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2793
diff
changeset
|
2242 |
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
|
2243 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2244 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2245 |
onlyHere isEmpty ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2246 |
onlyInRep isEmpty ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2247 |
(changed isEmpty and:[changedClassDefinitions isEmpty]) ifTrue:[ |
2605
93f1e7e8aee7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2602
diff
changeset
|
2248 |
versionMethodsRep notEmpty ifTrue:[ |
4329 | 2249 |
(answer := AlwaysUpdateVersionMethodsIfNoOtherChange) isNil ifTrue:[ |
2250 |
Dialog |
|
2251 |
withOptoutOption:[AlwaysUpdateVersionMethodsIfNoOtherChange := true] |
|
2252 |
labelled:'Do not ask again, but always update if no other change' |
|
2253 |
do:[ |
|
2254 |
answer := self confirm:(resources string:'Only version methods are different in %1.\\Update the version-IDs ?' with:aClass name allBold) withCRs. |
|
2255 |
] |
|
2256 |
]. |
|
2257 |
answer ifTrue:[ |
|
2258 |
Class withoutUpdatingChangesDo:[ |
|
2259 |
versionMethodsRep do:[:each | each apply]. |
|
2260 |
]. |
|
2261 |
]. |
|
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2262 |
]. |
2193 | 2263 |
"/ make all those methods belong to the classes project |
2264 |
"/ no - that is wrong !! self setPackageOfAllMethodsIn:aClass to:aClass package. |
|
2265 |
self setPackageOfAllMethodsInChangeSet:listRep to:aClass package. |
|
2605
93f1e7e8aee7
changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents:
2602
diff
changeset
|
2266 |
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
|
2267 |
^ self |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2268 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2269 |
inChangeSet ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2270 |
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
|
2271 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2272 |
labels := #('Cancel' 'Load'). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2273 |
values := #(nil #load). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2274 |
default := askForRevision |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2275 |
ifTrue:[2. "i.e. load"] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2276 |
ifFalse:[1. "i.e. cancel"]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2277 |
default := 2. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2278 |
] ifFalse:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2279 |
changed isEmpty ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2280 |
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
|
2281 |
labels := #('Cancel' 'Load'). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2282 |
values := #(nil #load). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2283 |
default := askForRevision |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2284 |
ifTrue:[2. "i.e. load"] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2285 |
ifFalse:[1. "i.e. cancel"]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2286 |
default := 2. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2287 |
] ifFalse:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2288 |
inChangeSet ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2289 |
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
|
2290 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2291 |
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
|
2292 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2293 |
] |
1006 | 2294 |
] ifFalse:[ |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2295 |
onlyInRep isEmpty ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2296 |
inChangeSet ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2297 |
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
|
2298 |
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
|
2299 |
]. |
1121 | 2300 |
labels := #('Cancel' 'Load'). |
987 | 2301 |
values := #(nil #load). |
1007
44c0229bcb43
better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents:
1006
diff
changeset
|
2302 |
default := askForRevision |
44c0229bcb43
better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents:
1006
diff
changeset
|
2303 |
ifTrue:[2. "i.e. load"] |
44c0229bcb43
better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents:
1006
diff
changeset
|
2304 |
ifFalse:[1. "i.e. cancel"]. |
1907 | 2305 |
default := 2. |
987 | 2306 |
] ifFalse:[ |
1339 | 2307 |
inChangeSet ifTrue:[ |
2308 |
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
|
2309 |
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
|
2310 |
] |
1339 | 2311 |
] |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2312 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2313 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2314 |
msg := msg bindWith:onlyInRep size printString |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2315 |
with:onlyHere size printString |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2316 |
with:changed size printString |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2317 |
with:aClass name allBold |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2318 |
with:changedClassDefinitions size printString |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2319 |
with:singleChangeSelector. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2320 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2321 |
askForConfirmation ifFalse:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2322 |
answer := #load |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2323 |
] ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2324 |
answer := (Dialog confirmWithCancel:msg withCRs |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2325 |
labels:(resources array:labels) |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2326 |
values:values |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2327 |
default:default). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2328 |
answer isNil ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2329 |
self activityNotification:'...cancelled'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2330 |
^ self |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2331 |
]. |
2013
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
2332 |
]. |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2333 |
self activityNotification:'updating...'. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2334 |
changedClasses := IdentitySet new. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2335 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2336 |
answer == #load ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2337 |
"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
|
2338 |
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
|
2339 |
onlyHere do:[:eachChange | |
3272
6ce72ad3d416
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3261
diff
changeset
|
2340 |
"remove this change (method not present in repository version)" |
6ce72ad3d416
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3261
diff
changeset
|
2341 |
|cClass| |
6ce72ad3d416
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3261
diff
changeset
|
2342 |
eachChange isMethodChange ifTrue:[ |
6ce72ad3d416
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3261
diff
changeset
|
2343 |
cClass := eachChange changeClass. |
6ce72ad3d416
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3261
diff
changeset
|
2344 |
cClass notNil ifTrue:[ |
6ce72ad3d416
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3261
diff
changeset
|
2345 |
cClass basicRemoveSelector:eachChange selector |
6ce72ad3d416
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3261
diff
changeset
|
2346 |
]. |
6ce72ad3d416
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3261
diff
changeset
|
2347 |
] |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2348 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2349 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2350 |
changedClassDefinitions do:[:eachChangeArr | |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2351 |
|cHere eachChangedClass| |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2352 |
cHere := eachChangeArr at:1. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2353 |
eachChangedClass := cHere changeClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2354 |
eachChangedClass notNil ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2355 |
changedClasses add:eachChangedClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2356 |
eachChangedClass := eachChangedClass theNonMetaclass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2357 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2358 |
"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
|
2359 |
changed do:[:eachChangeArr| |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2360 |
|eachChange eachClass| |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2361 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2362 |
eachChange := eachChangeArr first. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2363 |
eachChange isMethodChange ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2364 |
eachClass := eachChange changeClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2365 |
eachClass theNonMetaclass == eachChangedClass ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2366 |
eachClass basicRemoveSelector:eachChange selector. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2367 |
]. |
1999 | 2368 |
]. |
2369 |
]. |
|
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2370 |
] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2371 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2372 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2373 |
"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
|
2374 |
changedClassDefinitions do:[:eachChangeArr | |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2375 |
|cRep| |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2376 |
cRep := eachChangeArr at:2. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2377 |
cRep apply. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2378 |
]. |
1057
6903d4d5097d
do not update the changesFile, when checkingOut
Claus Gittinger <cg@exept.de>
parents:
1056
diff
changeset
|
2379 |
]. |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2380 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2381 |
onlyInRep do:[:eachChange | |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2382 |
|changeClass| |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2383 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2384 |
"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
|
2385 |
eachChange apply. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2386 |
eachChange isMethodChange ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2387 |
changeClass := eachChange changeClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2388 |
changeClass notNil ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2389 |
eachChange changeMethod setPackage:(changeClass package). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2390 |
changedClasses add:changeClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2391 |
] |
2013
0457926edfdb
allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents:
2009
diff
changeset
|
2392 |
] |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2393 |
] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2394 |
. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2395 |
answer == #load ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2396 |
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
|
2397 |
|cHere cRep| |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2398 |
cHere := eachChangeArr at:1. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2399 |
cRep := eachChangeArr at:2. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2400 |
cRep apply. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2401 |
cRep isMethodChange ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2402 |
cRep changeMethod setPackage:(cRep changeClass package). |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2403 |
changedClasses add:cRep changeClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2404 |
] |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2405 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2406 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2407 |
versionMethodsRep size >= 1 ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2408 |
versionMethodsRep last apply. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2409 |
] ifFalse:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2410 |
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
|
2411 |
]. |
2193 | 2412 |
"/ make all those methods belong to the classes project |
2413 |
"/ no - that is wrong !! self setPackageOfAllMethodsIn:aClass to:aClass package. |
|
2414 |
self setPackageOfAllMethodsInChangeSet:listRep to:aClass package. |
|
1055
f44b12442c58
version update after load from rep.
Claus Gittinger <cg@exept.de>
parents:
1054
diff
changeset
|
2415 |
]. |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2416 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2417 |
answer == #load ifTrue:[ |
2236 | 2418 |
inChangeSet := aClass hasUnsavedChanges. |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2419 |
inChangeSet ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2420 |
rev = newestRev ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2421 |
(wasInChangeSetBefore not |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2422 |
or:[ self confirm:(resources |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2423 |
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
|
2424 |
with:aClass name)]) |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2425 |
ifTrue:[ |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2426 |
ChangeSet current condenseChangesForClass:aClass. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2427 |
]. |
1800
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
2428 |
]. |
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
2429 |
]. |
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
2430 |
]. |
2092
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2431 |
|
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2432 |
changedClasses do:[:eachClass | |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2433 |
eachClass changed:#projectOrganization. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2434 |
]. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2435 |
Smalltalk changed:#projectOrganization. |
cd9b53d5ca31
allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2436 |
self activityNotification:'... done'. |
1800
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
2437 |
]. |
560e29381f52
ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents:
1787
diff
changeset
|
2438 |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
2439 |
"Modified: / 07-02-2001 / 18:18:32 / ps" |
3354
d36778f0ff0b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3351
diff
changeset
|
2440 |
"Modified: / 22-07-2013 / 13:17:32 / cg" |
4329 | 2441 |
"Modified: / 14-06-2018 / 17:02:05 / Claus Gittinger" |
4416 | 2442 |
"Modified: / 02-04-2019 / 12:03:11 / Stefan Vogel" |
986
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
2443 |
! |
78d2a098bc81
support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents:
984
diff
changeset
|
2444 |
|
2691 | 2445 |
checkoutExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision askForMerge:askForMerge usingManager:aSourceCodeManager |
1522 | 2446 |
"check-out a class from the source repository. |
2447 |
If askForRevision is false, check-out the newest version." |
|
2448 |
||
3291 | 2449 |
|inChangeSet extensionMethods msg |
1704 | 2450 |
listHere listRep diffSet |
1522 | 2451 |
changed onlyHere onlyInRep answer labels values singleChangeSelector |
2452 |
changedClasses default | |
|
2453 |
||
2691 | 2454 |
listRep := self changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager. |
1841
00e5a67d1d9e
refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents:
1840
diff
changeset
|
2455 |
listRep isNil ifTrue:[ ^self ]. |
1522 | 2456 |
|
2457 |
self activityNotification:'generating diffSet...'. |
|
2458 |
||
2459 |
extensionMethods := OrderedCollection new. |
|
2460 |
Smalltalk allClassesDo:[:aClass | |owner classPackage| |
|
2461 |
"/ individual methods ... |
|
2462 |
aClass isMeta ifFalse:[ |
|
2463 |
(aClass package ~= packageToCheckOut) ifTrue:[ |
|
2464 |
aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
|
2465 |
"/ methods in this project ... |
|
2466 |
(mthd package = packageToCheckOut) ifTrue:[ |
|
2467 |
"/ ... whose class is not in the ckechIn-set |
|
2468 |
extensionMethods add:mthd |
|
2469 |
] |
|
2470 |
]. |
|
2471 |
]. |
|
2472 |
]. |
|
2473 |
]. |
|
2474 |
listHere := ChangeSet forExistingMethods:extensionMethods. |
|
2475 |
||
2476 |
inChangeSet := listRep contains:[:someChange | |
|
2477 |
|cClass cSel| |
|
2478 |
||
2479 |
someChange isMethodChange ifTrue:[ |
|
2480 |
cClass := someChange changeClass. |
|
2481 |
cSel := someChange selector. |
|
2482 |
ChangeSet current includesChangeForClass:cClass selector:cSel |
|
2483 |
] |
|
2484 |
]. |
|
2485 |
||
2486 |
diffSet := listHere diffSetsAgainst:listRep. |
|
2487 |
changed := diffSet changed. |
|
2488 |
onlyHere := diffSet onlyInReceiver. |
|
2489 |
onlyInRep := diffSet onlyInArg. |
|
2490 |
||
2491 |
labels := #('Cancel' 'Merge' 'Load'). |
|
2492 |
values := #(nil #merge #load). |
|
2493 |
default := askForRevision |
|
2494 |
ifTrue:[3. "i.e. load"] |
|
2495 |
ifFalse:[2. "i.e. merge"]. |
|
2496 |
||
2497 |
msg := 'About to load extensions for ''%5''.\\'. |
|
2498 |
onlyInRep size > 0 ifTrue:[ |
|
2499 |
msg := msg , 'The repositories version contains %1 extension method(s) which are not in your current image.\'. |
|
2500 |
]. |
|
2501 |
onlyHere size > 0 ifTrue:[ |
|
2502 |
onlyInRep size > 0 ifTrue:[ |
|
2503 |
msg := msg , 'And there '. |
|
2504 |
] ifFalse:[ |
|
2505 |
msg := msg , 'There '. |
|
2506 |
]. |
|
2507 |
msg := msg , 'are %2 extension methods in your current image, which are not in the repository.\'. |
|
2508 |
]. |
|
2509 |
changed size > 0 ifTrue:[ |
|
2510 |
changed size == 1 ifTrue:[ |
|
2511 |
msg := msg , 'The ''%5''-method is different (present in both).\\'. |
|
2512 |
singleChangeSelector := changed first first selector allBold |
|
2513 |
] ifFalse:[ |
|
2514 |
msg := msg , '%3 methods are different (present in both).\\'. |
|
2515 |
] |
|
2516 |
]. |
|
2517 |
||
2518 |
onlyHere isEmpty ifTrue:[ |
|
2519 |
onlyInRep isEmpty ifTrue:[ |
|
2520 |
(changed isEmpty) ifTrue:[ |
|
2521 |
listRep do:[:eachChange | |
|
2522 |
eachChange changeMethod setPackage:packageToCheckOut. |
|
2523 |
]. |
|
2524 |
^ self |
|
2525 |
]. |
|
2526 |
inChangeSet ifTrue:[ |
|
2527 |
msg := msg , '\Attention:\Load may undo any changes made to on of the extension methods (if any were made).'. |
|
2528 |
]. |
|
2529 |
labels := #('Cancel' 'Load'). |
|
2530 |
values := #(nil #load). |
|
2531 |
default := askForRevision |
|
2532 |
ifTrue:[2. "i.e. load"] |
|
2533 |
ifFalse:[1. "i.e. cancel"]. |
|
2534 |
] ifFalse:[ |
|
2535 |
changed isEmpty ifTrue:[ |
|
2536 |
msg := msg , '\Attention:\Load will load methods which are not present in the image.'. |
|
2537 |
labels := #('Cancel' 'Load'). |
|
2538 |
values := #(nil #load). |
|
2539 |
default := askForRevision |
|
2540 |
ifTrue:[2. "i.e. load"] |
|
2541 |
ifFalse:[1. "i.e. cancel"]. |
|
2542 |
] ifFalse:[ |
|
2543 |
inChangeSet ifTrue:[ |
|
2544 |
msg := msg , '\Attention:\Load will undo your changes made to the image (if any were made);'. |
|
2545 |
]. |
|
2546 |
msg := msg , '\Merge will only load methods which are not present in the image (i.e. undo removals but preserve changes).'. |
|
2547 |
]. |
|
2548 |
] |
|
2549 |
] ifFalse:[ |
|
2550 |
onlyInRep isEmpty ifTrue:[ |
|
2551 |
inChangeSet ifTrue:[ |
|
2552 |
msg := msg , '\Attention:\Load will undo your changes made to the image (if any were made),'. |
|
2553 |
msg := msg , '\and remove added methods which are not present in the repository version.'. |
|
2554 |
]. |
|
2555 |
labels := #('Cancel' 'Load'). |
|
2556 |
values := #(nil #load). |
|
2557 |
default := askForRevision |
|
2558 |
ifTrue:[2. "i.e. load"] |
|
2559 |
ifFalse:[1. "i.e. cancel"]. |
|
2560 |
] ifFalse:[ |
|
2561 |
inChangeSet ifTrue:[ |
|
2562 |
msg := msg , '\Attention:\Load will undo your changes made to the image (if any were made);'. |
|
2563 |
msg := msg , '\Merge will only load methods which are not present in the image (i.e. undo removals but preserve changes).'. |
|
2564 |
] |
|
2565 |
] |
|
2566 |
]. |
|
2567 |
||
2568 |
msg := msg bindWith:onlyInRep size printString |
|
2569 |
with:onlyHere size printString |
|
2570 |
with:changed size printString |
|
2571 |
with:singleChangeSelector |
|
2572 |
with:packageToCheckOut allBold. |
|
2573 |
||
2574 |
answer := (Dialog confirmWithCancel:msg withCRs |
|
2575 |
labels:(resources array:labels) |
|
2576 |
values:values |
|
2577 |
default:default). |
|
2578 |
answer isNil ifTrue:[^ self]. |
|
2579 |
||
2580 |
self activityNotification:'updating...'. |
|
2581 |
changedClasses := IdentitySet new. |
|
2582 |
||
2583 |
"/ Class withoutUpdatingChangesDo:[ |
|
2584 |
onlyInRep do:[:eachChange | "apply this change (method only present in rep-version)" |
|
2585 |
Class withoutUpdatingChangeSetDo:[ eachChange apply ]. |
|
2586 |
||
2587 |
eachChange changeMethod setPackage:packageToCheckOut. |
|
2588 |
changedClasses add:eachChange changeClass. |
|
2589 |
]. |
|
2590 |
answer == #load ifTrue:[ |
|
2591 |
onlyHere do:[:eachChange | "remove this change (method not present in rep-version)" |
|
2592 |
|cClass cSel| |
|
2593 |
||
2594 |
cClass := eachChange changeClass. |
|
2595 |
cSel := eachChange selector. |
|
2596 |
Class withoutUpdatingChangeSetDo:[ cClass removeSelector:cSel ]. |
|
2597 |
]. |
|
2598 |
changed do:[:eachChangeArr | "apply this change (go to rep-version)" |
|
2599 |
|cHere cRep| |
|
2600 |
cHere := eachChangeArr at:1. |
|
2601 |
cRep := eachChangeArr at:2. |
|
2602 |
Class withoutUpdatingChangeSetDo:[ cRep apply ]. |
|
2603 |
||
2604 |
cRep changeMethod setPackage:packageToCheckOut. |
|
2605 |
changedClasses add:cRep changeClass. |
|
2606 |
]. |
|
2607 |
]. |
|
2608 |
"/ ]. |
|
2609 |
changedClasses do:[:eachClass | |
|
2610 |
eachClass changed:#projectOrganization. |
|
2611 |
]. |
|
2612 |
Smalltalk changed:#projectOrganization. |
|
2613 |
||
2614 |
"Modified: / 07-02-2001 / 18:18:32 / ps" |
|
2691 | 2615 |
"Created: / 29-12-2011 / 14:34:12 / cg" |
1522 | 2616 |
! |
2617 |
||
957 | 2618 |
compareClassWithRepository:aClass |
2619 |
"open a diff-textView comparing the current (in-image) version |
|
2620 |
against its orgiginal version found in the repository." |
|
2621 |
||
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2622 |
self compareClassWithRepository:aClass askForRevision:true |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2623 |
|
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2624 |
" |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2625 |
self compareClassWithRepository:Array |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2626 |
" |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2627 |
! |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2628 |
|
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2629 |
compareClassWithRepository:aClass askForRevision:askForRevision |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2630 |
"open a diff-textView comparing the current (in-image) version |
4320 | 2631 |
against the newest (askForRevision=false) |
2632 |
or an asked-for version (askForRevision=true) found in the repository." |
|
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2633 |
|
4255 | 2634 |
|classToCompare brwsr comparedSource currentSource rev revString thisRevString |
3953 | 2635 |
scmManager revisionInClass versionsAreTheSame revInfo revAuthor revDate revLabel | |
957 | 2636 |
|
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2637 |
classToCompare := aClass theNonMetaclass. |
957 | 2638 |
|
4255 | 2639 |
comparedSource := self |
2640 |
fetchSourceOf:classToCompare askForRevision:askForRevision |
|
2641 |
into:[:revStringArg :revisionInClassArg :scmManagerArg| |
|
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2642 |
revString := revStringArg. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2643 |
revisionInClass := revisionInClassArg. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2644 |
scmManager := scmManagerArg. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2645 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2646 |
comparedSource isNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2647 |
^ self |
957 | 2648 |
]. |
2649 |
||
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2650 |
"/ classToCompare := aClass theNonMetaclass. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2651 |
"/ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2652 |
"/ nm := classToCompare name. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2653 |
"/ (mgr := manager) isNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2654 |
"/ mgr := self sourceCodeManagerFor:classToCompare. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2655 |
"/ mgr isNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2656 |
"/ self error:'oops - no sourcecode manager' mayProceed:true. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2657 |
"/ ^ self |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2658 |
"/ ]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2659 |
"/ ]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2660 |
"/ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2661 |
"/ rev := classToCompare revisionInfoOfManager:mgr. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2662 |
"/"/ rev := classToCompare binaryRevision. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2663 |
"/ revisionInClass := classToCompare revisionOfManager:mgr. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2664 |
"/ rev isNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2665 |
"/ rev := revisionInClass |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2666 |
"/ ]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2667 |
"/ rev isNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2668 |
"/ (Dialog confirm:'Class seems to be not yet in the repository (or classes revision info is missing or corrupted)\\Proceed ?' withCRs) |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2669 |
"/ ifFalse:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2670 |
"/ ^ self |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2671 |
"/ ] |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2672 |
"/ ]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2673 |
"/ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2674 |
"/ "/ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2675 |
"/ "/ class in repository - ask for revision |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2676 |
"/ "/ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2677 |
"/ SourceCodeManagerError handle:[:ex | |
4255 | 2678 |
"/ Dialog warn:(resources |
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2679 |
"/ stringWithCRs:'Could not fetch revision info of "%1".\\Please check your sourcecode manager settings of %2 for package: "%3".\(and possibly the network for reachability of the repository)' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2680 |
"/ with:classToCompare name |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2681 |
"/ with:classToCompare sourceCodeManager managerTypeName |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2682 |
"/ with:classToCompare package). |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2683 |
"/ ^ self. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2684 |
"/ ] do:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2685 |
"/ newestRev := mgr newestRevisionOf:classToCompare. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2686 |
"/ ]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2687 |
"/ askForRevision ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2688 |
"/ msg := resources string:'Compare to revision: (empty for newest)'. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2689 |
"/ rev notNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2690 |
"/ msg := msg , '\\' , (resources string:'Current %1 is based upon rev %2.' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2691 |
"/ with:nm allBold with:rev). |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2692 |
"/ (revisionInClass notNil and:[revisionInClass ~= rev]) ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2693 |
"/ msg := msg , '\' , (resources string:'And has been checked into the repository as %1.' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2694 |
"/ with:revisionInClass) |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2695 |
"/ ] |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2696 |
"/ ]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2697 |
"/ newestRev notNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2698 |
"/ msg := msg , '\' , (resources string:'Newest in repository is %1.' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2699 |
"/ with:newestRev) |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2700 |
"/ ]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2701 |
"/ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2702 |
"/ rev := self |
4255 | 2703 |
"/ askForExistingRevision:msg |
2704 |
"/ title:'Compare with repository' |
|
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2705 |
"/ class:classToCompare. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2706 |
"/ ] ifFalse:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2707 |
"/ rev := newestRev. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2708 |
"/ ]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2709 |
"/ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2710 |
"/ rev isNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2711 |
"/ mgr = classToCompare sourceCodeManager ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2712 |
"/ msg := 'Could not figure out the newest revision of "%1".\\Please check if this class is really contained in that repository,\and also your sourcecode manager settings of %2 for package: "%3".\(and possibly the network for reachability of the repository)' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2713 |
"/ ] ifFalse:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2714 |
"/ msg := 'Could not figure out the newest revision of "%1".\\Notice that the class is actually maintained by %4, not %2.\Please check if this class is really in the %2 repository,\and also your sourcecode manager settings of %2 for package: "%3".\(and possibly the network for reachability of the repository)' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2715 |
"/ ]. |
4255 | 2716 |
"/ Dialog warn:(resources |
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2717 |
"/ stringWithCRs:msg |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2718 |
"/ with:classToCompare name |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2719 |
"/ with:mgr managerTypeName |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2720 |
"/ with:classToCompare package |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2721 |
"/ with:(classToCompare sourceCodeManager managerTypeName)). |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2722 |
"/ ^ self. |
4255 | 2723 |
"/ |
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2724 |
"/ ]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2725 |
"/ rev withoutSpaces isEmpty ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2726 |
"/ msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2727 |
"/ "/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2728 |
"/ aStream := mgr getSourceStreamFor:classToCompare revision:newestRev. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2729 |
"/ revString := '(newest: ' , (newestRev ? '???') , ')'. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2730 |
"/ ] ifFalse:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2731 |
"/ msg := 'extracting previous %1'. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2732 |
"/ aStream := mgr getSourceStreamFor:classToCompare revision:rev. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2733 |
"/ revString := rev |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2734 |
"/ ]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2735 |
"/ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2736 |
"/ aStream isNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2737 |
"/ self warn:'Could not extract source from repository (check repository settings / network)'. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2738 |
"/ ^ self |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2739 |
"/ ]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2740 |
"/ aStream class readErrorSignal handle:[:ex | |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2741 |
"/ self warn:('Read error while reading extracted source\\' , ex description) withCRs. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2742 |
"/ aStream close. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2743 |
"/ ^ self |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2744 |
"/ ] do:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2745 |
"/ comparedSource := aStream contents asString. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2746 |
"/ ]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2747 |
"/ aStream close. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2748 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2749 |
self activityNotification:'generating current source...'. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2750 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2751 |
currentSource := self sourceCodeOfClass:classToCompare. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2752 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2753 |
self activityNotification:'comparing...'. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2754 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2755 |
versionsAreTheSame := false. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2756 |
"/ a quick smoke test, if code is exactly the same |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2757 |
comparedSource = currentSource ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2758 |
versionsAreTheSame := true. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2759 |
] ifFalse:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2760 |
"/ this branch generates chunks and compares individual methods. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2761 |
"/ this is a litle more expensive, but will deal with reordered methods in the source, |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2762 |
"/ additional whitespace, empty lines etc. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2763 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2764 |
thisRevString := revisionInClass ? 'no revision'. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2765 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2766 |
revString = '(newest)' ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2767 |
|newestRev| |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2768 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2769 |
(newestRev := scmManager newestRevisionOf:classToCompare) notNil ifTrue:[ |
3953 | 2770 |
revString := '(newest is ' , newestRev , ')'. |
2771 |
rev := newestRev. |
|
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2772 |
] |
3953 | 2773 |
] ifFalse:[ |
2774 |
rev := revString |
|
2775 |
]. |
|
2776 |
||
2777 |
revLabel := revString. |
|
2778 |
||
2779 |
rev notNil ifTrue:[ |
|
2780 |
revInfo := scmManager revisionLogOf:classToCompare fromRevision:rev toRevision:rev. |
|
2781 |
revInfo notNil ifTrue:[ |
|
2782 |
revInfo := (revInfo at:#revisions) first. |
|
2783 |
revAuthor := revInfo at:#author ifAbsent:[nil]. |
|
2784 |
revDate := revInfo at:#date ifAbsent:[nil]. |
|
3993 | 2785 |
revDate isString ifTrue:[ |
3953 | 2786 |
revDate := Timestamp readFrom:revDate onError:nil. |
2787 |
]. |
|
2788 |
revLabel := revString , ' ('. |
|
2789 |
revDate notNil ifTrue:[ |
|
2790 |
revLabel := revLabel , revDate asDate printString. |
|
2791 |
]. |
|
2792 |
revLabel := revLabel , ' by ', revAuthor. |
|
2793 |
revLabel := revLabel , ')'. |
|
2794 |
]. |
|
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2795 |
]. |
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2796 |
|
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2797 |
self activityNotification:'comparing...'. |
957 | 2798 |
|
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2799 |
ChangeSet invalidChangeChunkError handle:[:ex | |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2800 |
|answer| |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2801 |
|
4255 | 2802 |
answer := Dialog |
2803 |
confirm:(resources |
|
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2804 |
stringWithCRs:'An invalid change chunk was encountered when reading the source of %1.\This may be due to a currupted source file (or source file was modified/updated in the meantime, without recompilation).\\Proceed in debugger?' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2805 |
with:aClass) |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2806 |
yesLabel:(resources string:'Debug') |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2807 |
noLabel:(resources string:'Cancel') |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2808 |
initialAnswer:false. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2809 |
answer ifTrue:[ex reject]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2810 |
AbortOperationRequest raise. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2811 |
] do:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2812 |
brwsr := (UserPreferences versionDiffViewerClass) |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2813 |
openOnClass:classToCompare |
3953 | 2814 |
labelA:('Repository: ' , revLabel) |
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2815 |
sourceA:comparedSource |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2816 |
labelB:('Current: (based on: ' , thisRevString , ')') |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2817 |
sourceB:currentSource |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2818 |
title:('Comparing ' , classToCompare name) |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2819 |
ifSame:[versionsAreTheSame := true]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2820 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2821 |
versionsAreTheSame ifFalse:[ |
4255 | 2822 |
brwsr classChangeSet |
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2823 |
classBeingCompared:classToCompare; |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2824 |
versionA:revString; |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2825 |
versionB:thisRevString , 'mod'. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2826 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2827 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2828 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2829 |
versionsAreTheSame ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2830 |
(classToCompare hasUnsavedChanges) ifTrue:[ |
4448 | 2831 |
|answer| |
2832 |
||
2833 |
DoNotAskForCondenseIfSameAsRepository == true ifTrue:[ |
|
2834 |
answer := true. |
|
2835 |
] ifFalse:[ |
|
2836 |
Dialog |
|
2837 |
withOptoutOption:[ DoNotAskForCondenseIfSameAsRepository := true ] |
|
2838 |
labelled:'Do not ask again' |
|
2839 |
do:[ |
|
2840 |
answer :=self confirm:(resources |
|
2841 |
stringWithCRs:'Versions of %1 are identical.\\Remove entries from changeSet ?' |
|
2842 |
with:classToCompare name allBold) |
|
2843 |
]. |
|
2844 |
]. |
|
2845 |
answer ifTrue:[ |
|
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2846 |
ChangeSet current condenseChangesForClass:classToCompare. |
4448 | 2847 |
] |
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2848 |
] ifFalse:[ |
4255 | 2849 |
self information:(resources string:'Versions are identical.'). |
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2850 |
ChangeSet current unrememberChangedClasses. |
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2851 |
]. |
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2852 |
revisionInClass isNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2853 |
(Dialog confirm:'Update (Fix) the classes Revision Info ?' withCRs) |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2854 |
ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2855 |
|newString root| |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2856 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2857 |
newString := scmManager updatedRevisionStringOf:aClass forRevision:rev with:aClass revisionString. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2858 |
newString isNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2859 |
root := scmManager getCVSROOTForModule:(aClass package upTo:$:). |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2860 |
root := scmManager repositoryTopDirectoryFromCVSRoot:root. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2861 |
newString := '$', 'Header: ',(root copyReplaceAll: $: with:$/ ),'/' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2862 |
,(Smalltalk fileNameForClass:aClass),'.st,v ',rev,' ' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2863 |
,(Date today printStringFormat:'%y-%m-%d'),' ' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2864 |
,(Time now printStringFormat:'%h:%m:%s'),' ' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2865 |
,'+0000 ' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2866 |
,(OperatingSystem getLoginName),' Exp $'. |
1449
cfb2e98b9259
refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
2867 |
]. |
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2868 |
scmManager updateVersionMethodOf:aClass for:newString. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
2869 |
] |
957 | 2870 |
]. |
2871 |
]. |
|
2872 |
||
2873 |
" |
|
997 | 2874 |
self compareClassWithRepository:Array |
957 | 2875 |
" |
1497 | 2876 |
|
2847 | 2877 |
"Modified: / 24-07-2012 / 18:11:27 / cg" |
4255 | 2878 |
"Modified (comment): / 04-09-2017 / 17:37:24 / mawalch" |
4448 | 2879 |
"Modified: / 23-06-2019 / 18:48:32 / Claus Gittinger" |
957 | 2880 |
! |
2881 |
||
4201 | 2882 |
comparePackages:packages askForRevision:askForRevision |
3536
cb8679184d3b
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3534
diff
changeset
|
2883 |
"Compares code of given packages (loaded in the image) against a specific revision |
cb8679184d3b
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3534
diff
changeset
|
2884 |
and opens a diff browser on differences. |
4201 | 2885 |
|
2886 |
If `askForRevision` is true, then user is asked to specify to which revision to |
|
2887 |
update. If `askForRevision` is false, then packages are updated to a 'newest' |
|
2888 |
revision. |
|
2889 |
||
2890 |
NOTE: Definition of `newest` revision may vary. For SCMs which allows for multiple |
|
2891 |
heads, it is not clear which one it is. In that case, even if `askForRevision` is |
|
2892 |
false, this method may result in user interaction, asking user to select which of the |
|
2893 |
newest she wants." |
|
2894 |
||
2895 |
self comparePackages:packages askForRevision:askForRevision extensionsOnly:false |
|
2896 |
||
2897 |
"Created: / 04-04-2014 / 15:29:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2898 |
! |
|
2899 |
||
2900 |
comparePackages:packages askForRevision:askForRevision extensionsOnly:extensionsOnly |
|
2901 |
"Compares code of given packages (loaded in the image) against a specific revision |
|
2902 |
and opens a diff browser on differences. |
|
2903 |
||
3536
cb8679184d3b
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3534
diff
changeset
|
2904 |
If `askForRevision` is true, then user is asked to specify to which revision to |
cb8679184d3b
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3534
diff
changeset
|
2905 |
update. If `askForRevision` is false, then packages are updated to a 'newest' |
4201 | 2906 |
revision. |
2907 |
||
3536
cb8679184d3b
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3534
diff
changeset
|
2908 |
NOTE: Definition of `newest` revision may vary. For SCMs which allows for multiple |
cb8679184d3b
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3534
diff
changeset
|
2909 |
heads, it is not clear which one it is. In that case, even if `askForRevision` is |
4201 | 2910 |
false, this method may result in user interaction, asking user to select which of the |
3536
cb8679184d3b
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3534
diff
changeset
|
2911 |
newest she wants." |
cb8679184d3b
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3534
diff
changeset
|
2912 |
|
4201 | 2913 |
|string dateOrNil symbolicNameOrNil knownTags includeSubProjectsHolder |
2914 |
packagesIn packagesCompared| |
|
2915 |
||
2916 |
packagesIn := packages value. |
|
2917 |
||
2918 |
knownTags := self knownTagsInPackages:packagesIn. |
|
2919 |
||
2920 |
includeSubProjectsHolder := true asValue. |
|
2921 |
string := self |
|
2922 |
askForPackageVersion:'Compare with version from date (%1) or tag (any other format) (empty for newest):' |
|
2923 |
with:includeSubProjectsHolder |
|
2924 |
knownTags:knownTags |
|
2925 |
into:[:dateOrNilArg :symbolicNameOrNilArg | |
|
2926 |
dateOrNil := dateOrNilArg. |
|
2927 |
symbolicNameOrNil := symbolicNameOrNilArg. |
|
2928 |
||
2929 |
LastComparedTag := symbolicNameOrNil. |
|
2930 |
]. |
|
2931 |
||
2932 |
string isNil ifTrue:[^ self]. |
|
2933 |
||
2934 |
packagesCompared := packagesIn. |
|
2935 |
includeSubProjectsHolder value ifTrue:[ |
|
2936 |
packagesCompared := Smalltalk allPackageIDs |
|
2937 |
select:[:eachPackage | |
|
2938 |
packagesIn contains:[:p | |
|
2939 |
eachPackage = p |
|
2940 |
or:[ (eachPackage startsWith:(p,'-')) |
|
2941 |
or:[ (eachPackage startsWith:(p,':')) ]] |
|
2942 |
] |
|
2943 |
] |
|
2944 |
]. |
|
2945 |
||
2946 |
packagesCompared value do:[:eachProject | |
|
2947 |
dateOrNil notNil ifTrue:[ |
|
2948 |
self compareProject:eachProject withRepositoryVersionFrom:dateOrNil extensionsOnly:extensionsOnly |
|
2949 |
] ifFalse:[ |
|
2950 |
self compareProject:eachProject withRepositoryVersionTaggedAs:symbolicNameOrNil extensionsOnly:extensionsOnly |
|
2951 |
] |
|
2952 |
]. |
|
2953 |
||
2954 |
"Created: / 04-04-2014 / 15:29:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2955 |
"Modified: / 05-02-2017 / 04:24:39 / cg" |
|
2956 |
! |
|
2957 |
||
2958 |
compareProject:aProject |
|
2959 |
repositoryVersionFrom:dateOrNilV1 orTag:symbolicNameOrNilV1 |
|
2960 |
againstRepositoryVersionFrom:dateOrNilV2 orTag:symbolicNameOrNilV2 |
|
2961 |
extensionsOnly:extensionsOnly |
|
2962 |
||
2963 |
|diffSet| |
|
2964 |
||
2965 |
diffSet := self |
|
2966 |
diffSetOfProject:aProject |
|
2967 |
repositoryVersionFrom:dateOrNilV1 orTag:symbolicNameOrNilV1 |
|
2968 |
againstRepositoryVersionFrom:dateOrNilV2 orTag:symbolicNameOrNilV2 |
|
2969 |
extensionsOnly:extensionsOnly. |
|
2970 |
VersionDiffBrowser |
|
2971 |
openOnDiffSet:diffSet |
|
2972 |
labelA:(dateOrNilV1 ? symbolicNameOrNilV1) |
|
2973 |
labelB:(dateOrNilV2 ? symbolicNameOrNilV2) |
|
2974 |
title:('Differences of %1' bindWith:aProject) |
|
2975 |
ignoreExtensions:true |
|
2976 |
ignoreVersionMethods:true. |
|
2977 |
||
2978 |
"Created: / 05-02-2017 / 04:21:15 / cg" |
|
3536
cb8679184d3b
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3534
diff
changeset
|
2979 |
! |
cb8679184d3b
Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3534
diff
changeset
|
2980 |
|
2189 | 2981 |
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest |
3926 | 2982 |
^ self compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:false |
2983 |
! |
|
2984 |
||
2985 |
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:extensionsOnly |
|
2189 | 2986 |
|diffSet| |
2987 |
||
3926 | 2988 |
diffSet := self diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:extensionsOnly. |
1875
f00eb53229ae
first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents:
1864
diff
changeset
|
2989 |
VersionDiffBrowser |
f00eb53229ae
first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents:
1864
diff
changeset
|
2990 |
openOnDiffSet:diffSet |
f00eb53229ae
first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents:
1864
diff
changeset
|
2991 |
labelA:'Repository' |
f00eb53229ae
first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents:
1864
diff
changeset
|
2992 |
labelB:'Image' |
2522
d32ade066c3f
changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2487
diff
changeset
|
2993 |
title:('Differences of %1' bindWith:aProject) |
2949 | 2994 |
ignoreExtensions:true |
2995 |
ignoreVersionMethods:true. |
|
2522
d32ade066c3f
changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2487
diff
changeset
|
2996 |
|
d32ade066c3f
changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2487
diff
changeset
|
2997 |
"Modified: / 12-09-2011 / 11:56:01 / cg" |
2189 | 2998 |
! |
2999 |
||
2939 | 3000 |
compareProject:aProject withRepositoryVersionTaggedAs:aSymbolicName |
3001 |
|diffSet| |
|
3002 |
||
3003 |
diffSet := self diffSetOfProject:aProject againstRepositoryVersionTaggedAs:aSymbolicName. |
|
3004 |
VersionDiffBrowser |
|
3005 |
openOnDiffSet:diffSet |
|
3926 | 3006 |
labelA:'Repository ("',(aSymbolicName?'newest'),'")' |
2939 | 3007 |
labelB:'Image' |
3008 |
title:('Differences of %1' bindWith:aProject) |
|
2949 | 3009 |
ignoreExtensions:true |
3010 |
ignoreVersionMethods:true. |
|
2939 | 3011 |
|
3012 |
"Modified: / 12-09-2011 / 11:56:01 / cg" |
|
4201 | 3013 |
"Modified (format): / 04-02-2017 / 18:54:02 / cg" |
2939 | 3014 |
! |
3015 |
||
4201 | 3016 |
compareProject:aProject withRepositoryVersionTaggedAs:aTagOrNil extensionsOnly:extensionsOnly |
3017 |
"if aTagOrNil is nil, compare against the newest version in the repositry" |
|
3018 |
||
4132 | 3019 |
|diffSet| |
3020 |
||
4201 | 3021 |
diffSet := self diffSetOfProject:aProject againstRepositoryVersionTaggedAs:aTagOrNil extensionsOnly:extensionsOnly. |
4132 | 3022 |
VersionDiffBrowser |
3023 |
openOnDiffSet:diffSet |
|
3024 |
labelA:'Repository' |
|
3025 |
labelB:'Image' |
|
3026 |
title:('Differences of %1' bindWith:aProject) |
|
3027 |
ignoreExtensions:true |
|
3028 |
ignoreVersionMethods:true. |
|
3029 |
||
4201 | 3030 |
|
3031 |
" |
|
3032 |
CVSSourceCodeManager utilities |
|
3033 |
compareProject:'stx:libbasic2' |
|
3034 |
withRepositoryVersionTaggedAs:nil |
|
3035 |
extensionsOnly:false. |
|
3036 |
||
3037 |
CVSSourceCodeManager utilities |
|
3038 |
compareProject:'stx:libbasic2' |
|
3039 |
withRepositoryVersionTaggedAs:'expecco_2_10_0' |
|
3040 |
extensionsOnly:false. |
|
3041 |
" |
|
3042 |
||
4132 | 3043 |
"Created: / 12-11-2016 / 03:39:48 / cg" |
4201 | 3044 |
"Modified (comment): / 04-02-2017 / 18:46:49 / cg" |
4132 | 3045 |
! |
3046 |
||
2189 | 3047 |
compareProjectWithRepository:aProject |
3048 |
^ self compareProject:aProject withRepositoryVersionFrom:nil |
|
1875
f00eb53229ae
first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents:
1864
diff
changeset
|
3049 |
! |
f00eb53229ae
first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents:
1864
diff
changeset
|
3050 |
|
4201 | 3051 |
compareTwoPackageVersions:packages |
3052 |
"Compares two versions of given packages." |
|
3053 |
||
3054 |
self compareTwoPackageVersions:packages extensionsOnly:false |
|
3055 |
||
3056 |
"Created: / 04-02-2017 / 17:33:02 / cg" |
|
3057 |
! |
|
3058 |
||
3059 |
compareTwoPackageVersions:packagesIn extensionsOnly:extensionsOnly |
|
3060 |
"Compares two versions of given packages |
|
3061 |
and opens a diff browser on differences." |
|
3062 |
||
3063 |
|string includeSubProjectsHolder knownTags |
|
3064 |
dateOrNilV1 dateOrNilV2 |
|
3065 |
symbolicNameOrNilV1 symbolicNameOrNilV2 |
|
3066 |
packagesCompared| |
|
3067 |
||
3068 |
knownTags := self knownTagsInPackages:packagesIn first. |
|
3069 |
includeSubProjectsHolder := true asValue. |
|
3070 |
||
3071 |
string := self |
|
3072 |
askForPackageVersion:'First version''s date (%1) or tag (any other format):' |
|
3073 |
with:includeSubProjectsHolder |
|
3074 |
knownTags:knownTags |
|
3075 |
into:[:dateOrNilArg :symbolicNameOrNilArg | |
|
3076 |
dateOrNilV1 := dateOrNilArg. |
|
3077 |
symbolicNameOrNilV1 := symbolicNameOrNilArg. |
|
3078 |
]. |
|
3079 |
string isNil ifTrue:[^ self]. |
|
3080 |
||
3081 |
string := self |
|
3082 |
askForPackageVersion:'Second version''s date (%1) or tag (any other format):' |
|
3083 |
with:nil |
|
3084 |
knownTags:knownTags |
|
3085 |
into:[:dateOrNilArg :symbolicNameOrNilArg | |
|
3086 |
dateOrNilV2 := dateOrNilArg. |
|
3087 |
symbolicNameOrNilV2 := symbolicNameOrNilArg. |
|
3088 |
]. |
|
3089 |
string isNil ifTrue:[^ self]. |
|
3090 |
||
3091 |
LastComparedTag := symbolicNameOrNilV1. |
|
3092 |
||
3093 |
packagesCompared := packagesIn. |
|
3094 |
includeSubProjectsHolder value ifTrue:[ |
|
3095 |
packagesCompared := |
|
3096 |
Smalltalk allPackageIDs |
|
3097 |
select:[:eachPackage | |
|
3098 |
packagesIn contains:[:p | |
|
3099 |
eachPackage = p |
|
3100 |
or:[ (eachPackage startsWith:(p,'-')) |
|
3101 |
or:[ (eachPackage startsWith:(p,':')) ]] |
|
3102 |
] |
|
3103 |
] |
|
3104 |
]. |
|
3105 |
||
3106 |
packagesCompared value do:[:eachProject | |
|
3107 |
self |
|
3108 |
compareProject:eachProject |
|
3109 |
repositoryVersionFrom:dateOrNilV1 orTag:symbolicNameOrNilV1 |
|
3110 |
againstRepositoryVersionFrom:dateOrNilV2 orTag:symbolicNameOrNilV2 |
|
3111 |
extensionsOnly:extensionsOnly |
|
3112 |
]. |
|
3113 |
||
3114 |
" |
|
3115 |
CVSSourceCodeManager utilities |
|
3116 |
compareTwoPackageVersions:#('stx:libbasic') extensionsOnly:true |
|
3117 |
" |
|
3118 |
||
3119 |
"Created: / 04-02-2017 / 17:51:09 / cg" |
|
3120 |
"Modified: / 05-02-2017 / 04:23:07 / cg" |
|
3121 |
! |
|
3122 |
||
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3123 |
createSourceContainerForClass:aClass |
2651 | 3124 |
"let user specify the source-repository values for aClass. |
3125 |
Return false, if failed." |
|
3126 |
||
3127 |
^ self |
|
3128 |
createSourceContainerForClass:aClass |
|
3129 |
usingManager:(self sourceCodeManagerFor:aClass). |
|
3130 |
||
3131 |
"Modified: / 21-12-2011 / 18:31:49 / cg" |
|
3132 |
! |
|
3133 |
||
3134 |
createSourceContainerForClass:aClass usingManager:aManager |
|
3135 |
"let user specify the source-repository values for aClass. |
|
3136 |
Return false, if failed." |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3137 |
|
3992 | 3138 |
^ self |
3139 |
createSourceContainerForClass:aClass usingManager:aManager |
|
3140 |
confirmNewContainer:confirmNewFiles |
|
3141 |
! |
|
3142 |
||
3143 |
createSourceContainerForClass:aClass usingManager:aManager confirmNewContainer:confirmNewContainer |
|
3144 |
"let user specify the source-repository values for aClass. |
|
3145 |
Return false, if failed." |
|
3146 |
||
2651 | 3147 |
aManager isNil ifTrue:[^ false]. |
3148 |
||
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3149 |
^ self |
2651 | 3150 |
defineSourceContainerForClass:aClass |
3151 |
usingManager:aManager |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3152 |
title:(resources string:'Repository information for %1' with:aClass name) |
2651 | 3153 |
text:(resources string:'Create new %1-repository container for ''%2''' |
3154 |
with:aManager managerTypeName |
|
3155 |
with:aClass name allBold) |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3156 |
createDirectories:true |
3992 | 3157 |
createContainer:true |
3158 |
confirmNewContainer:confirmNewContainer. |
|
2651 | 3159 |
|
3160 |
"Created: / 21-12-2011 / 18:31:23 / cg" |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3161 |
! |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3162 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3163 |
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
|
3164 |
"let user specify the source-repository values for aClass" |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3165 |
|
2651 | 3166 |
^ self |
3167 |
defineSourceContainerForClass:aClass |
|
3168 |
usingManager:(self sourceCodeManagerFor:aClass) |
|
3169 |
title:title |
|
3170 |
text:boxText |
|
3171 |
createDirectories:createDirs |
|
3172 |
createContainer:createContainer |
|
3173 |
||
3174 |
"Modified: / 21-12-2011 / 18:34:44 / cg" |
|
3175 |
! |
|
3176 |
||
3177 |
defineSourceContainerForClass:aClass usingManager:mgr title:title text:boxText createDirectories:createDirs createContainer:createContainer |
|
3178 |
"let user specify the source-repository values for aClass" |
|
3179 |
||
3992 | 3180 |
^ self |
3181 |
defineSourceContainerForClass:aClass usingManager:mgr title:title text:boxText |
|
3182 |
createDirectories:createDirs createContainer:createContainer |
|
3183 |
confirmNewContainer:confirmNewFiles |
|
3184 |
! |
|
3185 |
||
3186 |
defineSourceContainerForClass:aClass usingManager:mgr title:title text:boxText |
|
3187 |
createDirectories:createDirs createContainer:createContainer |
|
3188 |
confirmNewContainer:confirmNewContainer |
|
3189 |
"let user specify the source-repository values for aClass" |
|
3190 |
||
2651 | 3191 |
|className |
2063 | 3192 |
"oldModule oldPackage" oldFileName |
1533 | 3193 |
module directory fileName nameSpace nameSpacePrefix |
2651 | 3194 |
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
|
3195 |
answer doCheckinWithoutAsking forceCheckIn rslt note |
3276
e6902cec8b2f
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3272
diff
changeset
|
3196 |
requiredPackage classPackage| |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3197 |
|
2651 | 3198 |
mgr isNil ifTrue:[^ false]. |
3199 |
||
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3200 |
aClass isLoaded ifFalse:[ |
1076 | 3201 |
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
|
3202 |
^ false. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3203 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3204 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3205 |
className := aClass name. |
3276
e6902cec8b2f
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3272
diff
changeset
|
3206 |
classPackage := aClass package. |
e6902cec8b2f
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3272
diff
changeset
|
3207 |
classPackage ~= PackageId noProjectID ifTrue:[ |
e6902cec8b2f
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3272
diff
changeset
|
3208 |
module := classPackage asPackageId module. |
e6902cec8b2f
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3272
diff
changeset
|
3209 |
directory := classPackage asPackageId directory. |
1533 | 3210 |
] ifFalse:[ |
3211 |
"/ |
|
3212 |
"/ defaults, if nothing at all is known |
|
3213 |
"/ |
|
3214 |
(module := LastModule) isNil ifTrue:[ |
|
3919 | 3215 |
module := (UserPreferences current usersModuleName "OperatingSystem getLoginName"). |
1533 | 3216 |
]. |
3217 |
(directory := LastPackage) isNil ifTrue:[ |
|
3218 |
directory := 'private'. |
|
3153
c2bca6dbe3a7
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3146
diff
changeset
|
3219 |
]. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3220 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3221 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3222 |
"/ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3223 |
"/ 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
|
3224 |
"/ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3225 |
(Project notNil and:[(project := Project current) notNil]) ifTrue:[ |
1533 | 3226 |
directory isNil ifTrue:[ |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3227 |
(nm := project repositoryDirectory) isNil ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3228 |
nm := project name |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3229 |
]. |
1533 | 3230 |
directory := nm. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3231 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3232 |
module isNil ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3233 |
(nm := project repositoryModule) notNil ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3234 |
module := nm |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3235 |
] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3236 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3237 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3238 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3239 |
"/ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3240 |
"/ 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
|
3241 |
"/ if so, take that as a default. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3242 |
"/ |
1189
fdc5e747c184
refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents:
1185
diff
changeset
|
3243 |
info := mgr sourceInfoOfClass:aClass. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3244 |
info notNil ifTrue:[ |
1368 | 3245 |
true "module ~= LastModule" ifTrue:[ |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3246 |
(info includesKey:#module) ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3247 |
module := (info at:#module). |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3248 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3249 |
]. |
1401 | 3250 |
"/ true "package ~= LastPackage" ifTrue:[ |
3251 |
"/ (info includesKey:#directory) ifTrue:[ |
|
3252 |
"/ package := (info at:#directory). |
|
3253 |
"/ ]. |
|
3254 |
"/ ]. |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3255 |
fileName := mgr containerFromSourceInfo:info. |
4007 | 3256 |
fileName isNil ifTrue:[ fileName := aClass classFilename ]. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3257 |
(nameSpace := aClass nameSpace) ~~ Smalltalk ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3258 |
nameSpacePrefix := nameSpace name , '::'. |
3259 | 3259 |
fileName := fileName withoutPrefix:nameSpacePrefix. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3260 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3261 |
"/ (info includesKey:#fileName) ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3262 |
"/ fileName := (info at:#fileName). |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3263 |
"/ ] ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3264 |
"/ (info includesKey:#expectedFileName) ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3265 |
"/ fileName := (info at:#expectedFileName). |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3266 |
"/ ] ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3267 |
"/ (info includesKey:#classFileNameBase) ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3268 |
"/ fileName := (info at:#classFileNameBase) , '.st'. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3269 |
"/ ] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3270 |
"/ ] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3271 |
"/ ] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3272 |
]. |
4058 | 3273 |
directory isNil ifTrue:[ |
3274 |
Dialog information:('Using %1 as last package-folder' bindWith:LastPackage). |
|
3514
a35b833ed992
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3433
diff
changeset
|
3275 |
directory := LastPackage. |
a35b833ed992
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3433
diff
changeset
|
3276 |
]. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3277 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3278 |
fileName isNil ifTrue:[ |
1338 | 3279 |
fileName := (Smalltalk fileNameForClass:aClass) , '.st'. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3280 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3281 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3282 |
OperatingSystem isMSDOSlike ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3283 |
module replaceAll:$\ with:$/. |
1533 | 3284 |
directory replaceAll:$\ with:$/. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3285 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3286 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3287 |
"/ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3288 |
"/ 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
|
3289 |
"/ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3290 |
doCheckinWithoutAsking := false. |
1831
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3291 |
"/false ifTrue:[ |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3292 |
"/ (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
|
3293 |
"/ answer := Dialog confirmWithCancel:(resources |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3294 |
"/ string:'About to change the source container. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3295 |
"/ |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3296 |
"/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
|
3297 |
"/ |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3298 |
"/ %2 / %3 / %4 |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3299 |
"/ |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3300 |
"/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
|
3301 |
"/ with:className |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3302 |
"/ with:module |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3303 |
"/ with:directory |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3304 |
"/ with:fileName) |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3305 |
"/ labels:(resources array:#('Cancel' 'Check in' 'Change')). |
3433
eee3079d18d3
AbortSignal -> AbortOperationRequest
Stefan Vogel <sv@exept.de>
parents:
3425
diff
changeset
|
3306 |
"/ answer isNil ifTrue:[AbortOperationRequest raise]. |
1831
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3307 |
"/ answer ifTrue:[ |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3308 |
"/ doCheckinWithoutAsking := false. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3309 |
"/ oldModule := module. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3310 |
"/ oldPackage := directory. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3311 |
"/ oldFileName := fileName |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3312 |
"/ ] ifFalse:[ |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3313 |
"/ doCheckinWithoutAsking := true. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3314 |
"/ creatingNew := false. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3315 |
"/ ]. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3316 |
"/ ]. |
cda120c93659
do not ask for changed source-container based on the default
sr
parents:
1828
diff
changeset
|
3317 |
"/]. |
2688
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
3318 |
mgr isContainerBased ifTrue:[ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
3319 |
doCheckinWithoutAsking ifFalse:[ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
3320 |
"/ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
3321 |
"/ open a dialog for this |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
3322 |
"/ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
3323 |
(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
|
3324 |
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
|
3325 |
creatingNew := true. |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
3326 |
] ifTrue:[ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
3327 |
creatingNew := false. |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
3328 |
]. |
3992 | 3329 |
confirmNewContainer ifTrue:[ |
2847 | 3330 |
rslt := self |
3331 |
askForContainer:boxText title:title note:note |
|
3332 |
initialModule:module initialPackage:directory initialFileName:fileName |
|
3333 |
forNewContainer:true. |
|
3334 |
||
3335 |
rslt isNil ifTrue:[ |
|
3336 |
^ false |
|
3337 |
]. |
|
3338 |
||
3339 |
module := rslt at:#module. |
|
3340 |
directory := rslt at:#package. |
|
3341 |
fileName := rslt at:#fileName. |
|
4058 | 3342 |
(module isEmptyOrNil or:[fileName isEmptyOrNil]) ifTrue:[ |
3514
a35b833ed992
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3433
diff
changeset
|
3343 |
^ false |
a35b833ed992
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3433
diff
changeset
|
3344 |
]. |
4058 | 3345 |
(directory isEmptyOrNil) ifTrue:[ |
3346 |
"/ only one special case allowed - the module-folder description itself. |
|
3347 |
aClass name = module ifFalse:[^ false]. |
|
3348 |
] |
|
2847 | 3349 |
] |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3350 |
]. |
2688
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
3351 |
(fileName endsWith:',v') ifTrue:[ |
3227
bcaec3eb2d97
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
3202
diff
changeset
|
3352 |
fileName := fileName copyButLast:2 |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3353 |
]. |
2688
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
3354 |
(fileName endsWith:'.st') ifFalse:[ |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
3355 |
fileName := fileName , '.st' |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
3356 |
]. |
fa8075458983
changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
3357 |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3358 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3359 |
|
952
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3360 |
"/ 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
|
3361 |
"/ check for this ... |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3362 |
|
1533 | 3363 |
requiredPackage := ((module ? '') , ':' , (directory ? '')) asSymbol. |
952
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3364 |
requiredPackage ~= aClass package ifTrue:[ |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3365 |
"/ doCheckinWithoutAsking ifFalse:[ |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3366 |
"/ (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
|
3367 |
"/ ifFalse:[ |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3368 |
"/ ^ false |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3369 |
"/ ] |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3370 |
"/ ]. |
1077
6b1bcfd27521
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
1076
diff
changeset
|
3371 |
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
|
3372 |
aClass package:requiredPackage. |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3373 |
]. |
c75976ac7b7f
when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3374 |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3375 |
info := aClass revisionInfo. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3376 |
info notNil ifTrue:[ |
2063 | 3377 |
(info repositoryPathName isNil) ifTrue:[ |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3378 |
info := nil |
2063 | 3379 |
]. |
3380 |
"/ (info includesKey:#repositoryPathName) ifFalse:[ |
|
3381 |
"/ info := nil |
|
3382 |
"/ ] |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3383 |
]. |
2175 | 3384 |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3385 |
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
|
3386 |
true "doCheckinWithoutAsking" ifFalse:[ |
979 | 3387 |
answer := Dialog |
3388 |
confirmWithCancel:(resources string:'%1 does not have any (usable) revision info (#version method)\\Shall I create one ?' with:className) withCRs |
|
1076 | 3389 |
labels:(resources array:#( 'Cancel' 'No' 'Yes')). |
979 | 3390 |
answer isNil ifTrue:[^ false]. |
3391 |
] ifTrue:[ |
|
3392 |
answer := true. |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3393 |
]. |
979 | 3394 |
answer ifTrue:[ |
2637 | 3395 |
mgr |
2651 | 3396 |
updateVersionMethodOf:aClass |
3397 |
for:(mgr initialRevisionStringFor:aClass |
|
3398 |
inModule:module |
|
3399 |
directory:directory |
|
3400 |
container:fileName). |
|
979 | 3401 |
]. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3402 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3403 |
|
2691 | 3404 |
(self checkForExistingModule:module usingManager:mgr allowCreate:(createDirs or:[creatingNew])) |
2651 | 3405 |
ifFalse:[^ false]. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3406 |
LastModule := module. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3407 |
|
2691 | 3408 |
(self checkForExistingModule:module directory:directory usingManager:mgr allowCreate:(createDirs or:[creatingNew])) |
2651 | 3409 |
ifFalse:[^ false]. |
1533 | 3410 |
LastPackage := directory. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3411 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3412 |
"/ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3413 |
"/ check for the container itself |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3414 |
"/ |
2651 | 3415 |
(mgr isContainerBased not |
3416 |
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
|
3417 |
"/ (oldModule notNil |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3418 |
"/ and:[(oldModule ~= module) |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3419 |
"/ or:[oldPackage ~= package |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3420 |
"/ or:[oldFileName ~= fileName]]]) |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3421 |
"/ ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3422 |
"/ self warn:(resources string:'no change'). |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3423 |
"/ ^ false. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3424 |
"/ ]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3425 |
|
2651 | 3426 |
mgr isContainerBased ifTrue:[ |
3427 |
creatingNew ifTrue:[ |
|
3428 |
self warn:(resources string:'Container for %1 already exists in %2/%3.' with:fileName with:module with:directory) withCRs. |
|
3429 |
]. |
|
3430 |
||
3431 |
doCheckinWithoutAsking ifFalse:[ |
|
3432 |
(Dialog |
|
3433 |
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
|
3434 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3435 |
%2 / %3 / %4 ?' |
2651 | 3436 |
with:className |
3437 |
with:module |
|
3438 |
with:directory |
|
3439 |
with:fileName) withCRs |
|
3440 |
noLabel:'Cancel') |
|
3441 |
ifFalse:[ |
|
3442 |
^ false. |
|
3443 |
]. |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3444 |
]. |
2651 | 3445 |
]. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3446 |
|
2637 | 3447 |
mgr |
2651 | 3448 |
updateVersionMethodOf:aClass |
3449 |
for:('$' , 'Header' , '$'). "/ concatenated to avoid RCS-expansion |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3450 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3451 |
oldFileName notNil ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3452 |
msg := ('forced checkin / source container change from ' , oldFileName). |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3453 |
] ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3454 |
msg := 'defined source container' |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3455 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3456 |
|
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3457 |
(forceCheckIn := doCheckinWithoutAsking) ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3458 |
(mgr |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3459 |
checkinClass:aClass |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3460 |
fileName:fileName |
1533 | 3461 |
directory:directory |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3462 |
module:module |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3463 |
logMessage:msg) |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3464 |
ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3465 |
doCheckinWithoutAsking ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3466 |
(Dialog |
1076 | 3467 |
confirm:'No easy merge seems possible; force checkin (no merge) ?' |
3468 |
noLabel:'Cancel') |
|
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3469 |
ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3470 |
^ false. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3471 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3472 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3473 |
forceCheckIn := true. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3474 |
] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3475 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3476 |
forceCheckIn ifTrue:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3477 |
(mgr |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3478 |
checkinClass:aClass |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3479 |
fileName:fileName |
1533 | 3480 |
directory:directory |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3481 |
module:module |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3482 |
logMessage:msg |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3483 |
force:true) |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3484 |
ifFalse:[ |
1076 | 3485 |
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
|
3486 |
^ false. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3487 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3488 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3489 |
^ true |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3490 |
] ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3491 |
(createContainer or:[creatingNew]) ifFalse:[ |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3492 |
(Dialog |
1076 | 3493 |
confirm:(resources string:'No container exists for %1 in %2/%3\\create ?' |
1533 | 3494 |
with:fileName with:module with:directory) withCRs |
1076 | 3495 |
noLabel:'Cancel') ifFalse:[ |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3496 |
^ false |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3497 |
] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3498 |
] |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3499 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3500 |
|
1882
8b3a4c2a2c2a
when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents:
1879
diff
changeset
|
3501 |
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
|
3502 |
aClass package:requiredPackage. |
1913 | 3503 |
|
3155
9c22d8b4315b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3153
diff
changeset
|
3504 |
[ mgr |
2651 | 3505 |
createContainerFor:aClass |
3506 |
inModule:module |
|
3507 |
package:directory |
|
3508 |
container:fileName |
|
3155
9c22d8b4315b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3153
diff
changeset
|
3509 |
] whileFalse:[ |
9c22d8b4315b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3153
diff
changeset
|
3510 |
(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
|
3511 |
^ false. |
9c22d8b4315b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3153
diff
changeset
|
3512 |
]. |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3513 |
]. |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3514 |
^ true |
1533 | 3515 |
|
2651 | 3516 |
"Created: / 21-12-2011 / 18:34:02 / cg" |
4007 | 3517 |
"Modified: / 30-04-2016 / 11:58:11 / cg" |
876
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3518 |
! |
461b86272f48
more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents:
875
diff
changeset
|
3519 |
|
2189 | 3520 |
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest |
3926 | 3521 |
^ self diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:false |
3522 |
! |
|
3523 |
||
3524 |
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:extensionsOnly |
|
2939 | 3525 |
^ self |
3526 |
diffSetOfProject:aProject |
|
3527 |
againstRepositoryVersionFrom:aDateOrNilForNewest |
|
3528 |
orTag:nil |
|
3926 | 3529 |
extensionsOnly:extensionsOnly |
2939 | 3530 |
! |
3531 |
||
3532 |
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest orTag:aTagOrNil |
|
2950
cd6dc0f1d994
comment/format in: #diffSetOfProject:againstRepositoryVersionFrom:orTag:
Claus Gittinger <cg@exept.de>
parents:
2949
diff
changeset
|
3533 |
"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
|
3534 |
or a the version with a particular tag." |
2939 | 3535 |
|
3926 | 3536 |
^ self |
3537 |
diffSetOfProject:aProject |
|
3538 |
againstRepositoryVersionFrom:aDateOrNilForNewest |
|
3539 |
orTag:aTagOrNil |
|
3540 |
extensionsOnly:false |
|
3541 |
||
3542 |
"Modified: / 01-11-2010 / 21:02:52 / cg" |
|
3543 |
! |
|
3544 |
||
3545 |
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest orTag:aTagOrNil extensionsOnly:extensionsOnly |
|
4201 | 3546 |
"return a diffset against the version at a particular date (if not nil), |
3547 |
or a the version with a particular tag (if not nil), |
|
3548 |
or the newest (head) (if both are nil)." |
|
3926 | 3549 |
|
2189 | 3550 |
|classesInImage filesInImage module directory perProjectInfo |
3551 |
classesNotInRepository filesNotInImage classesDeletedInRepository |
|
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3552 |
classesModifiedInImage classesNotReallyModified classesReallyModified classesNewerInRepository |
2189 | 3553 |
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
|
3554 |
box doCleanup diffSet def autoloadedFilesNotInImage |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3555 |
autoloadedClassesInImage autoloadedFilesInImage versionMethodsAndDoitsRejected| |
2189 | 3556 |
|
3557 |
module := aProject asPackageId module. |
|
3558 |
directory := aProject asPackageId directory. |
|
3559 |
||
2939 | 3560 |
(aDateOrNilForNewest isNil and:[ aTagOrNil notNil ]) ifTrue:[ |
3561 |
perProjectInfo := SourceCodeManager revisionsInModule:module directory:directory taggedAs:aTagOrNil. |
|
3562 |
] ifFalse:[ |
|
3563 |
perProjectInfo := SourceCodeManager revisionsInModule:module directory:directory fromDate:aDateOrNilForNewest. |
|
3564 |
]. |
|
2189 | 3565 |
perProjectInfo := perProjectInfo ? #(). |
3566 |
perProjectInfo := perProjectInfo select:[:info | info key asFilename hasSuffix:'st']. |
|
3567 |
perProjectInfo := Dictionary withAssociations:perProjectInfo. |
|
3568 |
||
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3569 |
"/ to ignore version_xxx methods |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3570 |
versionMethodsAndDoitsRejected := |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3571 |
[:aChangeSet | |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3572 |
aChangeSet reject:[:chg | |
2949 | 3573 |
false "chg isMethodChangeForVersionMethod" |
3574 |
or:[false "chg isMethodChangeForExtensionsVersionMethod" |
|
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3575 |
or:[chg isDoIt]]] |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3576 |
]. |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3577 |
|
2189 | 3578 |
classesInImage := Smalltalk allClassesInPackage:aProject. |
3579 |
autoloadedClassesInImage := classesInImage reject:[:cls | cls isLoaded]. |
|
2903
482f5086773d
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
3580 |
classesInImage := classesInImage select:[:cls | cls isLoaded and:[cls isPrivate not]]. |
482f5086773d
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
3581 |
filesInImage := classesInImage collect:[:cls | cls classBaseFilename] as:Set. |
482f5086773d
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Stefan Vogel <sv@exept.de>
parents:
2864
diff
changeset
|
3582 |
autoloadedFilesInImage := autoloadedClassesInImage collect:[:cls | cls classBaseFilename] as:Set. |
2189 | 3583 |
"/ any differences ? |
3584 |
classesNotInRepository := classesInImage reject:[:cls | (perProjectInfo includesKey:cls classBaseFilename)]. |
|
3585 |
classesDeletedInRepository := classesInImage select:[:cls | (perProjectInfo at:cls classBaseFilename ifAbsent:nil) == #deleted]. |
|
3586 |
perProjectInfo := perProjectInfo reject:[:v | v == #deleted]. |
|
3587 |
filesNotInImage := perProjectInfo keys reject:[:file | (filesInImage includes:file)]. |
|
3588 |
filesNotInImage := filesNotInImage reject:[:file | (autoloadedFilesInImage includes:file)]. |
|
3589 |
filesNotInImage remove:'extensions.st' ifAbsent:[]. |
|
3590 |
||
4338 | 3591 |
"/ if comparing against the newest, only look for changed stuff |
2189 | 3592 |
classesModifiedInImage := classesInImage select:[:cls | ChangeSet current includesChangeForClassOrMetaclass:cls]. |
3593 |
classesModifiedInImage := classesModifiedInImage \ classesNotInRepository. |
|
3594 |
||
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3595 |
classesNewerInRepository := classesInImage |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3596 |
select:[:cls | |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3597 |
|v clsRevision| |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3598 |
|
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3599 |
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
|
3600 |
v notNil |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3601 |
and:[ cls isLoaded |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3602 |
and:[ (clsRevision := cls revision) notNil |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3603 |
and:[ v > clsRevision ]]] |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3604 |
]. |
2189 | 3605 |
|
3606 |
"/ stupid: as we do not have any revision information for extensions (sigh); |
|
3607 |
"/ we must checkout and look at the extension.st contents, to see if it has changed. |
|
3608 |
||
3609 |
extensionMethods := Smalltalk allExtensionsForPackage:aProject. |
|
3610 |
extensionsInImage := ChangeSet forExistingMethods:extensionMethods. |
|
3611 |
||
3612 |
[ |
|
3613 |
|s extensionsRevision| |
|
3614 |
||
3615 |
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
|
3616 |
[ |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3617 |
s := SourceCodeManager |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3618 |
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
|
3619 |
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
|
3620 |
s notNil ifTrue:[ |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3621 |
extensionsInRepository := ChangeSet fromStream:s. |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3622 |
]. |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3623 |
] ensure:[ |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3624 |
s notNil ifTrue:[s close] |
2189 | 3625 |
]. |
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3626 |
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
|
3627 |
|
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3628 |
"/ 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
|
3629 |
extensionsInRepository := versionMethodsAndDoitsRejected value:extensionsInRepository. |
2189 | 3630 |
] value. |
3631 |
extensionDiffs := extensionsInRepository diffSetsAgainst:extensionsInImage. |
|
3926 | 3632 |
extensionsOnly ifTrue:[ |
3633 |
^ extensionDiffs |
|
3634 |
]. |
|
3635 |
||
2189 | 3636 |
diffSet := extensionDiffs copy. |
3637 |
||
2939 | 3638 |
(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
|
3639 |
"/ we could do the same as below for each class. |
2189 | 3640 |
"/ however - as we do have change-info and revision info, we can avoid checking out |
3641 |
"/ for all classes which are not changed and which have the same version info. |
|
3642 |
classesModifiedInImage notEmpty ifTrue:[ |
|
3643 |
classesReallyModified := |
|
3644 |
classesModifiedInImage select:[:eachChangedClass | |
|
3645 |
|currentVersion repositoryVersion s stFile diffs| |
|
3646 |
||
3647 |
stFile := eachChangedClass classBaseFilename. |
|
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3648 |
[ |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3649 |
s := SourceCodeManager |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3650 |
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
|
3651 |
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
|
3652 |
s notNil ifTrue:[ |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3653 |
repositoryVersion := ChangeSet fromStream:s. |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3654 |
]. |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3655 |
] ensure:[ |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3656 |
s notNil ifTrue:[s close]. |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3657 |
]. |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3658 |
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
|
3659 |
repositoryVersion := versionMethodsAndDoitsRejected value:repositoryVersion. |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3660 |
|
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3661 |
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
|
3662 |
currentVersion := versionMethodsAndDoitsRejected value:currentVersion. |
2189 | 3663 |
diffs := repositoryVersion diffSetsAgainst:currentVersion . |
3664 |
diffSet addDiffSet:diffs. |
|
3665 |
diffs notEmpty |
|
3666 |
]. |
|
3667 |
||
3668 |
classesNotReallyModified := classesModifiedInImage \ classesReallyModified. |
|
3669 |
]. |
|
3670 |
] ifFalse:[ |
|
3671 |
classesReallyModified := |
|
3672 |
classesInImage select:[:eachClass | |
|
3673 |
|currentVersion repositoryVersion s stFile stRevision diffs| |
|
3674 |
||
3675 |
stFile := eachClass classBaseFilename. |
|
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3676 |
stRevision := perProjectInfo at:stFile ifAbsent:nil. |
4338 | 3677 |
eachClass revision = stRevision ifTrue:[ |
3678 |
false |
|
3679 |
] ifFalse:[ |
|
3680 |
stRevision notNil ifTrue:[ |
|
3681 |
[ |
|
3682 |
s := SourceCodeManager |
|
3683 |
streamForClass:nil fileName:stFile revision:stRevision |
|
3684 |
directory:directory module:module cache:true. |
|
3685 |
s notNil ifTrue:[ |
|
3686 |
repositoryVersion := ChangeSet fromStream:s. |
|
3687 |
]. |
|
3688 |
] ensure:[ |
|
3689 |
s notNil ifTrue:[s close]. |
|
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3690 |
]. |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3691 |
]. |
4338 | 3692 |
repositoryVersion isNil ifTrue:[ |
3693 |
repositoryVersion := ChangeSet new. |
|
3694 |
]. |
|
3695 |
repositoryVersion := versionMethodsAndDoitsRejected value:repositoryVersion. |
|
3696 |
||
3697 |
currentVersion := ChangeSet forExistingClass:eachClass withExtensions:false withLooseMethods:true. |
|
3698 |
currentVersion := versionMethodsAndDoitsRejected value:currentVersion. |
|
3699 |
diffs := repositoryVersion diffSetsAgainst:currentVersion . |
|
3700 |
diffSet addDiffSet:diffs. |
|
3701 |
diffs notEmpty |
|
2295
505293d1cfbd
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2294
diff
changeset
|
3702 |
]. |
2189 | 3703 |
]. |
3704 |
]. |
|
3705 |
||
3706 |
filesNotInImage notEmpty ifTrue:[ |
|
3707 |
"/ first, check if these are autoloaded classes which have NOT been installed |
|
3708 |
"/ (for example, due to a --quick argument during startup) |
|
3709 |
autoloadedFilesNotInImage := OrderedCollection new. |
|
3710 |
||
3711 |
def := ProjectDefinition definitionClassForPackage:aProject createIfAbsent:false projectType:nil. |
|
3712 |
def notNil ifTrue:[ |
|
3713 |
def classNamesAndAttributesDo:[:eachClassname :eachAttributes | |
|
3714 |
|cls eachFileName isAutoload| |
|
3715 |
||
3716 |
cls := Smalltalk classNamed:eachClassname. |
|
3717 |
cls isNil ifTrue:[ |
|
3718 |
isAutoload := eachAttributes includes:#autoload. |
|
3719 |
isAutoload ifTrue:[ |
|
3720 |
eachFileName := Smalltalk fileNameForClass:eachClassname. |
|
3721 |
autoloadedFilesNotInImage add:(eachFileName , '.st') |
|
3722 |
] |
|
3723 |
] |
|
3724 |
]. |
|
3725 |
]. |
|
3726 |
||
3727 |
(filesNotInImage \ autoloadedFilesNotInImage) do:[:eachSTFile | |
|
3728 |
|s chgSet classDefinitions| |
|
3729 |
||
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3730 |
[ |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3731 |
s := SourceCodeManager |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3732 |
streamForClass:nil fileName:eachSTFile revision:#newest directory:directory module:module cache:true. |
3594
407ae2f32318
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3733 |
s isNil ifTrue:[ |
407ae2f32318
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3734 |
chgSet := ChangeSet new |
407ae2f32318
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3735 |
] ifFalse:[ |
407ae2f32318
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3736 |
chgSet := ChangeSet fromStream:s. |
407ae2f32318
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3591
diff
changeset
|
3737 |
] |
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3738 |
] ensure:[ |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3739 |
s notNil ifTrue:[s close]. |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3740 |
]. |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3741 |
chgSet := versionMethodsAndDoitsRejected value:chgSet. |
2189 | 3742 |
diffSet onlyInReceiver addAll:chgSet |
3743 |
]. |
|
3744 |
]. |
|
3745 |
||
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3746 |
classesNewerInRepository notEmpty ifTrue:[ |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3747 |
classesNewerInRepository do:[:eachClass| |
2189 | 3748 |
|s diffs repositoryVersion currentVersion| |
3749 |
||
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3750 |
[ |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3751 |
s := SourceCodeManager |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3752 |
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
|
3753 |
repositoryVersion := ChangeSet fromStream:s. |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3754 |
] ensure:[ |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3755 |
s notNil ifTrue:[s close]. |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3756 |
]. |
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3757 |
|
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3758 |
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
|
3759 |
currentVersion := versionMethodsAndDoitsRejected value:currentVersion. |
2189 | 3760 |
diffs := repositoryVersion diffSetsAgainst:currentVersion . |
3761 |
diffSet addDiffSet:diffs. |
|
3762 |
]. |
|
3763 |
]. |
|
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3764 |
|
2189 | 3765 |
classesDeletedInRepository notEmpty ifTrue:[ |
3766 |
"/ self halt. |
|
3767 |
]. |
|
3768 |
classesNotInRepository notEmpty ifTrue:[ |
|
3769 |
"/ if there are no changeSet entries for those classes, they seem to be |
|
3770 |
"/ no longer in the repository (possibly moved ?) |
|
3771 |
"/ If there are entries, these might have been added in the image and need a check-in |
|
3772 |
||
3773 |
classesAddedInImage := classesNotInRepository \ classesDeletedInRepository. |
|
3774 |
classesAddedInImage do:[:eachAddedClass | |
|
3775 |
|currentVersion| |
|
3776 |
||
2948
548a75a5a3b5
project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
3777 |
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
|
3778 |
currentVersion := versionMethodsAndDoitsRejected value:currentVersion. |
2189 | 3779 |
diffSet onlyInArg addAll:currentVersion. |
3780 |
]. |
|
3781 |
]. |
|
3782 |
||
3783 |
diffSet isEmpty ifTrue:[ |
|
3784 |
"/ Dialog information:(resources string:'%1 is up-to-date.' with:eachProject allBold). |
|
3785 |
Transcript showCR:('%1 is up-to-date.' bindWith:aProject allBold). |
|
3786 |
(ChangeSet current includesChangeForPackage:aProject) ifTrue:[ |
|
3787 |
(Dialog confirm:('%1 is up-to-date.\\Cleanup ChangeSet ?' bindWith:aProject allBold) withCRs) ifTrue:[ |
|
3788 |
ChangeSet current condenseChangesForPackage:aProject. |
|
3789 |
]. |
|
3790 |
]. |
|
2286
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3791 |
^ diffSet. |
2189 | 3792 |
]. |
3793 |
||
3906 | 3794 |
diffSet sortByClassName. |
3795 |
||
2189 | 3796 |
"/ as a side-effect, if we find that some classes are modified but the same as in the repository, |
3797 |
"/ give user a chance to cleanup the changeSet here. |
|
3798 |
aDateOrNilForNewest isNil ifTrue:[ |
|
3799 |
classesNotReallyModified notEmptyOrNil ifTrue:[ |
|
3800 |
doCleanup := false. |
|
3801 |
box := Dialog |
|
3802 |
forRequestText:(resources |
|
2939 | 3803 |
stringWithCRs:'The following classes from %1 are equal to the repository version.\\Remove entries from the changeSet?' |
2189 | 3804 |
with:aProject allBold) |
3805 |
editViewClass:ListView |
|
3806 |
lines:10 columns:20 |
|
3199
830195868b71
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3155
diff
changeset
|
3807 |
initialAnswer:nil |
2189 | 3808 |
setupWith: |
3809 |
[:v :d | |
|
3810 |
|removeButton| |
|
3811 |
||
3812 |
v list:classesNotReallyModified. |
|
3813 |
removeButton := Button label:(resources string:'Cleanup ChangeSet'). |
|
3814 |
removeButton action:[ doCleanup := true. box okPressed. ]. |
|
3815 |
d addButton:removeButton after:(d okButton). |
|
3816 |
d okButton label:(resources string:'Continue'). |
|
3817 |
d okButton isReturnButton:false. |
|
3818 |
removeButton isReturnButton:true. |
|
3819 |
]. |
|
3820 |
box open. |
|
2286
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3821 |
box accepted ifTrue:[ |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3822 |
doCleanup ifTrue:[ |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3823 |
classesNotReallyModified do:[:class | |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3824 |
ChangeSet current condenseChangesForClass:class. |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3825 |
] |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3826 |
]. |
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3827 |
] |
2189 | 3828 |
]. |
3829 |
]. |
|
3830 |
^ diffSet |
|
2286
ad425b1c40ab
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2284
diff
changeset
|
3831 |
|
2295
505293d1cfbd
changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents:
2294
diff
changeset
|
3832 |
"Modified: / 01-11-2010 / 21:02:52 / cg" |
4201 | 3833 |
"Modified (comment): / 04-02-2017 / 18:49:12 / cg" |
4338 | 3834 |
"Modified: / 02-07-2018 / 14:01:01 / Claus Gittinger" |
2189 | 3835 |
! |
3836 |
||
2939 | 3837 |
diffSetOfProject:aProject againstRepositoryVersionTaggedAs:symbolicName |
3838 |
^ self |
|
3839 |
diffSetOfProject:aProject |
|
3840 |
againstRepositoryVersionFrom:nil |
|
3841 |
orTag:symbolicName |
|
3842 |
! |
|
3843 |
||
4132 | 3844 |
diffSetOfProject:aProject againstRepositoryVersionTaggedAs:aTag extensionsOnly:extensionsOnly |
3845 |
^ self |
|
3846 |
diffSetOfProject:aProject |
|
3847 |
againstRepositoryVersionFrom:nil |
|
3848 |
orTag:aTag |
|
3849 |
extensionsOnly:extensionsOnly |
|
3850 |
||
3851 |
"Created: / 12-11-2016 / 03:41:23 / cg" |
|
3852 |
! |
|
3853 |
||
4201 | 3854 |
diffSetOfProject:aProject |
3855 |
repositoryVersionFrom:aDateOrNilV1 orTag:aTagOrNilV1 |
|
3856 |
againstRepositoryVersionFrom:aDateOrNilV2 orTag:aTagOrNilV2 extensionsOnly:extensionsOnly |
|
3857 |
"return a diffset of two repository versions, |
|
3858 |
each specified by either a version at a particular date, |
|
3859 |
or a the version with a particular tag." |
|
3860 |
||
3861 |
|"classesInImage filesInImage" module directory |
|
3862 |
perProjectInfoV1 perProjectInfoV2 |
|
3863 |
filesInRepositoryV1 filesInRepositoryV2 |
|
3864 |
filesAddedInV2 filesDeletedInV2 filesModified filesReallyModified |
|
4204 | 3865 |
unchanged "filesNotInImage" "classesAddedInImage extensionMethods" |
3866 |
extensionsInRepositoryV1 extensionsInRepositoryV2 extensionDiffs diffSet "autoloadedClassesInImage autoloadedFilesInImage" versionMethodsAndDoitsRejected| |
|
4201 | 3867 |
|
3868 |
module := aProject asPackageId module. |
|
3869 |
directory := aProject asPackageId directory. |
|
3870 |
||
3871 |
(aDateOrNilV1 isNil and:[ aTagOrNilV1 isNil ]) ifTrue:[ self error:'must specify either date or tag']. |
|
3872 |
(aDateOrNilV2 isNil and:[ aTagOrNilV2 isNil ]) ifTrue:[ self error:'must specify either date or tag']. |
|
3873 |
||
3874 |
aDateOrNilV1 isNil ifTrue:[ |
|
3875 |
perProjectInfoV1 := SourceCodeManager revisionsInModule:module directory:directory taggedAs:aTagOrNilV1. |
|
3876 |
] ifFalse:[ |
|
3877 |
perProjectInfoV1 := SourceCodeManager revisionsInModule:module directory:directory fromDate:aDateOrNilV1. |
|
3878 |
]. |
|
3879 |
perProjectInfoV1 := perProjectInfoV1 ? #(). |
|
3880 |
perProjectInfoV1 := perProjectInfoV1 select:[:info | info key asFilename hasSuffix:'st']. |
|
3881 |
perProjectInfoV1 := Dictionary withAssociations:perProjectInfoV1. |
|
3882 |
||
3883 |
aDateOrNilV2 isNil ifTrue:[ |
|
3884 |
perProjectInfoV2 := SourceCodeManager revisionsInModule:module directory:directory taggedAs:aTagOrNilV2. |
|
3885 |
] ifFalse:[ |
|
3886 |
perProjectInfoV2 := SourceCodeManager revisionsInModule:module directory:directory fromDate:aDateOrNilV2. |
|
3887 |
]. |
|
3888 |
perProjectInfoV2 := perProjectInfoV2 ? #(). |
|
3889 |
perProjectInfoV2 := perProjectInfoV2 select:[:info | info key asFilename hasSuffix:'st']. |
|
3890 |
perProjectInfoV2 := Dictionary withAssociations:perProjectInfoV2. |
|
3891 |
||
3892 |
filesInRepositoryV1 := perProjectInfoV1 keys. |
|
3893 |
filesInRepositoryV2 := perProjectInfoV2 keys. |
|
3894 |
filesInRepositoryV1 := filesInRepositoryV1 reject:[:fileName | (perProjectInfoV1 at:fileName) == #deleted]. |
|
3895 |
filesInRepositoryV2 := filesInRepositoryV2 reject:[:fileName | (perProjectInfoV2 at:fileName) == #deleted]. |
|
3896 |
||
3897 |
"/ first remove classes which have the same version |
|
3898 |
unchanged := filesInRepositoryV1 select:[:fileName | |
|
3899 |
(filesInRepositoryV2 includes:fileName) |
|
3900 |
and:[ (perProjectInfoV1 at:fileName) = (perProjectInfoV2 at:fileName) ] |
|
3901 |
]. |
|
3902 |
filesInRepositoryV1 removeAll:unchanged. |
|
3903 |
filesInRepositoryV2 removeAll:unchanged. |
|
3904 |
||
3905 |
filesAddedInV2 := filesInRepositoryV2 select:[:fileName | (filesInRepositoryV1 includes:fileName) not]. |
|
3906 |
filesDeletedInV2 := filesInRepositoryV1 select:[:fileName | (filesInRepositoryV2 includes:fileName) not]. |
|
3907 |
||
3908 |
filesModified := filesInRepositoryV1 select:[:fileName | filesInRepositoryV2 includes:fileName]. |
|
3909 |
||
3910 |
"/ to ignore version_xxx methods |
|
3911 |
versionMethodsAndDoitsRejected := |
|
3912 |
[:aChangeSet | |
|
3913 |
aChangeSet reject:[:chg | |
|
3914 |
false "chg isMethodChangeForVersionMethod" |
|
3915 |
or:[false "chg isMethodChangeForExtensionsVersionMethod" |
|
3916 |
or:[chg isDoIt]]] |
|
3917 |
]. |
|
3918 |
||
3919 |
"/ stupid: as we do not have any revision information for extensions (sigh); |
|
3920 |
"/ we must checkout and look at the extension.st contents, to see if it has changed. |
|
3921 |
||
3922 |
[ |
|
3923 |
|s extensionsRevisionV1 extensionsRevisionV2| |
|
3924 |
||
3925 |
extensionsRevisionV1 := perProjectInfoV1 at:'extensions.st' ifAbsent:nil. |
|
3926 |
extensionsRevisionV1 notNil ifTrue:[ |
|
3927 |
[ |
|
3928 |
s := SourceCodeManager |
|
3929 |
streamForClass:nil fileName:'extensions.st' revision:extensionsRevisionV1 |
|
3930 |
directory:directory module:module cache:true. |
|
3931 |
s notNil ifTrue:[ |
|
3932 |
extensionsInRepositoryV1 := ChangeSet fromStream:s. |
|
3933 |
]. |
|
3934 |
] ensure:[ |
|
3935 |
s notNil ifTrue:[s close] |
|
3936 |
]. |
|
3937 |
]. |
|
3938 |
extensionsInRepositoryV1 isNil ifTrue:[ |
|
3939 |
extensionsInRepositoryV1 := ChangeSet new |
|
3940 |
] ifFalse:[ |
|
3941 |
"/ ignore package doIts and all extensionVersion_xxx methods |
|
3942 |
extensionsInRepositoryV1 := versionMethodsAndDoitsRejected value:extensionsInRepositoryV1. |
|
3943 |
]. |
|
3944 |
||
3945 |
"/ ------ |
|
3946 |
extensionsRevisionV2 := perProjectInfoV2 at:'extensions.st' ifAbsent:nil. |
|
3947 |
extensionsRevisionV2 notNil ifTrue:[ |
|
3948 |
[ |
|
3949 |
s := SourceCodeManager |
|
3950 |
streamForClass:nil fileName:'extensions.st' revision:extensionsRevisionV2 |
|
3951 |
directory:directory module:module cache:true. |
|
3952 |
s notNil ifTrue:[ |
|
3953 |
extensionsInRepositoryV1 := ChangeSet fromStream:s. |
|
3954 |
]. |
|
3955 |
] ensure:[ |
|
3956 |
s notNil ifTrue:[s close] |
|
3957 |
]. |
|
3958 |
]. |
|
3959 |
extensionsInRepositoryV2 isNil ifTrue:[ |
|
3960 |
extensionsInRepositoryV2 := ChangeSet new |
|
3961 |
] ifFalse:[ |
|
3962 |
"/ ignore package doIts and all extensionVersion_xxx methods |
|
3963 |
extensionsInRepositoryV2 := versionMethodsAndDoitsRejected value:extensionsInRepositoryV2. |
|
3964 |
]. |
|
3965 |
] value. |
|
3966 |
||
3967 |
extensionDiffs := extensionsInRepositoryV1 diffSetsAgainst:extensionsInRepositoryV2. |
|
3968 |
extensionsOnly ifTrue:[ |
|
3969 |
^ extensionDiffs |
|
3970 |
]. |
|
3971 |
||
3972 |
diffSet := extensionDiffs copy. |
|
3973 |
||
3974 |
filesReallyModified := |
|
3975 |
filesInRepositoryV2 select:[:eachFile | |
|
3976 |
|repositoryVersion1 repositoryVersion2 s stRevision diffs| |
|
3977 |
||
3978 |
stRevision := perProjectInfoV1 at:eachFile ifAbsent:nil. |
|
3979 |
stRevision notNil ifTrue:[ |
|
3980 |
[ |
|
3981 |
s := SourceCodeManager |
|
3982 |
streamForClass:nil fileName:eachFile revision:stRevision |
|
3983 |
directory:directory module:module cache:true. |
|
3984 |
s notNil ifTrue:[ |
|
3985 |
repositoryVersion1 := ChangeSet fromStream:s. |
|
3986 |
]. |
|
3987 |
] ensure:[ |
|
3988 |
s notNil ifTrue:[s close]. |
|
3989 |
]. |
|
3990 |
]. |
|
3991 |
repositoryVersion1 isNil ifTrue:[ |
|
3992 |
repositoryVersion1 := ChangeSet new. |
|
3993 |
]. |
|
3994 |
repositoryVersion1 := versionMethodsAndDoitsRejected value:repositoryVersion1. |
|
3995 |
||
3996 |
stRevision := perProjectInfoV2 at:eachFile ifAbsent:nil. |
|
3997 |
stRevision notNil ifTrue:[ |
|
3998 |
[ |
|
3999 |
s := SourceCodeManager |
|
4000 |
streamForClass:nil fileName:eachFile revision:stRevision |
|
4001 |
directory:directory module:module cache:true. |
|
4002 |
s notNil ifTrue:[ |
|
4003 |
repositoryVersion2 := ChangeSet fromStream:s. |
|
4004 |
]. |
|
4005 |
] ensure:[ |
|
4006 |
s notNil ifTrue:[s close]. |
|
4007 |
]. |
|
4008 |
]. |
|
4009 |
repositoryVersion2 isNil ifTrue:[ |
|
4010 |
repositoryVersion2 := ChangeSet new. |
|
4011 |
]. |
|
4012 |
repositoryVersion2 := versionMethodsAndDoitsRejected value:repositoryVersion2. |
|
4013 |
||
4014 |
diffs := repositoryVersion1 diffSetsAgainst:repositoryVersion2 . |
|
4015 |
diffSet addDiffSet:diffs. |
|
4016 |
diffs notEmpty |
|
4017 |
]. |
|
4018 |
||
4019 |
diffSet isEmpty ifTrue:[ |
|
4020 |
"/ Dialog information:(resources string:'%1 is up-to-date.' with:eachProject allBold). |
|
4021 |
Transcript showCR:('%1 not changed between %2 and %3.' |
|
4022 |
bindWith:aProject allBold |
|
4023 |
with:(aDateOrNilV1 ? aTagOrNilV1) |
|
4024 |
with:(aDateOrNilV2 ? aTagOrNilV2)). |
|
4025 |
^ diffSet. |
|
4026 |
]. |
|
4027 |
||
4028 |
diffSet sortByClassName. |
|
4029 |
^ diffSet |
|
4030 |
||
4031 |
"Created: / 04-02-2017 / 17:27:47 / cg" |
|
4204 | 4032 |
"Modified: / 05-02-2017 / 10:04:50 / cg" |
4201 | 4033 |
! |
4034 |
||
2691 | 4035 |
ensureCorrectVersionMethodsInClass:aClass usingManager:aManager |
3674
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4036 |
|theMetaclass versionMthd src newSrc versionMethodName oldVersionMethodName| |
2383 | 4037 |
|
4038 |
theMetaclass := aClass theMetaclass. |
|
4039 |
versionMethodName := aManager nameOfVersionMethodInClasses. |
|
2442
7ecd9a4248bb
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2426
diff
changeset
|
4040 |
oldVersionMethodName := aClass nameOfOldVersionMethod. |
2383 | 4041 |
|
4042 |
(theMetaclass includesSelector:versionMethodName) ifTrue:[ |
|
2442
7ecd9a4248bb
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2426
diff
changeset
|
4043 |
"/ (theMetaclass includesSelector:oldVersionMethodName) ifTrue:[ |
7ecd9a4248bb
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2426
diff
changeset
|
4044 |
"/ theMetaclass removeSelector:oldVersionMethodName. |
7ecd9a4248bb
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2426
diff
changeset
|
4045 |
"/ ]. |
2383 | 4046 |
"/ ensure that my version method is parsable (contains $'s) |
3674
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4047 |
versionMthd := theMetaclass compiledMethodAt:versionMethodName. |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4048 |
versionMthd notNil ifTrue:[ |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4049 |
src := versionMthd source. |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4050 |
src notNil ifTrue:[ |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4051 |
newSrc := aManager ensureDollarsInVersionMethod:src. |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4052 |
newSrc ~= src ifTrue:[ |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4053 |
theMetaclass compile:newSrc categorized:#documentation. |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4054 |
] |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4055 |
]. |
2383 | 4056 |
]. |
4057 |
] ifFalse:[ |
|
4058 |
(theMetaclass includesSelector:oldVersionMethodName) ifTrue:[ |
|
2487
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
4059 |
"/ but make sure, it is a version method for this sourcecodemanager... |
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
4060 |
(theMetaclass methodDictionary keys count:[:sel | sel startsWith:'version']) size == 1 ifTrue:[ |
3674
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4061 |
versionMthd := theMetaclass compiledMethodAt:oldVersionMethodName. |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4062 |
versionMthd notNil ifTrue:[ |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4063 |
src := versionMthd source. |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4064 |
(src startsWith:oldVersionMethodName) ifTrue:[ |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4065 |
newSrc := versionMethodName , (src copyFrom:(oldVersionMethodName size + 1)) |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4066 |
]. |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4067 |
theMetaclass compile:newSrc categorized:#documentation. |
d9b94d8afb2c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3657
diff
changeset
|
4068 |
] |
2487
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
4069 |
] |
2383 | 4070 |
]. |
4071 |
]. |
|
2442
7ecd9a4248bb
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2426
diff
changeset
|
4072 |
|
2487
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
4073 |
"Modified: / 20-08-2011 / 14:40:27 / cg" |
2691 | 4074 |
"Created: / 29-12-2011 / 14:33:46 / cg" |
2383 | 4075 |
! |
4076 |
||
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4077 |
fetchSourceOf:aClass askForRevision:askForRevision into:aBlockToReturnMultipleValues |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4078 |
"fetch the source of either the newest version or the revision being asked for, |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4079 |
or nil, if there are any problems. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4080 |
Helper method" |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4081 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4082 |
|classToCompare aStream comparedSource rev revString mgr |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4083 |
nm msg revisionInClass newestRev| |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4084 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4085 |
classToCompare := aClass theNonMetaclass. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4086 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4087 |
nm := classToCompare name. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4088 |
(mgr := manager) isNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4089 |
mgr := self sourceCodeManagerFor:classToCompare. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4090 |
mgr isNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4091 |
self error:'oops - no sourcecode manager' mayProceed:true. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4092 |
^ nil |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4093 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4094 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4095 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4096 |
rev := classToCompare revisionInfoOfManager:mgr. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4097 |
"/ rev := classToCompare binaryRevision. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4098 |
revisionInClass := classToCompare revisionOfManager:mgr. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4099 |
rev isNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4100 |
rev := revisionInClass |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4101 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4102 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4103 |
"/ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4104 |
"/ class in repository - ask for revision |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4105 |
"/ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4106 |
SourceCodeManagerError handle:[:ex | |
4448 | 4107 |
rev isNil ifTrue:[ |
4108 |
Dialog warn:'Class is not yet in the repository\(or classes revision info is missing or corrupted)' withCRs. |
|
4109 |
^ nil |
|
4110 |
]. |
|
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4111 |
Dialog warn:(resources |
4362 | 4112 |
stringWithCRs:'Could not fetch revision info of "%1".\Reported error: %4\\Please check your sourcecode manager settings of %2 for package: "%3".\(and possibly the network for reachability of the repository)' |
4113 |
with:classToCompare name |
|
4114 |
with:classToCompare sourceCodeManager managerTypeName |
|
4115 |
with:classToCompare package |
|
4116 |
with:(ex description asString withoutSeparators)). |
|
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4117 |
^ nil. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4118 |
] do:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4119 |
newestRev := mgr newestRevisionOf:classToCompare. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4120 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4121 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4122 |
askForRevision ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4123 |
msg := resources string:'Compare to revision: (empty for newest)'. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4124 |
rev notNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4125 |
msg := msg , '\\' , (resources string:'Current %1 is based upon rev %2.' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4126 |
with:nm allBold with:rev). |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4127 |
(revisionInClass notNil and:[revisionInClass ~= rev]) ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4128 |
msg := msg , '\' , (resources string:'And has been checked into the repository as %1.' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4129 |
with:revisionInClass) |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4130 |
] |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4131 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4132 |
newestRev notNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4133 |
msg := msg , '\' , (resources string:'Newest in repository is %1.' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4134 |
with:newestRev) |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4135 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4136 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4137 |
rev := self |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4138 |
askForExistingRevision:msg |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4139 |
title:'Compare with repository' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4140 |
class:classToCompare. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4141 |
] ifFalse:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4142 |
rev := newestRev. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4143 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4144 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4145 |
rev isNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4146 |
mgr = classToCompare sourceCodeManager ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4147 |
msg := 'Could not figure out the newest revision of "%1".\\Please check if this class is really contained in that repository,\and also your sourcecode manager settings of %2 for package: "%3".\(and possibly the network for reachability of the repository)' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4148 |
] ifFalse:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4149 |
msg := 'Could not figure out the newest revision of "%1".\\Notice that the class is actually maintained by %4, not %2.\Please check if this class is really in the %2 repository,\and also your sourcecode manager settings of %2 for package: "%3".\(and possibly the network for reachability of the repository)' |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4150 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4151 |
Dialog warn:(resources |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4152 |
stringWithCRs:msg |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4153 |
with:classToCompare name |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4154 |
with:mgr managerTypeName |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4155 |
with:classToCompare package |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4156 |
with:(classToCompare sourceCodeManager managerTypeName)). |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4157 |
^ nil. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4158 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4159 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4160 |
rev withoutSpaces isEmpty ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4161 |
msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4162 |
"/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4163 |
aStream := mgr getSourceStreamFor:classToCompare revision:newestRev. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4164 |
revString := '(newest: ' , (newestRev ? '???') , ')'. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4165 |
] ifFalse:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4166 |
msg := 'extracting previous %1'. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4167 |
aStream := mgr getSourceStreamFor:classToCompare revision:rev. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4168 |
revString := rev |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4169 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4170 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4171 |
aStream isNil ifTrue:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4172 |
self warn:'Could not extract source from repository (check repository settings / network)'. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4173 |
^ nil |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4174 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4175 |
aStream class readErrorSignal handle:[:ex | |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4176 |
self warn:('Read error while reading extracted source\\' , ex description) withCRs. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4177 |
aStream close. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4178 |
^ nil |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4179 |
] do:[ |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4180 |
comparedSource := aStream contents asString. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4181 |
]. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4182 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4183 |
aStream close. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4184 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4185 |
aBlockToReturnMultipleValues |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4186 |
value:revString |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4187 |
value:revisionInClass |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4188 |
value:mgr. |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4189 |
^ comparedSource |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4190 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4191 |
" |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4192 |
self compareClassWithRepository:Array |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4193 |
" |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4194 |
|
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4195 |
"Modified: / 24-07-2012 / 18:11:27 / cg" |
4448 | 4196 |
"Modified: / 23-06-2019 / 18:43:26 / Claus Gittinger" |
3896
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4197 |
! |
41784f108832
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3892
diff
changeset
|
4198 |
|
2383 | 4199 |
getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil forClass:aClass valuesInto:aBlock |
3325
944f6a6e66ff
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3313
diff
changeset
|
4200 |
"open a dialog, asking for commit/checkin log info. |
944f6a6e66ff
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3313
diff
changeset
|
4201 |
Returns 2 values: a log message and additional checkinInfo (containing things like |
944f6a6e66ff
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3313
diff
changeset
|
4202 |
markAsStable, etc,)" |
2383 | 4203 |
|
4359 | 4204 |
|initialLogMessage checkinInfo reasonLine logMessage| |
2383 | 4205 |
|
4206 |
"/ heuristics for a useful initial log message... |
|
4207 |
aLogInfoOrNil isNil ifTrue:[ |
|
4230 | 4208 |
initialLogMessage := (self class goodInitialLogMessageForCheckinClassOfClass:aClass) ? ''. |
2383 | 4209 |
"/ initial checkin ? |
3657
2de3a610d07c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3642
diff
changeset
|
4210 |
(aClass package isNil or:[(aClass revisionOfManager:manager) "revision" isNil]) ifTrue:[ |
2383 | 4211 |
initialLogMessage := 'initial checkin\\' withCRs , initialLogMessage |
4212 |
]. |
|
4320 | 4213 |
|
4359 | 4214 |
checkinInfo := self |
4215 |
getCheckinInfoFor:aClass name |
|
4216 |
initialAnswer:initialLogMessage |
|
4217 |
withQuickOption:false |
|
4218 |
withValidateConsistencyOption:true "aClass isProjectDefinition" |
|
4219 |
showChangesAction:[ |
|
4220 |
"/ that is passed to the dialog's 'what changed' button |
|
4221 |
self compareClassWithRepository:aClass askForRevision:false |
|
4222 |
]. |
|
4223 |
||
4224 |
checkinInfo isNil ifTrue:[^ false]. |
|
4225 |
||
4226 |
checkinInfo validateConsistency ifTrue:[ |
|
4227 |
aClass isProjectDefinition ifTrue:[ |
|
4228 |
self validateConsistencyOfPackage:aClass package doClasses:false doExtensions:false. |
|
4229 |
] ifFalse:[ |
|
4230 |
self validateConsistencyOfPackage:aClass doClasses:false doExtensions:false. |
|
4320 | 4231 |
]. |
4079 | 4232 |
]. |
4233 |
||
2383 | 4234 |
logMessage := checkinInfo logMessage. |
3900 | 4235 |
|
4236 |
reasonLine := '#OTHER'. |
|
4237 |
checkinInfo checkinReason == Tools::CheckinInfoDialog reasonBugfix ifTrue:[ |
|
4238 |
reasonLine := '#BUGFIX' |
|
4239 |
] ifFalse:[ |
|
4240 |
checkinInfo checkinReason == Tools::CheckinInfoDialog reasonFeature ifTrue:[ |
|
4241 |
reasonLine := '#FEATURE' |
|
4242 |
] ifFalse:[ |
|
4243 |
checkinInfo checkinReason == Tools::CheckinInfoDialog reasonRefactoring ifTrue:[ |
|
4244 |
reasonLine := '#REFACTORING' |
|
3906 | 4245 |
] ifFalse:[ |
4246 |
checkinInfo checkinReason == Tools::CheckinInfoDialog reasonDocumentation ifTrue:[ |
|
4247 |
reasonLine := '#DOCUMENTATION' |
|
4248 |
] ifFalse:[ |
|
4249 |
checkinInfo checkinReason == Tools::CheckinInfoDialog reasonUIEnhancement ifTrue:[ |
|
4250 |
reasonLine := '#UI_ENHANCEMENT' |
|
3971 | 4251 |
] ifFalse:[ |
4252 |
checkinInfo checkinReason == Tools::CheckinInfoDialog reasonQuality ifTrue:[ |
|
4253 |
reasonLine := '#QUALITY' |
|
4254 |
] ifFalse:[ |
|
4255 |
checkinInfo checkinReason == Tools::CheckinInfoDialog reasonTuning ifTrue:[ |
|
4256 |
reasonLine := '#TUNING' |
|
4257 |
] |
|
4258 |
] |
|
3906 | 4259 |
] |
4260 |
] |
|
3900 | 4261 |
] |
4262 |
] |
|
4263 |
] |
|
2383 | 4264 |
] ifFalse:[ |
4265 |
aLogInfoOrNil isString ifTrue:[ |
|
4266 |
"soon obsolete..." |
|
4267 |
logMessage := aLogInfoOrNil |
|
4268 |
] ifFalse:[ |
|
4269 |
checkinInfo := aLogInfoOrNil. |
|
4270 |
logMessage := checkinInfo logMessage. |
|
4271 |
]. |
|
4272 |
]. |
|
4273 |
logMessage notNil ifTrue:[ |
|
4274 |
logMessage := logMessage asSingleByteStringReplaceInvalidWith:$? |
|
4275 |
]. |
|
3974 | 4276 |
reasonLine isNil ifTrue:[ |
4277 |
reasonLine := '#OTHER'. |
|
3900 | 4278 |
]. |
3974 | 4279 |
logMessage := reasonLine , ' by ',OperatingSystem getLoginName,'\' withCRs |
4280 |
, (logMessage ? ''). |
|
2383 | 4281 |
aBlock value:logMessage value:checkinInfo. |
4282 |
^ true |
|
3971 | 4283 |
|
4284 |
"Modified: / 31-03-2016 / 17:58:11 / cg" |
|
4230 | 4285 |
"Modified: / 17-03-2017 / 18:00:12 / stefan" |
2383 | 4286 |
! |
4287 |
||
4201 | 4288 |
knownTagsInPackages:packages |
4289 |
"return the symbolic names given to any version in packages. |
|
4290 |
Being lazy, assume tags are persistent across packages (which they are not required to be...) |
|
4291 |
and only fetch the tag names from the first given package. |
|
4292 |
May raise an error, if the repository cannot be accessed" |
|
4293 |
||
4294 |
|someDfnClass| |
|
4295 |
||
4295 | 4296 |
someDfnClass := ProjectDefinition definitionClassForPackage:packages firstOrNil. |
4201 | 4297 |
someDfnClass isNil ifTrue:[ someDfnClass := Object projectDefinitionClass ]. |
4298 |
||
4299 |
^ (manager knownTagsFor:someDfnClass) asOrderedCollection sort. |
|
4300 |
||
4301 |
" |
|
4302 |
CVSSourceCodeManager utilities knownTagsInPackages:#( 'stx:libbasic' 'stc:libbasic2' ) |
|
4303 |
" |
|
4304 |
||
4305 |
"Created: / 04-02-2017 / 18:55:16 / cg" |
|
4295 | 4306 |
"Modified: / 29-12-2017 / 15:16:21 / stefan" |
4201 | 4307 |
! |
4308 |
||
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4309 |
removeSourceContainerForClass:aClass |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4310 |
"show container & let user confirm twice." |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4311 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4312 |
^ self removeSourceContainerForClass:aClass confirm:true warn:true |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4313 |
! |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4314 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4315 |
removeSourceContainerForClass:aClass confirm:doConfirm warn:doWarn |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4316 |
"show container & optionally let user confirm twice." |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4317 |
|
3814
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4318 |
|info mgr| |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4319 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4320 |
aClass isLoaded ifFalse:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4321 |
doWarn ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4322 |
self warn:(resources string:'Please load the class first.'). |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4323 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4324 |
^ false. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4325 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4326 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4327 |
"/ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4328 |
"/ 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
|
4329 |
"/ if so, take that as a default. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4330 |
"/ |
1782 | 4331 |
mgr := self sourceCodeManagerFor:aClass. |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4332 |
mgr isNil ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4333 |
^ false |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4334 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4335 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4336 |
info := mgr sourceInfoOfClass:aClass. |
3814
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4337 |
^ self removeSourceContainerForClass:aClass usingSourceInfo:info confirm:doConfirm warn:doWarn |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4338 |
|
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4339 |
"Modified: / 16-07-2013 / 19:46:50 / cg" |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4340 |
! |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4341 |
|
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4342 |
removeSourceContainerForClass:aClass usingSourceInfo:info confirm:doConfirm warn:doWarn |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4343 |
"show container & optionally let user confirm twice." |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4344 |
|
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4345 |
|module directory fileName mgr| |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4346 |
|
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4347 |
aClass isLoaded ifFalse:[ |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4348 |
doWarn ifTrue:[ |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4349 |
self warn:(resources string:'Please load the class first.'). |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4350 |
]. |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4351 |
^ false. |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4352 |
]. |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4353 |
|
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4354 |
"/ |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4355 |
"/ ask the sourceCodeManager if it knows anything about that class |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4356 |
"/ if so, take that as a default. |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4357 |
"/ |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4358 |
mgr := self sourceCodeManagerFor:aClass. |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4359 |
mgr isNil ifTrue:[ |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4360 |
^ false |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4361 |
]. |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4362 |
|
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4363 |
info notNil ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4364 |
(info includesKey:#module) ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4365 |
module := (info at:#module). |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4366 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4367 |
(info includesKey:#directory) ifTrue:[ |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
4368 |
directory := (info at:#directory). |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4369 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4370 |
fileName := mgr containerFromSourceInfo:info. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4371 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4372 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4373 |
module isNil ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4374 |
doWarn ifTrue:[ |
1423 | 4375 |
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
|
4376 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4377 |
^ false. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4378 |
]. |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
4379 |
directory isNil ifTrue:[ |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4380 |
doWarn ifTrue:[ |
1423 | 4381 |
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
|
4382 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4383 |
^ false. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4384 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4385 |
fileName isNil ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4386 |
doWarn ifTrue:[ |
1423 | 4387 |
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
|
4388 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4389 |
^ false. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4390 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4391 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4392 |
OperatingSystem isMSDOSlike ifTrue:[ |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
4393 |
"cvs expects unix-filenames" |
3591
d86841bb0d5c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3579
diff
changeset
|
4394 |
module := module asUnixFilenameString. |
d86841bb0d5c
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3579
diff
changeset
|
4395 |
directory := directory asUnixFilenameString. |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4396 |
]. |
1787 | 4397 |
(mgr checkForExistingContainer:fileName inModule:module directory:directory) ifFalse:[ |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4398 |
doWarn ifTrue:[ |
4447 | 4399 |
self warn:(resources stringWithCRs:'Class %1 had no source container (or SCM access is broken).' |
4400 |
with:aClass name) . |
|
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4401 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4402 |
^ false. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4403 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4404 |
|
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4405 |
doConfirm ifTrue:[ |
4447 | 4406 |
Dialog |
4407 |
modifyingBoxWith:[:box | |
|
4408 |
(YesToAllNotification notNil and:[YesToAllNotification isHandled]) ifTrue:[ |
|
4409 |
box |
|
4410 |
addButton:(Button label:'Remove All' |
|
4411 |
action:[YesToAllNotification queryWith:true. box hide. true]) |
|
4412 |
after:box noButton |
|
4413 |
]. |
|
4414 |
] |
|
4415 |
do:[ |
|
4416 |
(Dialog |
|
4417 |
choose:(resources |
|
4418 |
stringWithCRs:'Please confirm removal of the container for %1:\\container: %2 / %3 / %4\\Really remove ?' |
|
4419 |
with:aClass name |
|
4420 |
with:module |
|
4421 |
with:directory |
|
4422 |
with:fileName) |
|
4423 |
labels:(Array |
|
4424 |
with:(resources string:'No') |
|
4425 |
with:(resources string:'Remove')) |
|
4426 |
values:#(false true) |
|
4427 |
default:false) ifFalse:[ |
|
4428 |
^ false. |
|
4429 |
]. |
|
4430 |
]. |
|
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4431 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4432 |
|
3814
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4433 |
(mgr removeContainer:fileName inModule:module directory:directory) |
466fa886aa65
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3812
diff
changeset
|
4434 |
ifFalse:[ |
976
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4435 |
doWarn ifTrue:[ |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4436 |
self warn:(resources string:'failed to remove container.'). |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4437 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4438 |
^ true. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4439 |
]. |
cedcdc7e405c
utitity to remove a container
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
4440 |
^ false |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
4441 |
|
3351
68989ed1137f
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
4442 |
"Modified: / 16-07-2013 / 19:46:50 / cg" |
4447 | 4443 |
"Modified: / 23-06-2019 / 16:28:17 / Claus Gittinger" |
1000 | 4444 |
! |
4445 |
||
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4446 |
repositoryLogOf:aClass onto:aStream |
2050
037e794f5857
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
4447 |
self repositoryLogOf:aClass short:false onto:aStream |
037e794f5857
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
4448 |
! |
037e794f5857
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
4449 |
|
037e794f5857
+option to show a short revision log
Claus Gittinger <cg@exept.de>
parents:
2042
diff
changeset
|
4450 |
repositoryLogOf:aClass short:shortOrNot onto:aStream |
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4451 |
|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
|
4452 |
|
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4453 |
info := aClass revisionInfo. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4454 |
|
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4455 |
rv := aClass binaryRevision. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4456 |
rv notNil ifTrue:[ |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4457 |
aStream nextPutLine:'**** Loaded classes binary information ****'; cr. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4458 |
aStream nextPutLine:' Binary based upon : ' , rv. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4459 |
aStream cr. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4460 |
]. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4461 |
|
3344
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4462 |
"/ old |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4463 |
"/ info isNil ifTrue:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4464 |
"/ aStream nextPutLine:'No revision info found'. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4465 |
"/ aClass isLoaded ifFalse:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4466 |
"/ aStream cr; nextPutAll:'This is an autoloaded class - you may see more after it is loaded.' |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4467 |
"/ ] ifTrue:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4468 |
"/ fn := aClass classFilename. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4469 |
"/ aClass wasAutoloaded ifTrue:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4470 |
"/ msg := 'This class was autoloaded.'. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4471 |
"/ msg := msg , ' (from ''' , fn , ''')'. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4472 |
"/ ] ifFalse:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4473 |
"/ msg := 'This class was loaded from ''' , fn , '''.' |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4474 |
"/ ]. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4475 |
"/ msg notNil ifTrue:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4476 |
"/ aStream cr; nextPutAll:msg. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4477 |
"/ ] |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4478 |
"/ ]. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4479 |
"/ ^ self |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4480 |
"/ ] |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4481 |
|
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4482 |
info isNil ifTrue:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4483 |
aClass isLoaded ifFalse:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4484 |
aStream nextPutLine:'This is an autoloaded class - you may see more after it is loaded.' |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4485 |
] ifTrue:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4486 |
fn := aClass classFilename. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4487 |
aClass wasAutoloaded ifTrue:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4488 |
msg := 'This class was autoloaded.'. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4489 |
msg := msg , ' (from ''' , fn , ''')'. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4490 |
] ifFalse:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4491 |
msg := 'This class was loaded from ''' , fn , '''.' |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4492 |
]. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4493 |
msg notNil ifTrue:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4494 |
aStream nextPutLine:msg. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4495 |
] |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4496 |
]. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4497 |
aStream cr. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4498 |
] ifFalse:[ |
2041 | 4499 |
(info revision notNil) ifFalse:[ |
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4500 |
aStream nextPutLine:'WARNING:'; cr. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4501 |
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
|
4502 |
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
|
4503 |
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
|
4504 |
aStream cr. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4505 |
]. |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4506 |
|
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4507 |
aStream nextPutLine:'**** Classes source information ****'; cr. |
2042 | 4508 |
s := info repositoryPathName. |
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4509 |
s notNil ifTrue:[ |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4510 |
aStream nextPutLine:' Source repository : ' , s |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4511 |
]. |
3676
51859e5df3b5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3674
diff
changeset
|
4512 |
aStream nextPutLine:(' Filename ........ : %1' bindWith: (info fileName ? '?')). |
51859e5df3b5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3674
diff
changeset
|
4513 |
info symbolicVersionName ~= info revision ifTrue:[ |
51859e5df3b5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3674
diff
changeset
|
4514 |
aStream nextPutLine:(' Symbolic Version : %1' bindWith: (info symbolicVersionName ? '?')). |
51859e5df3b5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3674
diff
changeset
|
4515 |
]. |
51859e5df3b5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3674
diff
changeset
|
4516 |
aStream nextPutLine:(' Revision ........ : %1' bindWith: (info revision ? '?')). |
51859e5df3b5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3674
diff
changeset
|
4517 |
aStream nextPutLine:(' Checkin date .... : %1 %2 %3' bindWith: (info date ? '?') |
51859e5df3b5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3674
diff
changeset
|
4518 |
with:(info time ? '?') |
51859e5df3b5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3674
diff
changeset
|
4519 |
with:(info timezone ? '')). |
51859e5df3b5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3674
diff
changeset
|
4520 |
aStream nextPutLine:(' Checkin user .... : %1' bindWith: (info user ? '?')). |
3344
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4521 |
]. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4522 |
|
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4523 |
(info2 := aClass packageSourceCodeInfo) notNil ifTrue:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4524 |
aStream nextPutLine:' Repository: ..... : ' , (info2 at:#module ifAbsent:'?'). |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4525 |
aStream nextPutLine:' Directory: ...... : ' , (info2 at:#directory ifAbsent:'?'). |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4526 |
]. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4527 |
info notNil ifTrue:[ |
2042 | 4528 |
aStream nextPutLine:' Container ....... : ' , (info repositoryPathName ? '?'). |
3344
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4529 |
]. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4530 |
aStream cr. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4531 |
mgr := self sourceCodeManagerFor:aClass. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4532 |
mgr notNil ifTrue:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4533 |
aStream nextPutLine:'**** Repository information ****'; cr. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4534 |
|
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4535 |
module := nil. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4536 |
info2 notNil ifTrue:[ |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4537 |
module := info2 at:#module ifAbsent:nil. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4538 |
]. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4539 |
module notNil ifTrue:[ |
3632
c39f5d147a8b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3602
diff
changeset
|
4540 |
aStream nextPutLine:(' Repository URL ......: %1' bindWith: |
3633
abe27fb2c473
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3632
diff
changeset
|
4541 |
((mgr repositoryNameForPackage:aClass package) ifNil:[mgr repositoryName , ' (default)']) asString). |
3344
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4542 |
]. |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
4543 |
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
|
4544 |
] |
1782 | 4545 |
|
2836
91e9be94d80b
changed: #repositoryLogOf:short:onto:
Claus Gittinger <cg@exept.de>
parents:
2835
diff
changeset
|
4546 |
"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
|
4547 |
"Modified: / 11-07-2012 / 13:50:59 / cg" |
1726 | 4548 |
! |
4549 |
||
4550 |
tagClass:aClass as:tag |
|
4551 |
|mgr| |
|
4552 |
||
4553 |
mgr := self sourceCodeManagerFor:aClass. |
|
4281 | 4554 |
mgr setSymbolicName:tag revision:nil overWrite:true class:aClass. |
1782 | 4555 |
|
4556 |
"Modified: / 12-09-2006 / 13:03:59 / cg" |
|
4281 | 4557 |
"Modified (format): / 05-12-2017 / 22:50:18 / cg" |
1782 | 4558 |
! |
4559 |
||
4560 |
tagClasses:aCollectionOfClasses as:tag |
|
3847
94661e33541c
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3818
diff
changeset
|
4561 |
^ self tagClasses:aCollectionOfClasses as:tag revision:nil |
94661e33541c
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3818
diff
changeset
|
4562 |
|
94661e33541c
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3818
diff
changeset
|
4563 |
"Created: / 12-09-2006 / 13:04:29 / cg" |
94661e33541c
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3818
diff
changeset
|
4564 |
! |
94661e33541c
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3818
diff
changeset
|
4565 |
|
94661e33541c
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3818
diff
changeset
|
4566 |
tagClasses:aCollectionOfClasses as:tag revision:revision |
1782 | 4567 |
|classesPerManager| |
4568 |
||
4569 |
classesPerManager := Dictionary new. |
|
4290 | 4570 |
aCollectionOfClasses do:[:eachClass | |
4571 |
|manager| |
|
4572 |
||
4573 |
manager := self sourceCodeManagerFor:eachClass. |
|
4574 |
(classesPerManager at:manager ifAbsentPut:[Set new]) add:eachClass |
|
4575 |
]. |
|
1782 | 4576 |
|
4577 |
classesPerManager keysAndValuesDo:[:manager :classesPerManager| |
|
4281 | 4578 |
manager setSymbolicName:tag revision:revision overWrite:true classes:classesPerManager. |
1782 | 4579 |
]. |
1726 | 4580 |
^ true |
4281 | 4581 |
|
4290 | 4582 |
"Modified (format): / 07-12-2017 / 10:48:36 / cg" |
1726 | 4583 |
! |
4584 |
||
2602 | 4585 |
tagPackage: package as:tag |
4586 |
self tagClasses:(Smalltalk allClassesInPackage:package) as:tag. |
|
4281 | 4587 |
"/ TODO: what about build support files and extensions??? |
2602 | 4588 |
|
4589 |
"Created: / 12-09-2006 / 13:04:29 / cg" |
|
4590 |
"Created: / 15-10-2011 / 22:47:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4281 | 4591 |
"Modified (comment): / 05-12-2017 / 22:58:09 / cg" |
2602 | 4592 |
! |
4593 |
||
2691 | 4594 |
tagPath:aPath as:tag usingManager:aManager |
4281 | 4595 |
aManager setSymbolicName:tag revision:nil overWrite:true path:aPath. |
1782 | 4596 |
|
4597 |
"Modified: / 12-09-2006 / 12:04:44 / cg" |
|
2691 | 4598 |
"Created: / 29-12-2011 / 14:32:38 / cg" |
4281 | 4599 |
"Modified (format): / 05-12-2017 / 22:55:29 / cg" |
1375 | 4600 |
! ! |
4601 |
||
4226 | 4602 |
!SourceCodeManagerUtilities methodsFor:'utilities-scm-helpers'! |
1375 | 4603 |
|
4604 |
getMethodVersionsOfClass:aClass selector:selector numberOfRevisions:numberOfRevisionsOrNil |
|
4605 |
"check-out all previous versions of aClass and retrieve the history of selector. |
|
4606 |
Return a dictionary associating revision with a changeList entries for that method. |
|
4607 |
Unfinished - need a GUI for that." |
|
4608 |
||
4609 |
|mgr theClass revisionLog revisions items s entriesPerRevision previousVersion| |
|
4610 |
||
4611 |
theClass := aClass theNonMetaclass. |
|
4612 |
||
4613 |
mgr := self sourceCodeManagerFor:theClass. |
|
4614 |
mgr isNil ifTrue:[ |
|
4615 |
self error:'no sourceCodeManager'. |
|
4616 |
]. |
|
4617 |
||
4618 |
revisionLog := mgr |
|
4619 |
revisionLogOf:theClass |
|
4620 |
numberOfRevisions:numberOfRevisionsOrNil. |
|
4621 |
||
4622 |
revisions := revisionLog at:#revisions. |
|
4623 |
items := revisions collect:[:each | |rev date who| |
|
4624 |
rev := each at:#revision. |
|
4625 |
date := each at:#date. |
|
4626 |
who := each at:#author. |
|
4627 |
rev allBold , ' [' , date , ' by ' , who , ']' |
|
4628 |
]. |
|
4629 |
||
4349 | 4630 |
revisions := revisions collectColumn:#revision. |
1375 | 4631 |
revisions addFirst:#current. |
4632 |
entriesPerRevision := Dictionary new. |
|
4633 |
||
4634 |
previousVersion := nil. |
|
4635 |
revisions reverseDo:[:eachRevision | |
|
4636 |
|srcStream entries thisVersion| |
|
4637 |
||
4638 |
eachRevision == #current ifTrue:[ |
|
4639 |
s := '' writeStream. |
|
4640 |
theClass fileOutOn:s withTimeStamp:false. |
|
4641 |
srcStream := s contents readStream. |
|
4642 |
] ifFalse:[ |
|
4643 |
self activityNotification:('checking out revision ' , eachRevision , '...'). |
|
4644 |
srcStream := mgr getSourceStreamFor:theClass revision:eachRevision. |
|
4645 |
]. |
|
4646 |
||
4647 |
entries := ChangeSet fromStream:srcStream. |
|
4648 |
srcStream close. |
|
4649 |
||
4650 |
"/ remove all definitions |
|
4651 |
entries := entries select:[:each | each isMethodChange]. |
|
4652 |
"/ remove all methods which are for other selectors |
|
4653 |
entries := entries select:[:each | each selector == selector]. |
|
4654 |
"/ remove all methods which are for private subclasses |
|
4655 |
entries := entries select:[:each | each className = aClass name]. |
|
4656 |
||
4657 |
entries size == 1 ifTrue:[ |
|
4658 |
"/ the method is there |
|
4659 |
thisVersion := entries first. |
|
4660 |
(previousVersion notNil and:[previousVersion sameAs:thisVersion]) ifTrue:[ |
|
4661 |
"/ no change |
|
4662 |
] ifFalse:[ |
|
4663 |
entriesPerRevision at:eachRevision put:thisVersion. |
|
4664 |
]. |
|
4665 |
] ifFalse:[ |
|
4666 |
"/ the method is not there |
|
4667 |
]. |
|
4668 |
previousVersion := thisVersion. |
|
4669 |
]. |
|
4670 |
self error:'unfinished code'. |
|
4671 |
||
4672 |
" |
|
4673 |
self getMethodVersionsOfClass:MenuPanel selector:#'helpTextForItem:' numberOfRevisions:20 |
|
4674 |
self getMethodVersionsOfClass:NewLauncher class selector:#'menu' numberOfRevisions:20 |
|
4675 |
" |
|
4349 | 4676 |
|
4677 |
"Modified: / 22-09-2018 / 11:22:06 / Claus Gittinger" |
|
1375 | 4678 |
! ! |
4679 |
||
4226 | 4680 |
!SourceCodeManagerUtilities methodsFor:'utilities-scm-user interaction'! |
1375 | 4681 |
|
4682 |
askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName |
|
4683 |
"open a dialog asking for a source container; |
|
4684 |
return a dictionary containing module, package and filename, |
|
4685 |
or nil if canceled." |
|
4686 |
||
4687 |
^ self |
|
4688 |
askForContainer:boxText title:title note:notice |
|
4689 |
initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName |
|
4690 |
forNewContainer:true |
|
1026
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4691 |
! |
1f193eb5f877
common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents:
1022
diff
changeset
|
4692 |
|
1375 | 4693 |
askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName forNewContainer:forNewContainer |
4694 |
"open a dialog asking for a source container; |
|
4695 |
return a dictionary containing module, package and filename, |
|
4696 |
or nil if canceled." |
|
4697 |
||
3551
e8feddd829f9
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3546
diff
changeset
|
4698 |
|box y component answer |
1375 | 4699 |
moduleHolder packageHolder fileNameHolder |
4700 |
module package fileName |
|
3202
b58b19cac708
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3201
diff
changeset
|
4701 |
allPackageIDs knownContainers knownPackages packageUpdater |
1375 | 4702 |
packageBoxComponent fileNameBoxComponent fileNameUpdater| |
4703 |
||
3967 | 4704 |
allPackageIDs := Smalltalk allPackageIDs. |
3202
b58b19cac708
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3201
diff
changeset
|
4705 |
|
b58b19cac708
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3201
diff
changeset
|
4706 |
knownContainers := allPackageIDs collect:[:package | (package upTo:$:)] as:Set. |
b58b19cac708
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3201
diff
changeset
|
4707 |
|
3394
8e7ee24c6e7b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3384
diff
changeset
|
4708 |
knownContainers := knownContainers asOrderedCollection reject:[:module | module isBlank]. |
1375 | 4709 |
knownContainers sort. |
4710 |
||
4711 |
packageUpdater := [ |
|
4712 |
|theModulePrefix| |
|
4713 |
||
4714 |
theModulePrefix := moduleHolder value , ':'. |
|
4715 |
||
4716 |
Cursor wait showWhile:[ |
|
3202
b58b19cac708
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3201
diff
changeset
|
4717 |
knownPackages := |
b58b19cac708
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3201
diff
changeset
|
4718 |
allPackageIDs |
b58b19cac708
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3201
diff
changeset
|
4719 |
select:[:package | (package startsWith:theModulePrefix)] |
b58b19cac708
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3201
diff
changeset
|
4720 |
thenCollect:[:package | |idx| |
b58b19cac708
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3201
diff
changeset
|
4721 |
idx := package indexOf:$:. |
b58b19cac708
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3201
diff
changeset
|
4722 |
(package copyFrom:idx + 1)]. |
b58b19cac708
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3201
diff
changeset
|
4723 |
|
b58b19cac708
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3201
diff
changeset
|
4724 |
knownPackages := knownPackages asSet asOrderedCollection. |
3291 | 4725 |
knownPackages := knownPackages reject:[:package | package isBlank]. |
1375 | 4726 |
knownPackages sort. |
4727 |
packageBoxComponent list:knownPackages. |
|
4728 |
]. |
|
4729 |
]. |
|
4730 |
||
4731 |
fileNameUpdater := [ |
|
4732 |
|module package files| |
|
4733 |
||
4734 |
Cursor read showWhile:[ |
|
2209
e3a4510c45f2
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
2200
diff
changeset
|
4735 |
module := moduleHolder value ? (PackageId noProjectID). |
e3a4510c45f2
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
2200
diff
changeset
|
4736 |
package := packageHolder value ? (PackageId noProjectID). |
1375 | 4737 |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
4738 |
files := SourceCodeManager getExistingContainersInModule:module directory:package. |
1375 | 4739 |
files := files asOrderedCollection. |
4740 |
files := files select:[:eachFile | eachFile asFilename hasSuffix:'st']. |
|
4741 |
files sort. |
|
4742 |
fileNameBoxComponent list:files. |
|
4743 |
]. |
|
4744 |
]. |
|
4745 |
||
4746 |
moduleHolder := initialModule asValue. |
|
4747 |
packageHolder := initialPackage asValue. |
|
4748 |
fileNameHolder := initialFileName asValue. |
|
4749 |
||
4750 |
"/ |
|
4751 |
"/ open a dialog for this |
|
4752 |
"/ |
|
4753 |
box := DialogBox new. |
|
4754 |
box label:title. |
|
4755 |
||
3425
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
4756 |
component := box addTextLabel:boxText withCRs adjust:#left. |
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
4757 |
component borderWidth:0. |
1375 | 4758 |
box addVerticalSpace. |
4759 |
box addVerticalSpace. |
|
1000 | 4760 |
|
1375 | 4761 |
y := box yPosition. |
3425
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
4762 |
component := box addTextLabel:(resources string:'Module:') adjust:#right. |
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
4763 |
component width:0.4. |
1375 | 4764 |
box yPosition:y. |
4765 |
component := box addComboBoxOn:moduleHolder tabable:true. |
|
4766 |
component list:knownContainers. |
|
4767 |
||
4768 |
"/ component := box addInputFieldOn:moduleHolder tabable:true. |
|
4769 |
component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
4770 |
||
4771 |
box addVerticalSpace. |
|
4772 |
y := box yPosition. |
|
3425
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
4773 |
component := box addTextLabel:(resources string:'Package:') adjust:#right. |
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
4774 |
component width:0.4. |
1375 | 4775 |
box yPosition:y. |
4776 |
packageBoxComponent := component := box addComboBoxOn:packageHolder tabable:true. |
|
4777 |
"/ component := box addInputFieldOn:packageHolder tabable:true. |
|
4778 |
component width:0.6; left:0.4; "immediateAccept:true; "acceptOnLeave:true; cursorMovementWhenUpdating:#beginOfLine. |
|
4779 |
packageUpdater value. |
|
4780 |
moduleHolder onChangeEvaluate:packageUpdater. |
|
4781 |
||
4782 |
box addVerticalSpace. |
|
4783 |
y := box yPosition. |
|
3425
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
4784 |
component := box addTextLabel:(resources string:'Filename:') adjust:#right. |
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
4785 |
component width:0.4. |
1375 | 4786 |
box yPosition:y. |
4787 |
||
4788 |
forNewContainer ifTrue:[ |
|
4789 |
component := box addInputFieldOn:fileNameHolder tabable:true. |
|
4790 |
component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
4791 |
] ifFalse:[ |
|
4792 |
fileNameBoxComponent := component := box addComboBoxOn:fileNameHolder tabable:true. |
|
4793 |
component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
4794 |
fileNameUpdater value. |
|
4795 |
packageHolder onChangeEvaluate:fileNameUpdater. |
|
4796 |
]. |
|
4797 |
||
4798 |
box addVerticalSpace. |
|
4799 |
||
4800 |
notice notNil ifTrue:[ |
|
3425
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
4801 |
component := box addTextLabel:notice adjust:#left. |
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
4802 |
component borderWidth:0. |
1375 | 4803 |
]. |
4804 |
||
4805 |
box addVerticalSpace. |
|
4806 |
box addAbortAndOkButtons. |
|
4807 |
||
4808 |
(YesToAllNotification notNil and:[YesToAllNotification isHandled]) ifTrue:[ |
|
3683
fb6ad154b94d
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3679
diff
changeset
|
4809 |
component := Button label:(resources string:'Yes to All'). |
1375 | 4810 |
component action:[ |
4811 |
YesToAllNotification queryWith:true. |
|
4812 |
box doAccept. |
|
2253
7d7b0d2d1fe7
changed: #askForContainer:title:note:initialModule:initialPackage:initialFileName:forNewContainer:
Claus Gittinger <cg@exept.de>
parents:
2242
diff
changeset
|
4813 |
box okPressed. |
1375 | 4814 |
]. |
3394
8e7ee24c6e7b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3384
diff
changeset
|
4815 |
box addButton:component. |
1375 | 4816 |
]. |
4817 |
(AbortAllSignal isHandled) ifTrue:[ |
|
3683
fb6ad154b94d
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3679
diff
changeset
|
4818 |
component := Button label:(resources string:'Cancel All'). |
1375 | 4819 |
component action:[ |
4820 |
box hide. |
|
4821 |
AbortAllSignal raiseSignal. |
|
4822 |
]. |
|
3394
8e7ee24c6e7b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3384
diff
changeset
|
4823 |
box addButton:component before:nil. |
1375 | 4824 |
]. |
4825 |
||
4826 |
(YesToAllQuery notNil and:[YesToAllQuery isHandled]) ifTrue:[ |
|
4827 |
answer := YesToAllQuery query. |
|
4828 |
]. |
|
4829 |
||
4830 |
answer isNil ifTrue:[ |
|
4831 |
box showAtPointer. |
|
4832 |
answer := box accepted |
|
4833 |
]. |
|
4834 |
||
4835 |
box destroy. |
|
4836 |
answer ifFalse:[ |
|
4837 |
^ nil |
|
4838 |
]. |
|
1000 | 4839 |
|
1375 | 4840 |
module := moduleHolder value withoutSpaces. |
4841 |
package := packageHolder value withoutSpaces. |
|
4842 |
fileName := fileNameHolder value withoutSpaces. |
|
4843 |
^ Dictionary new |
|
4844 |
at:#module put:module; |
|
4845 |
at:#package put:package; |
|
4846 |
at:#fileName put:fileName; |
|
4847 |
yourself |
|
4848 |
||
4849 |
" |
|
4850 |
self |
|
4851 |
askForContainer:'enter container' title:'container' note:'some note' |
|
4852 |
initialModule:'foo' initialPackage:'bar' initialFileName:'baz' |
|
4853 |
" |
|
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
4854 |
|
3394
8e7ee24c6e7b
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3384
diff
changeset
|
4855 |
"Modified: / 29-08-2013 / 12:26:04 / cg" |
1375 | 4856 |
! |
4857 |
||
2570 | 4858 |
askForExistingRevision:boxText title:title class:aClass |
4859 |
"open a dialog asking for a containers revision; |
|
4860 |
return a revision number, or nil if canceled." |
|
4861 |
||
4862 |
|mgr sourceInfo module package fileName| |
|
4863 |
||
4864 |
mgr := self sourceCodeManagerFor:aClass. |
|
4865 |
sourceInfo := mgr sourceInfoOfClass:aClass. |
|
4866 |
sourceInfo isNil ifTrue:[^ nil]. |
|
4867 |
||
4868 |
package := mgr directoryFromSourceInfo:sourceInfo. |
|
4869 |
module := mgr moduleFromSourceInfo:sourceInfo. |
|
4870 |
fileName := mgr containerFromSourceInfo:sourceInfo. |
|
4871 |
^ self |
|
4872 |
askForExistingRevision:boxText |
|
4873 |
title:title |
|
4874 |
class:aClass |
|
4875 |
manager:mgr |
|
4876 |
module:module package:package |
|
4877 |
fileName:fileName |
|
4878 |
||
4879 |
" |
|
4880 |
SourceCodeManagerUtilities |
|
4881 |
askForRevisionToCompare:'enter revision' |
|
4882 |
title:'revision' |
|
4883 |
class:Array |
|
4884 |
" |
|
4885 |
||
4886 |
"Modified: / 12-09-2006 / 14:17:04 / cg" |
|
4887 |
! |
|
4888 |
||
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
4889 |
askForExistingRevision:boxText title:title class:clsOrNil manager:aSourceCodeManager module:module package:directory fileName:fileName |
1375 | 4890 |
"open a dialog asking for a containers revision; |
4891 |
return a revision number, or nil if canceled." |
|
4892 |
||
4893 |
|partialLog revisions items newestRev |
|
3551
e8feddd829f9
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3546
diff
changeset
|
4894 |
box y component revisionHolder symbolicNames stableRevision releasedRevision |
4287 | 4895 |
tagPlusRevisionHolder tagHolder tagList lockChange| |
2325 | 4896 |
|
1375 | 4897 |
partialLog := aSourceCodeManager |
4898 |
revisionLogOf:clsOrNil |
|
4287 | 4899 |
numberOfRevisions:30 |
1375 | 4900 |
fileName:fileName |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
4901 |
directory:directory |
1375 | 4902 |
module:module. |
1522 | 4903 |
|
1375 | 4904 |
partialLog notNil ifTrue:[ |
4905 |
newestRev := partialLog at:#newestRevision. |
|
4906 |
revisions := partialLog at:#revisions. |
|
4287 | 4907 |
symbolicNames := partialLog at:#symbolicNames ifAbsent:[nil]. |
1456
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
4908 |
symbolicNames notNil ifTrue:[ |
4287 | 4909 |
stableRevision := symbolicNames at:'stable' ifAbsent:[nil]. |
4910 |
releasedRevision := symbolicNames at:'released' ifAbsent:[nil]. |
|
4911 |
||
4912 |
"/ sort by revision; within same revision, sort by tag name |
|
4913 |
tagList := (((symbolicNames associations |
|
4914 |
sort:[:a :b | a key < b key "self versionString:(a value) isLessThan:(b value)"]) |
|
4915 |
stableSort:[:a :b | self versionString:(a value) isLessThan:(b value)]) |
|
4916 |
collect:[:assoc | assoc key]) reverse. |
|
4917 |
||
4918 |
stableRevision notNil ifTrue:[ |
|
4919 |
tagList remove:'stable'. |
|
4920 |
tagList notEmpty ifTrue:[ |
|
4921 |
tagList addFirst:'-' |
|
4922 |
]. |
|
4923 |
tagList addFirst:'stable'. |
|
4924 |
]. |
|
4925 |
||
4926 |
LastTag notEmptyOrNil ifTrue:[ |
|
4174 | 4927 |
tagList addFirst:LastTag. |
4287 | 4928 |
]. |
4929 |
tagList := tagList collect:[:tag | |
|
4930 |
|rev| |
|
4931 |
||
4932 |
rev := symbolicNames at:tag ifAbsent:[nil]. |
|
4933 |
rev isNil ifTrue:[ |
|
4934 |
tag |
|
4935 |
] ifFalse:[ |
|
4936 |
tag,((' (', rev value, ')') withColor:(Color grey)) |
|
4937 |
]. |
|
4938 |
]. |
|
1456
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
4939 |
]. |
4007 | 4940 |
|
4941 |
"/ fill in timestamps |
|
4942 |
revisions do:[:each | |
|
4160 | 4943 |
|dateOrDateString timeOrTimeString timestampString timestamp| |
4944 |
||
4945 |
dateOrDateString := each at:#date ifAbsent:nil. |
|
4946 |
timeOrTimeString := each at:#time ifAbsent:nil. |
|
4947 |
dateOrDateString notNil ifTrue:[ |
|
4948 |
dateOrDateString isString ifTrue:[ |
|
4949 |
timestamp := Timestamp readFrom:dateOrDateString onError:nil. |
|
4950 |
timestamp notNil ifTrue:[ |
|
4951 |
each at:#timestamp put:timestamp. |
|
4952 |
]. |
|
4953 |
] ifFalse:[ |
|
4954 |
timeOrTimeString isString ifTrue:[ |
|
4955 |
self halt. |
|
4956 |
||
4957 |
] ifFalse:[ |
|
4958 |
(dateOrDateString notNil and:[timeOrTimeString notNil]) ifTrue:[ |
|
4959 |
timestamp := Timestamp fromDate:dateOrDateString andTime:timeOrTimeString. |
|
4960 |
each at:#timestamp put:timestamp. |
|
4961 |
] ifFalse:[ |
|
4962 |
self halt |
|
4963 |
] |
|
4964 |
] |
|
4965 |
]. |
|
4007 | 4966 |
]. |
4967 |
]. |
|
4968 |
||
4969 |
items := revisions |
|
4970 |
collectWithIndex:[:each :idx| |
|
4410 | 4971 |
|item rev timestamp date time dateAndTimeString who flag reason |
4007 | 4972 |
prevInfo prevDate nextInfo nextDate dateDifferentToPrev dateDifferentToNext| |
4973 |
||
4974 |
rev := each at:#revision. |
|
4975 |
||
4976 |
timestamp := each at:#timestamp. |
|
4977 |
timestamp notNil ifTrue:[ |
|
4410 | 4978 |
date := each at:#date. |
4007 | 4979 |
date = Date today ifTrue:[ |
4980 |
dateAndTimeString := timestamp asTime printString. |
|
4981 |
] ifFalse:[ |
|
4982 |
"/ if date is different to both previous AND next, |
|
4983 |
"/ only show the date |
|
4984 |
dateDifferentToPrev := dateDifferentToNext := false. |
|
4985 |
(idx > 1) ifTrue:[ |
|
4986 |
prevInfo := revisions at:idx-1. |
|
4410 | 4987 |
prevDate := prevInfo at:#date ifAbsent:nil. |
4988 |
dateDifferentToPrev := prevDate notNil and:[prevDate ~= date]. |
|
4007 | 4989 |
]. |
4990 |
(idx < revisions size) ifTrue:[ |
|
4991 |
nextInfo := revisions at:idx+1. |
|
4410 | 4992 |
nextDate := nextInfo at:#date ifAbsent:nil. |
4993 |
dateDifferentToNext := nextDate notNil and:[nextDate ~= date]. |
|
4007 | 4994 |
]. |
4410 | 4995 |
dateDifferentToPrev & dateDifferentToPrev ifTrue:[ |
4007 | 4996 |
dateAndTimeString := date printString. |
4997 |
] ifFalse:[ |
|
4998 |
dateAndTimeString := date printString,' ',(timestamp asTime printString). |
|
4999 |
] |
|
5000 |
]. |
|
5001 |
] ifFalse:[ |
|
5002 |
dateAndTimeString := (each at:#date ifAbsent:nil) ? '(unknown time)'. |
|
5003 |
]. |
|
5004 |
who := (each at:#author ifAbsent:nil) ? '?'. |
|
5005 |
rev = stableRevision ifTrue:[ |
|
5006 |
flag := ' Stable' allBold. |
|
5007 |
] ifFalse:[rev = releasedRevision ifTrue:[ |
|
5008 |
flag := ' Released' allBold. |
|
5009 |
] ifFalse:[ |
|
5010 |
flag := '' |
|
5011 |
]]. |
|
4410 | 5012 |
reason := each loggedReason. |
5013 |
item := '%1%2 [%3 by %4 (%5 %6)]' bindWith:rev allBold with:flag with:dateAndTimeString |
|
5014 |
with:who with:reason with:each changedLinesInfo. |
|
5015 |
reason = 'BUGFIX' ifTrue:[ |
|
4438 | 5016 |
item withColor:Color red |
4410 | 5017 |
] ifFalse:[reason = 'DOCUMENTATION' ifTrue:[ |
4438 | 5018 |
item withColor:Color grey |
4410 | 5019 |
] ifFalse:[ |
5020 |
item |
|
5021 |
]] |
|
4007 | 5022 |
]. |
5023 |
||
4349 | 5024 |
revisions := revisions collectColumn:#revision. |
1375 | 5025 |
] ifFalse:[ |
1666
40429b90ebb6
renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
5026 |
newestRev := aSourceCodeManager newestRevisionInFile:fileName directory:directory module:module. |
1375 | 5027 |
revisions := items := nil. |
5028 |
||
5029 |
newestRev isNil ifTrue:[ |
|
4226 | 5030 |
(aSourceCodeManager checkForExistingContainer:fileName inModule:module directory:directory warn:true) |
1375 | 5031 |
ifFalse:[ |
5032 |
^ nil |
|
5033 |
] |
|
5034 |
] |
|
5035 |
]. |
|
2325 | 5036 |
|
5037 |
lockChange := false. |
|
5038 |
revisionHolder := newestRev asValue. |
|
1375 | 5039 |
revisionHolder onChangeEvaluate:[ |
5040 |
"/ cut off everything after revision |
|
2325 | 5041 |
|s first words tag| |
1375 | 5042 |
|
5043 |
s := revisionHolder value. |
|
5044 |
words := s asCollectionOfWords. |
|
5045 |
words size > 0 ifTrue:[ |
|
5046 |
first := words first string. |
|
5047 |
first ~= s ifTrue:[ |
|
5048 |
revisionHolder value:first |
|
5049 |
] |
|
2325 | 5050 |
]. |
5051 |
lockChange ifFalse:[ |
|
4287 | 5052 |
tagPlusRevisionHolder value:''. |
2325 | 5053 |
tagHolder value:'' |
5054 |
]. |
|
1375 | 5055 |
]. |
5056 |
||
2325 | 5057 |
tagHolder := '' asValue. |
5058 |
tagHolder |
|
5059 |
onChangeEvaluate:[ |
|
5060 |
|tag rev| |
|
5061 |
||
5062 |
(tag := tagHolder value) notEmptyOrNil ifTrue:[ |
|
4192 | 5063 |
"/ LastTag := tag. |
4287 | 5064 |
rev := symbolicNames at:tag ifAbsent:[nil]. |
5065 |
(rev notNil and:[rev ~= revisionHolder value]) ifTrue:[ |
|
2325 | 5066 |
lockChange := true. |
5067 |
revisionHolder value:rev. |
|
5068 |
lockChange := false. |
|
5069 |
]. |
|
5070 |
] |
|
5071 |
]. |
|
5072 |
||
4287 | 5073 |
tagPlusRevisionHolder := '' asValue. |
5074 |
tagPlusRevisionHolder |
|
5075 |
onChangeEvaluate:[ |
|
5076 |
|tagPlusRevision tag| |
|
5077 |
||
5078 |
(tagPlusRevision := tagPlusRevisionHolder value) notEmptyOrNil ifTrue:[ |
|
5079 |
tag := (tagPlusRevision string upTo:$( ) withoutSeparators. |
|
5080 |
tagHolder value:tag. |
|
5081 |
] |
|
5082 |
]. |
|
5083 |
||
1375 | 5084 |
"/ |
5085 |
"/ open a dialog for this |
|
5086 |
"/ |
|
5087 |
box := DialogBox new. |
|
5088 |
box label:title. |
|
5089 |
||
3425
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
5090 |
component := box addTextLabel:boxText withCRs adjust:#left. |
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
5091 |
component borderWidth:0. |
1375 | 5092 |
box addVerticalSpace. |
5093 |
box addVerticalSpace. |
|
5094 |
||
5095 |
y := box yPosition. |
|
3425
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
5096 |
component := box addTextLabel:(resources string:'Revision:') adjust:#right. |
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
5097 |
component width:0.4. |
1375 | 5098 |
box yPosition:y. |
5099 |
component := box addComboBoxOn:revisionHolder tabable:true. |
|
5100 |
component list:items. |
|
5101 |
component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
5102 |
||
2325 | 5103 |
y := box yPosition. |
3425
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
5104 |
component := box addTextLabel:(resources string:'or Tag:') adjust:#right. |
05be11d262e2
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3394
diff
changeset
|
5105 |
component width:0.4. |
2325 | 5106 |
box yPosition:y. |
4287 | 5107 |
component := box addComboListOn:tagPlusRevisionHolder tabable:true. |
2325 | 5108 |
component list:tagList. |
5109 |
component width:0.6; left:0.4. |
|
5110 |
tagList isNil ifTrue:[ |
|
5111 |
component disable |
|
5112 |
]. |
|
5113 |
||
1375 | 5114 |
box addVerticalSpace. |
5115 |
||
5116 |
box addAbortAndOkButtons. |
|
5117 |
||
2325 | 5118 |
AbortAllOperationWantedQuery query ifTrue:[ |
4410 | 5119 |
(box addAbortButtonLabelled:'Cancel all') action:[AbortAllOperationRequest raise]. |
1375 | 5120 |
]. |
4192 | 5121 |
LastTag notEmptyOrNil ifTrue:[ |
4193 | 5122 |
(symbolicNames notNil and:[symbolicNames includesKey:LastTag]) ifTrue:[ |
5123 |
tagHolder value:LastTag. |
|
5124 |
]. |
|
4192 | 5125 |
]. |
5126 |
||
1375 | 5127 |
box showAtPointer. |
5128 |
||
5129 |
box accepted ifFalse:[ |
|
5130 |
box destroy. |
|
5131 |
^ nil |
|
5132 |
]. |
|
5133 |
box destroy. |
|
5134 |
||
4192 | 5135 |
LastTag := tagHolder value. |
5136 |
||
3865
b76ba0a9cf83
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3847
diff
changeset
|
5137 |
"/ it is not a good idea to return the tag-name here, |
b76ba0a9cf83
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3847
diff
changeset
|
5138 |
"/ because it may get cached later when the source is fetched, |
b76ba0a9cf83
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3847
diff
changeset
|
5139 |
"/ and the tag could move to another version (making the cached file invalid) |
b76ba0a9cf83
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3847
diff
changeset
|
5140 |
"/ without me knowing about that fact. |
b76ba0a9cf83
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3847
diff
changeset
|
5141 |
"/ Therefore, we should return the real revision number. |
b76ba0a9cf83
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3847
diff
changeset
|
5142 |
|
b76ba0a9cf83
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3847
diff
changeset
|
5143 |
"/ ouch: however, checkout of a branch seems to not work the same way |
b76ba0a9cf83
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3847
diff
changeset
|
5144 |
"/ so we DO return the tag, but suppress caching it. sigh. |
3551
e8feddd829f9
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3546
diff
changeset
|
5145 |
^ (tagHolder value notEmptyOrNil ifTrue:[tagHolder] ifFalse:[revisionHolder]) value withoutSpaces. |
3865
b76ba0a9cf83
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3847
diff
changeset
|
5146 |
"/ ^ revisionHolder value withoutSpaces. |
1375 | 5147 |
|
5148 |
" |
|
4287 | 5149 |
CVSSourceCodeManager utilities |
5150 |
askForExistingRevision:'enter revision' |
|
1375 | 5151 |
title:'revision' |
4287 | 5152 |
class:Array |
5153 |
manager:CVSSourceCodeManager |
|
1375 | 5154 |
module:'stx' |
4287 | 5155 |
package:'libbasic' |
5156 |
fileName:nil |
|
1375 | 5157 |
" |
1522 | 5158 |
|
4287 | 5159 |
"Modified: / 06-12-2017 / 12:30:32 / cg" |
4410 | 5160 |
"Modified: / 12-03-2019 / 11:46:34 / Stefan Vogel" |
4438 | 5161 |
"Modified: / 07-06-2019 / 22:13:30 / Claus Gittinger" |
1375 | 5162 |
! |
5163 |
||
1426 | 5164 |
checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder |
1375 | 5165 |
"check if a class contains message-sends to: |
2237
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5166 |
#halt , #halt: |
1375 | 5167 |
#error |
2237
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5168 |
#todo , #todo: |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5169 |
(and maybe more in the future) |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5170 |
|
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5171 |
Only checks in non-extension methods - as this is only called when checking " |
1375 | 5172 |
|
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5173 |
|badStuff whatIsBad msg answer labels values defaultAnswer dontShowAgain |
3551
e8feddd829f9
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3546
diff
changeset
|
5174 |
methodsWithBadStuff| |
1375 | 5175 |
|
5176 |
badStuff := #( |
|
2237
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5177 |
( 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
|
5178 |
( 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
|
5179 |
( 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
|
5180 |
( todo 'send of #todo - unfinished code present?' ) |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5181 |
( todo: 'send of #todo:- unfinished code present?' ) |
1375 | 5182 |
). |
5183 |
||
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5184 |
methodsWithBadStuff := Set new. |
1375 | 5185 |
whatIsBad := Set new. |
5186 |
aClass theNonMetaclass instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
|
2237
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5187 |
|setOfLiterals setOfSentMessages| |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5188 |
|
2977
e5bfe652373f
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
2974
diff
changeset
|
5189 |
mthd isExtension ifFalse:[ |
2237
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5190 |
setOfLiterals := mthd literals. "/ try without parsing first. |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5191 |
(badStuff contains:[:eachEntry | setOfLiterals includes:eachEntry first]) ifTrue:[ |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5192 |
setOfSentMessages := mthd messagesSent. |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5193 |
badStuff do:[:eachEntry | |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5194 |
(setOfSentMessages includes:eachEntry first) ifTrue:[ |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5195 |
whatIsBad add:eachEntry second. |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5196 |
methodsWithBadStuff add:mthd. |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5197 |
] |
96105b41c6a6
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
5198 |
]. |
1000 | 5199 |
]. |
5200 |
]. |
|
1375 | 5201 |
]. |
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5202 |
whatIsBad isEmpty ifTrue:[^ true]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5203 |
|
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5204 |
(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
|
5205 |
answer := YesToAllQuery query. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5206 |
answer notNil ifTrue:[ ^ answer ]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5207 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5208 |
|
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5209 |
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
|
5210 |
msg := msg , '\\'. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5211 |
whatIsBad do:[:each | |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5212 |
msg := msg , ' ' , each , '\' |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5213 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5214 |
msg := msg , '\'. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5215 |
methodsWithBadStuff size == 1 ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5216 |
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
|
5217 |
with:methodsWithBadStuff anElement whoString allBold). |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5218 |
] ifFalse:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5219 |
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
|
5220 |
with:methodsWithBadStuff anElement whoString allBold |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5221 |
with:methodsWithBadStuff size-1). |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5222 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5223 |
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
|
5224 |
|
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5225 |
(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
|
5226 |
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
|
5227 |
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
|
5228 |
defaultAnswer := #yesToAll. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5229 |
] ifFalse:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5230 |
labels := #('No' 'No, Browse' 'Yes'). |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5231 |
values := #(false #noBrowse true). |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5232 |
defaultAnswer := true. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5233 |
]. |
1426 | 5234 |
|
1456
673e4fc61c36
Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents:
1449
diff
changeset
|
5235 |
"/ AbortAllOperationRequest isHandled ifTrue:[ |
1426 | 5236 |
"/ labels := #('Cancel All') , labels. |
5237 |
"/ values := #(#cancelAll) , values. |
|
5238 |
"/ ]. |
|
5239 |
||
3812
173678af0074
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3692
diff
changeset
|
5240 |
Dialog modifyingBoxWith:[:box | |
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5241 |
checkAgainHolder isValueModel ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5242 |
dontShowAgain := checkAgainHolder value not asValue. |
3812
173678af0074
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3692
diff
changeset
|
5243 |
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
|
5244 |
on:dontShowAgain. |
1426 | 5245 |
]. |
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5246 |
] do:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5247 |
answer := OptionBox |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5248 |
request:msg withCRs |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5249 |
label:(resources string:'Really CheckIn ?') |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5250 |
image:(InfoBox iconBitmap) |
3551
e8feddd829f9
class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents:
3546
diff
changeset
|
5251 |
buttonLabels:(Dialog classResources array:labels) |
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5252 |
values:values |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5253 |
default:defaultAnswer |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5254 |
onCancel:nil. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5255 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5256 |
answer isNil ifTrue:[ |
3433
eee3079d18d3
AbortSignal -> AbortOperationRequest
Stefan Vogel <sv@exept.de>
parents:
3425
diff
changeset
|
5257 |
AbortOperationRequest raise. |
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5258 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5259 |
|
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5260 |
dontShowAgain notNil ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5261 |
checkAgainHolder value:dontShowAgain value not |
1000 | 5262 |
]. |
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5263 |
|
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5264 |
answer == #noBrowse ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5265 |
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
|
5266 |
self yesToAllNotification queryWith:false. |
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5267 |
^ false |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5268 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5269 |
answer == #cancelAll ifTrue:[ |
3433
eee3079d18d3
AbortSignal -> AbortOperationRequest
Stefan Vogel <sv@exept.de>
parents:
3425
diff
changeset
|
5270 |
AbortOperationRequest raise. |
1994
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5271 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5272 |
answer == #yesToAll ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5273 |
YesToAllNotification queryWith:true. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5274 |
^ true |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5275 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5276 |
answer == #noToAll ifTrue:[ |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5277 |
YesToAllNotification queryWith:false. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5278 |
^ false |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5279 |
]. |
eccaf18ff7a1
which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents:
1988
diff
changeset
|
5280 |
^ answer |
1375 | 5281 |
|
5282 |
" |
|
5283 |
self checkAndWarnAboutBadMessagesInClass:(SourceCodeManagerUtilities) |
|
5284 |
" |
|
2775
d1908ae4aed8
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2774
diff
changeset
|
5285 |
|
d1908ae4aed8
changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents:
2774
diff
changeset
|
5286 |
"Modified: / 28-02-2012 / 10:41:38 / cg" |
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
5287 |
! |
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
5288 |
|
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
5289 |
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil |
2283 | 5290 |
"ask for a log message for checking in a class (plus checkinQuick state info), |
5291 |
and other info (mark as stable, for example). |
|
5292 |
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
|
5293 |
|
1704 | 5294 |
^ self |
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
5295 |
getCheckinInfoFor:aClassNameOrPackageNameString |
1704 | 5296 |
initialAnswer:initialAnswerOrNil |
5297 |
withQuickOption:false |
|
5298 |
||
5299 |
" |
|
5300 |
SourceCodeManagerUtilities getCheckinInfoFor:'hello' initialAnswer:'bla' |
|
5301 |
" |
|
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
5302 |
|
2283 | 5303 |
"Modified: / 06-07-2010 / 11:22:15 / cg" |
1704 | 5304 |
! |
5305 |
||
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
5306 |
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption |
2283 | 5307 |
"ask for a log message for checking in a class (plus checkinQuick state info), |
5308 |
and other info (mark as stable, for example). |
|
2106 | 5309 |
Return the info-object (actually: the dialog) or nil if aborted." |
5310 |
||
3140
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5311 |
^ self |
4079 | 5312 |
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil |
5313 |
withQuickOption:withQuickOption |
|
3140
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5314 |
withValidateConsistencyOption:false |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5315 |
|
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5316 |
" |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5317 |
SourceCodeManagerUtilities default getCheckinInfoFor:'hello' initialAnswer:'bla' |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5318 |
" |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5319 |
|
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5320 |
"Modified: / 12-03-2012 / 13:12:40 / cg" |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5321 |
! |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5322 |
|
4272 | 5323 |
getCheckinInfoFor:infoString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption withValidateConsistencyOption:withValidateConsistencyOption |
3140
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5324 |
"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
|
5325 |
and other info (mark as stable, for example). |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5326 |
Return the info-object (actually: the dialog) or nil if aborted." |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5327 |
|
4320 | 5328 |
^ self |
5329 |
getCheckinInfoFor:infoString initialAnswer:initialAnswerOrNil |
|
5330 |
withQuickOption:withQuickOption withValidateConsistencyOption:withValidateConsistencyOption |
|
5331 |
showChangesAction:nil |
|
5332 |
||
5333 |
" |
|
5334 |
SourceCodeManagerUtilities default getCheckinInfoFor:'hello' initialAnswer:'bla' |
|
5335 |
" |
|
5336 |
||
5337 |
"Modified: / 12-03-2012 / 13:12:40 / cg" |
|
5338 |
"Modified (format): / 04-12-2017 / 23:07:39 / cg" |
|
5339 |
! |
|
5340 |
||
5341 |
getCheckinInfoFor:infoString initialAnswer:initialAnswerOrNil |
|
5342 |
withQuickOption:withQuickOption withValidateConsistencyOption:withValidateConsistencyOption |
|
5343 |
showChangesAction:showChangesActionOrNil |
|
5344 |
||
5345 |
"ask for a log message for checking in a class (plus checkinQuick state info), |
|
5346 |
and other info (mark as stable, for example). |
|
5347 |
Return the info-object (actually: the dialog) or nil if aborted." |
|
5348 |
||
2106 | 5349 |
|logMsg infoDialog| |
5350 |
||
4320 | 5351 |
infoDialog := Tools::CheckinInfoDialog new |
5352 |
showChangesAction:showChangesActionOrNil; |
|
4272 | 5353 |
getCheckinInfoFor:infoString |
2795 | 5354 |
initialAnswer:(initialAnswerOrNil ? LastSourceLogMessage) |
5355 |
withQuickOption:withQuickOption |
|
3140
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5356 |
logHistory:(LastSourceLogMessages ? #()) |
25a1a02ce3d9
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3134
diff
changeset
|
5357 |
withValidateConsistencyOption:withValidateConsistencyOption. |
2795 | 5358 |
|
2106 | 5359 |
infoDialog notNil ifTrue:[ |
5360 |
logMsg := infoDialog logMessage. |
|
2284 | 5361 |
logMsg notEmptyOrNil ifTrue:[ |
2795 | 5362 |
LastSourceLogMessage := logMsg. |
5363 |
LastSourceLogMessages isNil ifTrue:[ |
|
5364 |
LastSourceLogMessages := OrderedCollection new. |
|
5365 |
]. |
|
2796
78401b160a28
changed: #getCheckinInfoFor:initialAnswer:withQuickOption:
Claus Gittinger <cg@exept.de>
parents:
2795
diff
changeset
|
5366 |
LastSourceLogMessages remove:logMsg ifAbsent:[]. |
2795 | 5367 |
LastSourceLogMessages addFirst:logMsg. |
5368 |
LastSourceLogMessages size > 10 ifTrue:[ |
|
5369 |
LastSourceLogMessages removeLast |
|
5370 |
]. |
|
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
5371 |
]. |
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
5372 |
]. |
2106 | 5373 |
^ infoDialog |
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
5374 |
|
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
5375 |
" |
2795 | 5376 |
SourceCodeManagerUtilities default getCheckinInfoFor:'hello' initialAnswer:'bla' |
1460
2e1c304e5b52
Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents:
1456
diff
changeset
|
5377 |
" |
1501 | 5378 |
|
2796
78401b160a28
changed: #getCheckinInfoFor:initialAnswer:withQuickOption:
Claus Gittinger <cg@exept.de>
parents:
2795
diff
changeset
|
5379 |
"Modified: / 12-03-2012 / 13:12:40 / cg" |
4272 | 5380 |
"Modified (format): / 04-12-2017 / 23:07:39 / cg" |
2129
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
5381 |
! |
9d5c146df780
goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents:
2106
diff
changeset
|
5382 |
|
3344
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
5383 |
revisionForSymbolicName:tag class:cls fileName:classFileName directory:packageDir module:moduleDir manager:aSourceCodeManager |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
5384 |
"given a tag, return the corresponding revision" |
4e577aa5b998
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3343
diff
changeset
|
5385 |
|
4287 | 5386 |
^ aSourceCodeManager revisionForSymbolicName:tag class:cls fileName:classFileName directory:packageDir module:moduleDir |
5387 |
||
5388 |
" |
|
5389 |
CVSSourceCodeManager |
|
5390 |
revisionForSymbolicName:'stable' |
|
5391 |
class:Array fileName:'Array.st' |
|
5392 |
directory:'libbasic' module:'stx' |
|
5393 |
" |
|
5394 |
||
5395 |
"Modified (format): / 06-12-2017 / 11:45:12 / cg" |
|
1375 | 5396 |
! ! |
5397 |
||
873 | 5398 |
!SourceCodeManagerUtilities class methodsFor:'documentation'! |
5399 |
||
2487
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
5400 |
version |
3892
3e7000585011
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3865
diff
changeset
|
5401 |
^ '$Header$' |
2487
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
5402 |
! |
c8f4417b9edc
changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents:
2484
diff
changeset
|
5403 |
|
2175 | 5404 |
version_CVS |
3892
3e7000585011
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
3865
diff
changeset
|
5405 |
^ '$Header$' |
873 | 5406 |
! ! |
3134
93b8f75424c5
class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents:
2977
diff
changeset
|
5407 |