author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 19 Sep 2013 10:20:01 +0100 | |
branch | jv |
changeset 3404 | 19809a3e1003 |
parent 3158 | f8c56a311307 |
parent 3398 | 2ae8b15cbf51 |
child 3838 | 474d8ec95b33 |
permissions | -rw-r--r-- |
2408 | 1 |
" |
2 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, |
|
3 |
Czech Technical University in Prague |
|
4 |
Copyright (c) 2009-2010 eXept Software AG |
|
5 |
||
6 |
Permission is hereby granted, free of charge, to any person |
|
7 |
obtaining a copy of this software and associated documentation |
|
8 |
files (the 'Software'), to deal in the Software without |
|
9 |
restriction, including without limitation the rights to use, |
|
10 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
11 |
copies of the Software, and to permit persons to whom the |
|
12 |
Software is furnished to do so, subject to the following |
|
13 |
conditions: |
|
14 |
||
15 |
The above copyright notice and this permission notice shall be |
|
16 |
included in all copies or substantial portions of the Software. |
|
17 |
||
18 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
19 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
20 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
21 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
22 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
23 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
24 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
25 |
OTHER DEALINGS IN THE SOFTWARE. |
|
26 |
" |
|
27 |
"{ Package: 'stx:libbasic3' }" |
|
28 |
||
29 |
ChangeSetDiffComponent subclass:#ChangeSetDiffSet |
|
30 |
instanceVariableNames:'name versionALabel versionBLabel versionBaseLabel diffs' |
|
31 |
classVariableNames:'' |
|
32 |
poolDictionaries:'' |
|
33 |
category:'System-Changes-Diff' |
|
34 |
! |
|
35 |
||
36 |
!ChangeSetDiffSet class methodsFor:'documentation'! |
|
37 |
||
38 |
copyright |
|
39 |
" |
|
40 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, |
|
41 |
Czech Technical University in Prague |
|
42 |
Copyright (c) 2009-2010 eXept Software AG |
|
43 |
||
44 |
Permission is hereby granted, free of charge, to any person |
|
45 |
obtaining a copy of this software and associated documentation |
|
46 |
files (the 'Software'), to deal in the Software without |
|
47 |
restriction, including without limitation the rights to use, |
|
48 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
49 |
copies of the Software, and to permit persons to whom the |
|
50 |
Software is furnished to do so, subject to the following |
|
51 |
conditions: |
|
52 |
||
53 |
The above copyright notice and this permission notice shall be |
|
54 |
included in all copies or substantial portions of the Software. |
|
55 |
||
56 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
57 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
58 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
59 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
60 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
61 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
62 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
63 |
OTHER DEALINGS IN THE SOFTWARE. |
|
64 |
||
65 |
" |
|
66 |
! ! |
|
67 |
||
3158
f8c56a311307
Merged 87750af738dc and 72ca7e81fbbf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
68 |
|
2408 | 69 |
!ChangeSetDiffSet class methodsFor:'instance creation'! |
70 |
||
71 |
new |
|
72 |
^ self basicNew initialize. |
|
73 |
! ! |
|
74 |
||
3158
f8c56a311307
Merged 87750af738dc and 72ca7e81fbbf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
75 |
|
2879 | 76 |
!ChangeSetDiffSet class methodsFor:'others'! |
77 |
||
78 |
version_CVS |
|
3398 | 79 |
^ '$Header: /cvs/stx/stx/libbasic3/ChangeSetDiffSet.st,v 1.6 2013-09-05 23:14:20 cg Exp $' |
2879 | 80 |
! ! |
81 |
||
3158
f8c56a311307
Merged 87750af738dc and 72ca7e81fbbf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
82 |
|
2408 | 83 |
!ChangeSetDiffSet methodsFor:'accessing'! |
84 |
||
3098
67aaf3fadffb
Added ChangeSetDiffComponent>>depth
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3078
diff
changeset
|
85 |
depth |
67aaf3fadffb
Added ChangeSetDiffComponent>>depth
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3078
diff
changeset
|
86 |
| depth | |
67aaf3fadffb
Added ChangeSetDiffComponent>>depth
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3078
diff
changeset
|
87 |
depth := 0. |
67aaf3fadffb
Added ChangeSetDiffComponent>>depth
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3078
diff
changeset
|
88 |
diffs do:[:diff| |
67aaf3fadffb
Added ChangeSetDiffComponent>>depth
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3078
diff
changeset
|
89 |
depth := depth max: diff depth |
67aaf3fadffb
Added ChangeSetDiffComponent>>depth
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3078
diff
changeset
|
90 |
]. |
67aaf3fadffb
Added ChangeSetDiffComponent>>depth
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3078
diff
changeset
|
91 |
^depth + 1 |
67aaf3fadffb
Added ChangeSetDiffComponent>>depth
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3078
diff
changeset
|
92 |
|
67aaf3fadffb
Added ChangeSetDiffComponent>>depth
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3078
diff
changeset
|
93 |
"Created: / 15-01-2013 / 11:27:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
67aaf3fadffb
Added ChangeSetDiffComponent>>depth
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3078
diff
changeset
|
94 |
! |
67aaf3fadffb
Added ChangeSetDiffComponent>>depth
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3078
diff
changeset
|
95 |
|
2408 | 96 |
diffs |
97 |
^ diffs |
|
98 |
! |
|
99 |
||
100 |
flattened |
|
101 |
||
102 |
| flattened s | |
|
103 |
flattened := self copy. |
|
104 |
s := (OrderedCollection new: diffs size) writeStream. |
|
105 |
self flattenOn: s. |
|
106 |
flattened setDiffs: s contents. |
|
107 |
^flattened |
|
108 |
||
109 |
"Created: / 05-12-2009 / 11:09:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
110 |
! |
|
111 |
||
112 |
merged |
|
113 |
||
114 |
^diffs allSatisfy:[:e|e merged] |
|
115 |
||
116 |
"Created: / 24-11-2009 / 10:04:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
117 |
! |
|
118 |
||
119 |
name |
|
2427 | 120 |
|
121 |
^ '%1 (%2)' bindWith: (name ? '<unnamed>') with: diffs size |
|
2408 | 122 |
|
123 |
"Modified: / 26-11-2009 / 16:26:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2427 | 124 |
"Modified: / 07-07-2011 / 14:15:12 / jv" |
2408 | 125 |
! |
126 |
||
127 |
name:aString |
|
128 |
name := aString. |
|
129 |
! |
|
130 |
||
3099
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
131 |
nextEntryAfter: entry suchThat: predicate |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
132 |
| found | |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
133 |
|
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
134 |
entry isNil ifTrue:[ |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
135 |
self do:[:each|(predicate value: each) ifTrue:[^each]]. |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
136 |
^nil |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
137 |
]. |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
138 |
|
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
139 |
found := false. |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
140 |
self do:[:each| |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
141 |
each == entry ifTrue:[ |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
142 |
found := true |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
143 |
] ifFalse:[ |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
144 |
(found and:[predicate value: each]) ifTrue:[ ^ each ] |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
145 |
]. |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
146 |
]. |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
147 |
^nil |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
148 |
|
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
149 |
"Created: / 17-01-2013 / 13:00:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
150 |
"Modified: / 17-01-2013 / 16:55:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
151 |
! |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
152 |
|
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
153 |
nextEntryBefore: entry suchThat: predicate |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
154 |
| last | |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
155 |
|
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
156 |
entry isNil ifTrue:[ |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
157 |
^nil |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
158 |
]. |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
159 |
|
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
160 |
self do:[:each| |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
161 |
each == entry ifTrue:[ ^ last ]. |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
162 |
(predicate value: each) ifTrue:[last := each]. |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
163 |
]. |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
164 |
^nil |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
165 |
|
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
166 |
"Created: / 17-01-2013 / 16:57:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
167 |
! |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
168 |
|
2408 | 169 |
resolution |
2627 | 170 |
| changeset | |
2408 | 171 |
|
172 |
changeset := ChangeSet new. |
|
2627 | 173 |
self do:[:diff| |
174 |
diff versionMerged notNil ifTrue:[ |
|
175 |
changeset add: diff versionMerged |
|
176 |
] |
|
177 |
]. |
|
2408 | 178 |
^changeset |
179 |
||
180 |
"Created: / 26-11-2009 / 08:44:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2627 | 181 |
"Modified: / 29-11-2011 / 11:25:02 / cg" |
2408 | 182 |
! |
183 |
||
184 |
versionALabel |
|
2628 | 185 |
^ versionALabel ifNil:[parent ifNotNil:[parent versionALabel]] |
2408 | 186 |
|
187 |
"Modified: / 21-11-2009 / 07:50:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2628 | 188 |
"Modified: / 29-11-2011 / 11:26:15 / cg" |
2408 | 189 |
! |
190 |
||
191 |
versionALabel:aString |
|
192 |
versionALabel := aString. |
|
193 |
! |
|
194 |
||
195 |
versionBLabel |
|
2628 | 196 |
^ versionBLabel ifNil:[parent ifNotNil:[parent versionBLabel]] |
2408 | 197 |
|
198 |
"Modified: / 21-11-2009 / 07:51:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2628 | 199 |
"Modified: / 29-11-2011 / 11:26:19 / cg" |
2408 | 200 |
! |
201 |
||
202 |
versionBLabel:aString |
|
203 |
versionBLabel := aString. |
|
204 |
! |
|
205 |
||
206 |
versionBaseLabel |
|
2628 | 207 |
^ versionBaseLabel ifNil:[parent ifNotNil:[parent versionBaseLabel]] |
2408 | 208 |
|
209 |
"Created: / 23-11-2009 / 22:54:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
210 |
"Modified: / 24-11-2009 / 09:21:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2628 | 211 |
"Modified (format): / 29-11-2011 / 11:26:37 / cg" |
2408 | 212 |
! |
213 |
||
214 |
versionBaseLabel:aString |
|
215 |
versionBaseLabel := aString. |
|
216 |
! ! |
|
217 |
||
3158
f8c56a311307
Merged 87750af738dc and 72ca7e81fbbf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
218 |
|
2408 | 219 |
!ChangeSetDiffSet methodsFor:'adding & removing'! |
220 |
||
221 |
add: anObject |
|
222 |
||
223 |
anObject parent: self. |
|
224 |
^diffs add: anObject |
|
225 |
||
226 |
"Created: / 09-11-2009 / 12:36:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
227 |
"Modified: / 10-11-2009 / 11:26:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
228 |
! |
|
229 |
||
230 |
addAll: aCollection |
|
231 |
||
232 |
aCollection do:[:e|self add:e] |
|
233 |
||
234 |
"Created: / 10-11-2009 / 11:27:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
235 |
! ! |
|
236 |
||
3158
f8c56a311307
Merged 87750af738dc and 72ca7e81fbbf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
237 |
|
2408 | 238 |
!ChangeSetDiffSet methodsFor:'enumerating'! |
239 |
||
240 |
collect: aBlock |
|
241 |
||
242 |
^diffs collect: aBlock |
|
243 |
||
244 |
"Created: / 10-11-2009 / 11:26:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
245 |
! |
|
246 |
||
247 |
do: aBlock |
|
248 |
||
249 |
^diffs do: [:each|each do:aBlock] |
|
250 |
||
251 |
"Created: / 10-11-2009 / 11:26:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
252 |
"Modified: / 25-11-2009 / 10:30:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
253 |
! ! |
|
254 |
||
3158
f8c56a311307
Merged 87750af738dc and 72ca7e81fbbf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
255 |
|
2408 | 256 |
!ChangeSetDiffSet methodsFor:'initialization'! |
257 |
||
258 |
initialize |
|
259 |
"Invoked when a new instance is created." |
|
260 |
||
261 |
"/ please change as required (and remove this comment) |
|
262 |
"/ name := nil. |
|
263 |
"/ versionALabel := nil. |
|
264 |
"/ versionBLabel := nil. |
|
265 |
diffs := OrderedCollection new:4. |
|
266 |
||
267 |
"/ super initialize. -- commented since inherited method does nothing |
|
268 |
||
269 |
"Modified: / 10-11-2009 / 11:25:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
270 |
! |
|
271 |
||
272 |
setDiffs: aCollection |
|
273 |
||
274 |
diffs := aCollection |
|
275 |
||
276 |
"Created: / 05-12-2009 / 11:09:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
277 |
! ! |
|
278 |
||
3158
f8c56a311307
Merged 87750af738dc and 72ca7e81fbbf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
279 |
|
2408 | 280 |
!ChangeSetDiffSet methodsFor:'private'! |
281 |
||
282 |
flattenOn: stream |
|
283 |
||
284 |
diffs do:[:diff|diff flattenOn: stream] |
|
285 |
||
286 |
"Created: / 05-12-2009 / 11:07:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3099
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
287 |
! |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
288 |
|
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
289 |
sort:sortBlock |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
290 |
"superclass ChangeSetDiffComponent says that I am responsible to implement this method" |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
291 |
|
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
292 |
diffs sort: sortBlock. |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
293 |
diffs do:[:e|e sort: sortBlock]. |
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
294 |
|
be6ff432a2ad
Fixes in ChangeSetDiff...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3098
diff
changeset
|
295 |
"Modified: / 17-01-2013 / 14:18:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2408 | 296 |
! ! |
297 |
||
3158
f8c56a311307
Merged 87750af738dc and 72ca7e81fbbf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
298 |
|
2408 | 299 |
!ChangeSetDiffSet methodsFor:'testing'! |
300 |
||
3074
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
301 |
isConflict |
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
302 |
"Return true, if there is a conflict." |
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
303 |
|
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
304 |
^ self diffs anySatisfy:[:e|e isConflict]. |
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
305 |
|
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
306 |
"Created: / 01-08-2012 / 17:10:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
307 |
! |
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
308 |
|
2408 | 309 |
isDiffSet |
310 |
^ true |
|
311 |
! |
|
312 |
||
313 |
isEmpty |
|
314 |
||
315 |
^diffs isEmpty or:[diffs allSatisfy: [:diff|diff isEmpty]] |
|
316 |
||
317 |
"Created: / 25-11-2009 / 20:37:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
318 |
"Modified: / 09-12-2009 / 17:43:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2879 | 319 |
! |
320 |
||
3074
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
321 |
isForCopyrightMethod |
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
322 |
"Returns true, if this is an entry for #copyright method" |
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
323 |
|
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
324 |
^diffs allSatisfy:[:each|each isForCopyrightMethod] |
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
325 |
|
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
326 |
"Created: / 01-08-2012 / 16:38:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
327 |
! |
e38a06f751a5
Some more testing methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3069
diff
changeset
|
328 |
|
2879 | 329 |
isForVersionMethod |
330 |
"Returns true, if this is an entry for version method" |
|
331 |
||
332 |
^diffs allSatisfy:[:each|each isForVersionMethod] |
|
333 |
||
334 |
"Created: / 18-04-2012 / 19:05:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
335 |
! |
|
336 |
||
337 |
isMerged |
|
338 |
"raise an error: must be redefined in concrete subclass(es)" |
|
339 |
||
340 |
^ self diffs allSatisfy:[:e|e isMerged]. |
|
341 |
||
342 |
"Created: / 19-03-2012 / 15:15:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2408 | 343 |
! ! |
344 |
||
3158
f8c56a311307
Merged 87750af738dc and 72ca7e81fbbf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
345 |
|
2408 | 346 |
!ChangeSetDiffSet class methodsFor:'documentation'! |
347 |
||
2628 | 348 |
version |
3398 | 349 |
^ '$Header: /cvs/stx/stx/libbasic3/ChangeSetDiffSet.st,v 1.6 2013-09-05 23:14:20 cg Exp $' |
2628 | 350 |
! |
351 |
||
3121
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3099
diff
changeset
|
352 |
version_HG |
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3099
diff
changeset
|
353 |
|
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3099
diff
changeset
|
354 |
^ '$Changeset: <not expanded> $' |
3012 | 355 |
! |
356 |
||
2879 | 357 |
version_SVN |
3398 | 358 |
^ '$Id: ChangeSetDiffSet.st,v 1.6 2013-09-05 23:14:20 cg Exp $' |
2408 | 359 |
! ! |
3398 | 360 |