64
|
1 |
"{ Package: 'stx:goodies/monticello' }"
|
|
2 |
|
|
3 |
MCPatchOperation subclass:#MCModification
|
|
4 |
instanceVariableNames:'obsoletion modification'
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
657
|
7 |
category:'SCM-Monticello-Patching'
|
64
|
8 |
!
|
|
9 |
|
|
10 |
|
|
11 |
!MCModification class methodsFor:'as yet unclassified'!
|
|
12 |
|
|
13 |
of: base to: target
|
|
14 |
^ self new initializeWithBase: base target: target
|
|
15 |
! !
|
|
16 |
|
|
17 |
!MCModification methodsFor:'accessing'!
|
|
18 |
|
|
19 |
applyTo: anObject
|
|
20 |
anObject modifyDefinition: obsoletion to: modification
|
|
21 |
!
|
|
22 |
|
|
23 |
baseDefinition
|
|
24 |
^ obsoletion
|
|
25 |
!
|
|
26 |
|
|
27 |
definition
|
|
28 |
^ modification
|
|
29 |
!
|
|
30 |
|
|
31 |
fromSource
|
|
32 |
^ obsoletion source
|
|
33 |
!
|
|
34 |
|
|
35 |
modification
|
|
36 |
^ modification
|
|
37 |
!
|
|
38 |
|
|
39 |
obsoletion
|
|
40 |
^ obsoletion
|
|
41 |
!
|
|
42 |
|
|
43 |
summarySuffix
|
|
44 |
^self fromSource = self toSource
|
|
45 |
ifTrue: [ ' (source same but rev changed)' ]
|
|
46 |
ifFalse: [ ' (changed)' ]
|
|
47 |
!
|
|
48 |
|
|
49 |
targetClass
|
|
50 |
^ obsoletion actualClass
|
|
51 |
!
|
|
52 |
|
|
53 |
targetDefinition
|
|
54 |
^ modification
|
|
55 |
!
|
|
56 |
|
|
57 |
toSource
|
|
58 |
^ modification source
|
|
59 |
! !
|
|
60 |
|
|
61 |
!MCModification methodsFor:'as yet unclassified'!
|
|
62 |
|
|
63 |
inverse
|
|
64 |
^ MCModification of: modification to: obsoletion
|
|
65 |
!
|
|
66 |
|
|
67 |
isClassPatch
|
|
68 |
^obsoletion isClassDefinition
|
|
69 |
!
|
|
70 |
|
|
71 |
printAnnotations: request on: aStream
|
|
72 |
aStream nextPutAll: 'old: '.
|
|
73 |
obsoletion printAnnotations: request on: aStream.
|
|
74 |
aStream cr.
|
|
75 |
aStream nextPutAll: 'new: '.
|
|
76 |
modification printAnnotations: request on: aStream.
|
|
77 |
! !
|
|
78 |
|
|
79 |
!MCModification methodsFor:'initializing'!
|
|
80 |
|
|
81 |
initializeWithBase: base target: target
|
216
|
82 |
obsoletion := base.
|
|
83 |
modification := target.
|
64
|
84 |
! !
|
|
85 |
|
|
86 |
!MCModification methodsFor:'testing'!
|
|
87 |
|
|
88 |
isModification
|
|
89 |
^ true
|
|
90 |
! !
|
|
91 |
|
|
92 |
!MCModification class methodsFor:'documentation'!
|
|
93 |
|
|
94 |
version
|
657
|
95 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCModification.st,v 1.4 2012-09-11 21:24:34 cg Exp $'
|
216
|
96 |
!
|
|
97 |
|
|
98 |
version_CVS
|
657
|
99 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCModification.st,v 1.4 2012-09-11 21:24:34 cg Exp $'
|
216
|
100 |
!
|
|
101 |
|
|
102 |
version_SVN
|
|
103 |
^ '§Id: MCModification.st 5 2010-08-29 07:30:29Z vranyj1 §'
|
64
|
104 |
! !
|