author | convert-repo |
Tue, 09 Aug 2016 03:35:30 +0000 | |
changeset 1178 | 3a6dad9479fd |
parent 1174 | 5df15ca6c1ee |
permissions | -rw-r--r-- |
756 | 1 |
" |
2 |
Copyright (c) 2007-2010 Jan Vrany |
|
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
4 |
||
5 |
Permission is hereby granted, free of charge, to any person |
|
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
25 |
" |
|
398 | 26 |
"{ Package: 'stx:libsvn' }" |
7 | 27 |
|
28 |
"{ NameSpace: SVN }" |
|
29 |
||
30 |
Object subclass:#Branch |
|
756 | 31 |
instanceVariableNames:'repository path url' |
7 | 32 |
classVariableNames:'' |
33 |
poolDictionaries:'' |
|
34 |
category:'SVN-Core' |
|
35 |
! |
|
36 |
||
756 | 37 |
!Branch class methodsFor:'documentation'! |
38 |
||
39 |
copyright |
|
40 |
" |
|
41 |
Copyright (c) 2007-2010 Jan Vrany |
|
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 |
! ! |
|
7 | 67 |
|
68 |
!Branch class methodsFor:'instance creation'! |
|
69 |
||
70 |
repository: aRepository path: aString |
|
71 |
||
72 |
^self new |
|
73 |
repository: aRepository; |
|
74 |
path: aString; |
|
75 |
yourself |
|
76 |
||
77 |
"Created: / 19-08-2009 / 11:19:44 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
78 |
! ! |
|
79 |
||
756 | 80 |
!Branch class methodsFor:'others'! |
81 |
||
82 |
version_CVS |
|
901
68a210771223
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
756
diff
changeset
|
83 |
^ '$Header$' |
756 | 84 |
! ! |
85 |
||
7 | 86 |
!Branch methodsFor:'accessing'! |
87 |
||
88 |
icon |
|
89 |
||
90 |
||
91 |
self isBranch ifTrue:[^IconLibrary branch]. |
|
92 |
self isTag ifTrue:[^IconLibrary tag]. |
|
93 |
^IconLibrary empty |
|
94 |
||
95 |
"Created: / 11-04-2008 / 13:45:32 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
96 |
"Modified: / 14-04-2008 / 11:15:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
97 |
! |
|
98 |
||
99 |
name |
|
100 |
||
756 | 101 |
^self isTrunk |
102 |
ifTrue:[(path ? 'trunk/') allButLast asText allBold] |
|
103 |
ifFalse:[path allButLast] |
|
7 | 104 |
|
105 |
"Created: / 19-03-2008 / 08:27:54 / janfrog" |
|
106 |
"Modified: / 31-03-2008 / 15:20:04 / janfrog" |
|
107 |
! |
|
108 |
||
109 |
package |
|
110 |
||
111 |
^repository package |
|
112 |
||
113 |
"Created: / 20-05-2008 / 17:56:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
114 |
! |
|
115 |
||
116 |
path |
|
117 |
^ path |
|
118 |
||
119 |
"Created: / 19-03-2008 / 08:27:47 / janfrog" |
|
120 |
! |
|
121 |
||
122 |
path:aString |
|
123 |
path := aString. |
|
124 |
(path endsWith: $/) ifFalse: |
|
125 |
[path := path , $/] |
|
126 |
||
127 |
"Created: / 19-03-2008 / 08:27:47 / janfrog" |
|
128 |
"Modified: / 22-10-2008 / 13:18:24 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
129 |
! |
|
130 |
||
131 |
repository |
|
132 |
^ repository |
|
133 |
||
134 |
"Created: / 19-03-2008 / 08:28:39 / janfrog" |
|
135 |
! |
|
136 |
||
137 |
repository:something |
|
138 |
repository := something. |
|
139 |
||
140 |
"Created: / 19-03-2008 / 08:28:39 / janfrog" |
|
141 |
! |
|
142 |
||
143 |
url |
|
144 |
||
756 | 145 |
url ifNil:[url := repository urlForBranch: path]. |
146 |
^url |
|
7 | 147 |
|
148 |
"Created: / 19-03-2008 / 09:40:41 / janfrog" |
|
756 | 149 |
"Modified: / 14-03-2011 / 09:58:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7 | 150 |
! ! |
151 |
||
152 |
!Branch methodsFor:'accessing - change sets'! |
|
153 |
||
154 |
changeSet |
|
155 |
||
756 | 156 |
^self changeSet: SVN::Revision head |
7 | 157 |
|
158 |
"Created: / 19-04-2008 / 14:09:08 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
159 |
! |
|
160 |
||
756 | 161 |
changeSet:revision |
162 |
||
163 |
^self changeSet:revision ignoreAutoloaded: false |
|
164 |
! |
|
7 | 165 |
|
756 | 166 |
changeSet:revision ignoreAutoloaded:ignoreAutoloaded |
167 |
|entries changeSet| |
|
168 |
||
169 |
ActivityNotification notify:'Listing repository'. |
|
170 |
entries := (self list:revision) select:[:entry | entry isSourceEntry ]. |
|
7 | 171 |
changeSet := ChangeSet new. |
756 | 172 |
ActivityNotification notify:'Reading rev. ' , revision printString. |
173 |
entries |
|
174 |
withIndexDo:[:entry :index | |
|
175 |
ProgressNotification |
|
176 |
notify:'Reading ' , entry path , ' rev. ' , revision printString |
|
177 |
progress:((100 / entries size) * index) rounded. |
|
178 |
changeSet addAll:(self |
|
179 |
changeSetForContainer:entry path |
|
180 |
revision:revision |
|
181 |
ignoreAutoloaded:ignoreAutoloaded). |
|
182 |
]. |
|
183 |
^ changeSet |
|
7 | 184 |
|
185 |
"Created: / 19-04-2008 / 14:09:30 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
186 |
"Modified: / 28-10-2008 / 13:00:05 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
756 | 187 |
"Modified: / 19-11-2009 / 15:08:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7 | 188 |
! |
189 |
||
190 |
changeSetForClass: cls |
|
191 |
||
756 | 192 |
^self changeSetForClass: cls revision: SVN::Revision head |
7 | 193 |
|
194 |
"Created: / 19-04-2008 / 17:24:04 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
195 |
! |
|
196 |
||
197 |
changeSetForClass: cls revision: revision |
|
198 |
||
756 | 199 |
^self changeSetForClass: cls revision: revision ignoreAutoloaded: false |
200 |
||
201 |
||
7 | 202 |
|
203 |
"Created: / 19-04-2008 / 17:23:46 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
204 |
"Modified: / 19-04-2008 / 20:20:17 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
205 |
! |
|
206 |
||
756 | 207 |
changeSetForClass: cls revision: revision ignoreAutoloaded: ignoreAutoloaded |
208 |
||
209 |
||
210 |
^(ignoreAutoloaded or:[cls isLoaded]) |
|
211 |
ifTrue: |
|
212 |
[self |
|
213 |
changeSetForContainer:(repository containerNameForClass: cls) |
|
214 |
revision: revision] |
|
215 |
ifFalse: |
|
216 |
[ChangeSet new]. |
|
217 |
||
218 |
"Created: / 19-04-2008 / 17:23:46 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
219 |
"Modified: / 19-04-2008 / 20:20:17 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
220 |
"Modified: / 19-11-2009 / 15:07:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
221 |
! |
|
222 |
||
7 | 223 |
changeSetForContainer: container revision: revision |
224 |
||
756 | 225 |
^self changeSetForContainer: container revision: revision ignoreAutoloaded: false |
226 |
||
227 |
"Created: / 19-04-2008 / 20:18:51 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
228 |
"Modified: / 19-11-2009 / 15:09:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
229 |
! |
|
230 |
||
231 |
changeSetForContainer: container revision: revision ignoreAutoloaded: ignoreAutoloaded |
|
232 |
||
7 | 233 |
| containerStream | |
756 | 234 |
ignoreAutoloaded ifTrue: |
235 |
[|cls| |
|
236 |
cls := SVN::Repository classFromContainerName: container. |
|
237 |
(cls isNil or: [cls isLoaded not]) ifTrue:[^ChangeSet new]]. |
|
238 |
||
7 | 239 |
containerStream := (self |
240 |
cat:container |
|
241 |
revision: revision) readStream. |
|
756 | 242 |
^(ChangeSet fromStream: containerStream) |
243 |
name: container , ' r' , revision printString |
|
7 | 244 |
|
756 | 245 |
"Created: / 19-11-2009 / 15:08:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7 | 246 |
! |
247 |
||
248 |
changeSetForExtensions |
|
249 |
||
756 | 250 |
^self changeSetForExtensionsRevision: SVN::Revision head |
7 | 251 |
|
252 |
"Created: / 19-04-2008 / 20:21:29 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
253 |
! |
|
254 |
||
255 |
changeSetForExtensionsRevision: revision |
|
256 |
||
257 |
^self |
|
258 |
changeSetForContainer:(repository containerNameForExtensions) |
|
259 |
revision: revision. |
|
260 |
||
261 |
"Created: / 19-04-2008 / 19:08:52 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
262 |
"Modified: / 19-04-2008 / 20:20:58 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
263 |
! |
|
264 |
||
265 |
changeSetForLoad:revision |
|
266 |
|diffSet classesToRemove| |
|
267 |
||
268 |
diffSet := self diffSetBetweenImageAndRevision:revision. |
|
269 |
classesToRemove := Set new. |
|
756 | 270 |
ActivityNotification notify:'Computing load set'. |
271 |
"self = image, arg = revision" |
|
272 |
^ (diffSet onlyInArg) |
|
273 |
, (diffSet changed collect:[:changePair | changePair second ]) |
|
7 | 274 |
, (diffSet onlyInReceiver |
756 | 275 |
select:[:change | change isClassDefinitionChange ] |
276 |
thenCollect:[:change | |
|
277 |
classesToRemove add:change className. |
|
278 |
ClassRemoveChange className:change className |
|
279 |
]) |
|
280 |
, (diffSet onlyInReceiver |
|
281 |
select:[:change | |
|
282 |
change isMethodDefinitionChange |
|
283 |
and:[ (classesToRemove includes:change className) not ] |
|
284 |
] |
|
285 |
thenCollect:[:change | |
|
286 |
MethodRemoveChange className:change className selector:change selector |
|
287 |
]) |
|
288 |
"Created: / 22-10-2008 / 11:08:06 / Jan Vrany <vranyj1@fel.cvut.cz>" "Modified: / 07-11-2008 / 08:09:48 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
7 | 289 |
! ! |
290 |
||
291 |
!Branch methodsFor:'accessing - diff sets'! |
|
292 |
||
293 |
diffSetBetweenImageAndRevision: revision |
|
294 |
||
295 |
| imageChangeSet revisionChangeSet | |
|
756 | 296 |
imageChangeSet := ChangeSet forPackage: self package ignoreAutoloaded: true. |
297 |
revisionChangeSet := self changeSet: revision ignoreAutoloaded: true. |
|
298 |
^(ChangeSetDiff versionA: imageChangeSet versionB: revisionChangeSet) |
|
299 |
versionALabel: 'Current (in image)'; |
|
300 |
versionBLabel: revision printString |
|
7 | 301 |
|
302 |
"Created: / 20-05-2008 / 17:56:02 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
756 | 303 |
"Modified: / 25-03-2010 / 16:33:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
304 |
"Modified: / 07-07-2011 / 20:02:19 / jv" |
|
7 | 305 |
! |
306 |
||
307 |
diffSetBetweenRevision: revisionA andRevision: revisionB |
|
308 |
||
309 |
| revisionAChangeSet revisionBChangeSet | |
|
310 |
revisionAChangeSet := self changeSet: revisionA. |
|
311 |
revisionBChangeSet := self changeSet: revisionB. |
|
756 | 312 |
^(ChangeSetDiff versionA: revisionAChangeSet versionB: revisionBChangeSet) |
313 |
versionALabel: revisionA printString; |
|
314 |
versionBLabel: revisionB printString |
|
7 | 315 |
|
316 |
"Created: / 20-05-2008 / 17:58:20 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
756 | 317 |
"Modified: / 10-11-2009 / 11:22:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
318 |
"Modified: / 07-07-2011 / 20:02:27 / jv" |
|
7 | 319 |
! |
320 |
||
321 |
diffSetForClass: cls betweenImageAndRevision: revision |
|
322 |
||
323 |
| imageChangeSet revisionChangeSet | |
|
756 | 324 |
|
325 |
ActivityNotification notify: 'Reading class ',cls fullName asText allBold. |
|
7 | 326 |
imageChangeSet := ChangeSet forExistingClass:cls withExtensions: false extensionsOnly:false. |
756 | 327 |
ActivityNotification notify: 'Reading class ',cls fullName asText allBold, ' (rev. ', revision printString,')'. |
7 | 328 |
revisionChangeSet := self changeSetForClass: cls revision: revision. |
756 | 329 |
ActivityNotification notify: 'Computing differences for ',cls fullName asText allBold. |
330 |
^(ChangeSetDiff versionA: imageChangeSet versionB: revisionChangeSet) |
|
331 |
name: cls fullName; |
|
332 |
versionALabel: 'Current (in image)'; |
|
333 |
versionBLabel: revision printString |
|
7 | 334 |
|
335 |
"Created: / 19-04-2008 / 18:34:06 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
756 | 336 |
"Modified: / 25-03-2010 / 16:33:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
337 |
"Modified: / 07-07-2011 / 20:02:30 / jv" |
|
7 | 338 |
! |
339 |
||
340 |
diffSetForExtensionsBetweenImageAndRevision: revision |
|
341 |
||
342 |
| imageChangeSet revisionChangeSet | |
|
756 | 343 |
ActivityNotification notify: 'Reading extensions for ',self package asText allItalic. |
7 | 344 |
imageChangeSet := ChangeSet forExistingMethods: repository packageExtensions. |
756 | 345 |
ActivityNotification notify: 'Reading extensions for ',self package asText allItalic, ' (rev. ', revision printString,')'. |
7 | 346 |
revisionChangeSet := self changeSetForExtensionsRevision: revision. |
756 | 347 |
ActivityNotification notify: 'Computing differences'. |
348 |
^(ChangeSetDiff versionA: imageChangeSet versionB: revisionChangeSet) |
|
349 |
name: 'package extensions'; |
|
350 |
versionALabel: 'Current (in image)'; |
|
351 |
versionBLabel: revision printString |
|
7 | 352 |
|
353 |
"Created: / 19-04-2008 / 19:08:33 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
756 | 354 |
"Modified: / 25-03-2010 / 16:33:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
355 |
"Modified: / 07-07-2011 / 20:02:34 / jv" |
|
7 | 356 |
! ! |
357 |
||
358 |
!Branch methodsFor:'commands'! |
|
359 |
||
360 |
cat: file |
|
361 |
||
756 | 362 |
^self cat: file revision: SVN::Revision head |
7 | 363 |
|
364 |
"Created: / 19-04-2008 / 10:51:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
365 |
! |
|
366 |
||
367 |
cat: file revision: revision |
|
368 |
||
369 |
^CatCommand new |
|
370 |
branch: self; |
|
371 |
path: file; |
|
372 |
revision: revision; |
|
373 |
execute. |
|
374 |
||
375 |
"Created: / 19-04-2008 / 10:51:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
376 |
"Modified: / 19-08-2009 / 10:00:59 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
377 |
! |
|
378 |
||
969 | 379 |
exists:file |
380 |
||
381 |
^self exists: file revision: SVN::Revision head. |
|
382 |
||
383 |
"Created: / 19-04-2008 / 13:42:50 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
384 |
"Modified: / 19-08-2009 / 10:01:08 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
385 |
"Created: / 11-10-2011 / 11:14:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
386 |
! |
|
387 |
||
388 |
exists:file revision:revision |
|
389 |
||
390 |
^[ |
|
391 |
ListCommand new |
|
392 |
branch: self; |
|
393 |
recursive: true; |
|
394 |
revision: revision; |
|
395 |
execute. |
|
396 |
true. |
|
397 |
] on: SVNError do:[ |
|
398 |
false. |
|
399 |
] |
|
400 |
||
401 |
"Created: / 19-04-2008 / 13:42:50 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
402 |
"Modified: / 19-08-2009 / 10:01:08 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
403 |
"Created: / 10-10-2011 / 14:59:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
404 |
! |
|
405 |
||
7 | 406 |
list |
407 |
||
408 |
||
756 | 409 |
^self list: SVN::Revision head. |
7 | 410 |
|
411 |
"Created: / 19-04-2008 / 13:42:23 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
412 |
! |
|
413 |
||
414 |
list: revision |
|
415 |
||
416 |
^ListCommand new |
|
417 |
branch: self; |
|
418 |
recursive: true; |
|
419 |
revision: revision; |
|
420 |
execute |
|
421 |
||
422 |
"Created: / 19-04-2008 / 13:42:50 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
423 |
"Modified: / 19-08-2009 / 10:01:08 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
424 |
! |
|
425 |
||
426 |
log |
|
427 |
||
969 | 428 |
^self log: nil |
7 | 429 |
|
430 |
"Created: / 19-04-2008 / 10:52:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
431 |
"Modified: / 19-04-2008 / 12:16:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
969 | 432 |
"Modified: / 15-10-2011 / 16:29:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7 | 433 |
! |
434 |
||
435 |
log: stringOrClass |
|
436 |
||
969 | 437 |
^self log: stringOrClass limit: nil |
438 |
||
439 |
"Created: / 19-04-2008 / 10:52:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
440 |
"Modified: / 19-08-2009 / 10:03:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
441 |
"Modified: / 15-10-2011 / 16:30:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
442 |
! |
|
443 |
||
444 |
log: stringOrClass limit: limit |
|
445 |
||
446 |
^self log: stringOrClass limit: limit revisions: nil |
|
447 |
||
448 |
"Created: / 19-04-2008 / 10:52:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
449 |
"Modified: / 19-08-2009 / 10:03:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
450 |
"Created: / 15-10-2011 / 16:29:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
451 |
! |
|
452 |
||
453 |
log: stringOrClass limit: limit revisions: revisionRangeOrNil |
|
454 |
||
7 | 455 |
| container | |
456 |
container := stringOrClass isBehavior |
|
457 |
ifFalse:[stringOrClass] |
|
458 |
ifTrue:[repository containerNameForClass: stringOrClass]. |
|
459 |
||
460 |
^LogCommand new |
|
461 |
branch: self; |
|
969 | 462 |
path: container ? ''; |
463 |
revision: revisionRangeOrNil; |
|
464 |
limit: limit; |
|
7 | 465 |
execute |
466 |
||
467 |
"Created: / 19-04-2008 / 10:52:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
468 |
"Modified: / 19-08-2009 / 10:03:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
969 | 469 |
"Created: / 15-10-2011 / 17:16:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7 | 470 |
! |
471 |
||
472 |
revert |
|
473 |
||
474 |
self repository workingCopy revert |
|
475 |
||
476 |
"Created: / 22-10-2008 / 16:46:30 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
477 |
! |
|
478 |
||
479 |
revert: paths |
|
480 |
||
481 |
self repository workingCopy revert: paths |
|
482 |
||
483 |
"Created: / 03-11-2008 / 21:21:44 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
484 |
! |
|
485 |
||
486 |
update |
|
487 |
||
488 |
self repository workingCopy update |
|
489 |
||
490 |
"Created: / 22-10-2008 / 16:41:22 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
491 |
! ! |
|
492 |
||
493 |
!Branch methodsFor:'comparing'! |
|
494 |
||
495 |
= anotherBranch |
|
496 |
||
497 |
^self class = anotherBranch class |
|
498 |
and:[self repository = anotherBranch repository |
|
499 |
and:[self path = anotherBranch path]] |
|
500 |
||
501 |
"Created: / 31-03-2008 / 14:38:38 / janfrog" |
|
502 |
! |
|
503 |
||
504 |
hash |
|
505 |
||
506 |
^path hash bitXor: repository hash |
|
507 |
||
508 |
"Created: / 31-03-2008 / 14:37:45 / janfrog" |
|
509 |
! ! |
|
510 |
||
756 | 511 |
!Branch methodsFor:'converting'! |
512 |
||
513 |
asString |
|
514 |
||
515 |
^path |
|
516 |
||
517 |
"Created: / 09-03-2010 / 22:50:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
518 |
! ! |
|
519 |
||
7 | 520 |
!Branch methodsFor:'displaying'! |
521 |
||
756 | 522 |
displayString |
7 | 523 |
|
756 | 524 |
^LabelAndIcon label: self name icon: self icon |
7 | 525 |
|
526 |
"Created: / 14-04-2008 / 11:11:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
527 |
! ! |
|
528 |
||
529 |
!Branch methodsFor:'printing & storing'! |
|
530 |
||
531 |
printOn:aStream |
|
1174 | 532 |
"append a printed representation of the receiver to the argument, aStream" |
7 | 533 |
|
534 |
super printOn:aStream. |
|
535 |
aStream nextPut:$(. |
|
536 |
path printOn:aStream. |
|
537 |
aStream nextPut:$). |
|
538 |
||
539 |
"Created: / 19-03-2008 / 08:34:04 / janfrog" |
|
540 |
! ! |
|
541 |
||
542 |
!Branch methodsFor:'testing'! |
|
543 |
||
544 |
isBranch |
|
545 |
||
546 |
^path startsWith:'/branches' |
|
547 |
||
548 |
"Created: / 19-03-2008 / 08:42:46 / janfrog" |
|
549 |
! |
|
550 |
||
551 |
isTag |
|
552 |
||
553 |
^path startsWith:'/tags' |
|
554 |
||
555 |
"Created: / 19-03-2008 / 08:42:53 / janfrog" |
|
556 |
! |
|
557 |
||
558 |
isTrunk |
|
559 |
||
560 |
^path = '/trunk/' or:[path = ''] |
|
561 |
||
562 |
"Created: / 19-03-2008 / 08:42:58 / janfrog" |
|
563 |
"Modified: / 14-04-2008 / 12:48:10 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
564 |
! ! |
|
565 |
||
566 |
!Branch class methodsFor:'documentation'! |
|
567 |
||
901
68a210771223
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
756
diff
changeset
|
568 |
version |
68a210771223
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
756
diff
changeset
|
569 |
^ '$Header$' |
68a210771223
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
756
diff
changeset
|
570 |
! |
68a210771223
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
756
diff
changeset
|
571 |
|
185 | 572 |
version_SVN |
1174 | 573 |
^ '$Id$' |
7 | 574 |
! ! |
1174 | 575 |