13836
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2006 by 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 |
"
|
|
12 |
"{ Package: 'stx:libtool' }"
|
|
13 |
|
|
14 |
"{ NameSpace: Tools }"
|
|
15 |
|
|
16 |
Object subclass:#ChangeSetDiffInfo
|
|
17 |
instanceVariableNames:'specBase specA specB specMerge diffset same'
|
|
18 |
classVariableNames:''
|
|
19 |
poolDictionaries:''
|
|
20 |
category:'Interface-Diff'
|
|
21 |
!
|
|
22 |
|
|
23 |
!ChangeSetDiffInfo class methodsFor:'documentation'!
|
|
24 |
|
|
25 |
copyright
|
|
26 |
"
|
|
27 |
COPYRIGHT (c) 2006 by eXept Software AG
|
|
28 |
All Rights Reserved
|
|
29 |
|
|
30 |
This software is furnished under a license and may be used
|
|
31 |
only in accordance with the terms of that license and with the
|
|
32 |
inclusion of the above copyright notice. This software may not
|
|
33 |
be provided or otherwise made available to, or used by, any
|
|
34 |
other person. No title to or ownership of the software is
|
|
35 |
hereby transferred.
|
|
36 |
"
|
|
37 |
! !
|
|
38 |
|
|
39 |
!ChangeSetDiffInfo class methodsFor:'instance creation'!
|
|
40 |
|
|
41 |
specA: specA specB: specB
|
|
42 |
|
|
43 |
^self specA: specA specB: specB specBase: nil
|
|
44 |
|
|
45 |
"Created: / 20-03-2012 / 11:17:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
46 |
!
|
|
47 |
|
|
48 |
specA: specA specB: specB specBase: specBase
|
|
49 |
|
|
50 |
^self specA: specA specB: specB specBase: specBase specMerge: nil
|
|
51 |
|
|
52 |
"Created: / 20-03-2012 / 11:19:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
53 |
!
|
|
54 |
|
|
55 |
specA: specA specB: specB specBase: specBase specMerge: specMerge
|
|
56 |
|
|
57 |
^self new
|
|
58 |
specA: specA;
|
|
59 |
specB: specB;
|
|
60 |
specBase: specBase;
|
|
61 |
specMerge: specMerge
|
|
62 |
|
|
63 |
"Created: / 20-03-2012 / 11:19:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
64 |
! !
|
|
65 |
|
|
66 |
!ChangeSetDiffInfo methodsFor:'accessing'!
|
|
67 |
|
|
68 |
diffset
|
|
69 |
^ diffset
|
|
70 |
!
|
|
71 |
|
|
72 |
same
|
|
73 |
^ same
|
|
74 |
!
|
|
75 |
|
|
76 |
specA
|
|
77 |
^ specA
|
|
78 |
!
|
|
79 |
|
|
80 |
specA:something
|
|
81 |
specA := something.
|
|
82 |
!
|
|
83 |
|
|
84 |
specB
|
|
85 |
^ specB
|
|
86 |
!
|
|
87 |
|
|
88 |
specB:something
|
|
89 |
specB := something.
|
|
90 |
!
|
|
91 |
|
|
92 |
specBase
|
|
93 |
^ specBase
|
|
94 |
!
|
|
95 |
|
|
96 |
specBase:something
|
|
97 |
specBase := something.
|
|
98 |
!
|
|
99 |
|
|
100 |
specMerge
|
|
101 |
^ specMerge
|
|
102 |
!
|
|
103 |
|
|
104 |
specMerge:something
|
|
105 |
specMerge := something.
|
|
106 |
!
|
|
107 |
|
|
108 |
specMergeFile
|
|
109 |
^ specMerge file
|
|
110 |
|
|
111 |
"Created: / 20-03-2012 / 15:04:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
112 |
! !
|
|
113 |
|
|
114 |
!ChangeSetDiffInfo methodsFor:'queries'!
|
|
115 |
|
|
116 |
isDiff2
|
|
117 |
|
|
118 |
^specBase isNil
|
|
119 |
|
|
120 |
"Created: / 20-03-2012 / 10:22:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
121 |
!
|
|
122 |
|
|
123 |
isDiff3
|
|
124 |
|
|
125 |
^specBase notNil
|
|
126 |
|
|
127 |
"Created: / 20-03-2012 / 10:23:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
128 |
!
|
|
129 |
|
|
130 |
isMerge
|
|
131 |
|
|
132 |
^
|
|
133 |
"/ specBase notNil and:[
|
|
134 |
specMerge notNil
|
|
135 |
"/ ]
|
|
136 |
|
|
137 |
"Created: / 20-03-2012 / 10:23:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
138 |
! !
|
|
139 |
|
|
140 |
!ChangeSetDiffInfo methodsFor:'read / write'!
|
|
141 |
|
|
142 |
read
|
|
143 |
"Reads changesets and generates diffset and 'same' change list"
|
|
144 |
|
|
145 |
| diff csA csB csBase |
|
|
146 |
diff := ChangeSetDiff new.
|
|
147 |
ProgressNotification notify: 'Reading changes...' progress: nil.
|
|
148 |
csA := specA changeSet.
|
|
149 |
csB := specB changeSet.
|
|
150 |
csBase := (specBase notNil ifTrue:[specBase changeSet] ifFalse:[nil]).
|
|
151 |
ProgressNotification notify: 'Diffing...' progress: nil.
|
|
152 |
diff
|
|
153 |
versionA: csA
|
|
154 |
versionB: csB
|
|
155 |
versionBase: csBase.
|
|
156 |
diffset := diff diffset.
|
|
157 |
same := diff same.
|
|
158 |
|
|
159 |
"Created: / 19-03-2012 / 22:10:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
160 |
"Modified: / 11-11-2013 / 11:59:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
161 |
! !
|
|
162 |
|
|
163 |
!ChangeSetDiffInfo class methodsFor:'documentation'!
|
|
164 |
|
|
165 |
version
|
|
166 |
^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetDiffInfo.st,v 1.1 2014-02-05 18:58:15 cg Exp $'
|
|
167 |
!
|
|
168 |
|
|
169 |
version_CVS
|
|
170 |
^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetDiffInfo.st,v 1.1 2014-02-05 18:58:15 cg Exp $'
|
|
171 |
! !
|
|
172 |
|