author | convert-repo |
Tue, 09 Aug 2016 03:35:30 +0000 | |
changeset 1178 | 3a6dad9479fd |
parent 854 | 3b004dbab74d |
permissions | -rw-r--r-- |
710 | 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 |
" |
|
400 | 26 |
"{ Package: 'stx:libsvn' }" |
54 | 27 |
|
28 |
"{ NameSpace: SVN }" |
|
29 |
||
30 |
Notification subclass:#WCActionNotification |
|
31 |
instanceVariableNames:'action entry' |
|
32 |
classVariableNames:'' |
|
33 |
poolDictionaries:'' |
|
34 |
category:'SVN-Working copy' |
|
35 |
! |
|
36 |
||
710 | 37 |
!WCActionNotification 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 |
! ! |
|
54 | 67 |
|
68 |
!WCActionNotification class methodsFor:'instance creation'! |
|
69 |
||
70 |
readFromString: string |
|
71 |
^ self new readFromString: string |
|
72 |
||
73 |
"Created: / 16-03-2008 / 08:53:50 / janfrog" |
|
74 |
! |
|
75 |
||
76 |
readFromXml: xmlNode |
|
77 |
^ self new readFromXml: xmlNode |
|
78 |
||
79 |
"Created: / 24-06-2009 / 15:02:25 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
80 |
! ! |
|
81 |
||
710 | 82 |
!WCActionNotification class methodsFor:'others'! |
83 |
||
84 |
version_CVS |
|
854
3b004dbab74d
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
710
diff
changeset
|
85 |
^ '$Header$' |
710 | 86 |
! ! |
87 |
||
54 | 88 |
!WCActionNotification methodsFor:'accessing'! |
89 |
||
90 |
action |
|
91 |
^ action |
|
92 |
||
93 |
"Created: / 31-03-2008 / 11:09:26 / janfrog" |
|
94 |
! |
|
95 |
||
96 |
action:aWCAction |
|
97 |
action := aWCAction. |
|
98 |
||
99 |
"Created: / 31-03-2008 / 11:09:26 / janfrog" |
|
100 |
! |
|
101 |
||
102 |
entry |
|
103 |
^ entry |
|
104 |
! |
|
105 |
||
106 |
entry:aWCEntry |
|
107 |
entry := aWCEntry. |
|
108 |
! |
|
109 |
||
110 |
icon |
|
111 |
||
112 |
^action icon |
|
113 |
||
114 |
"Created: / 24-06-2009 / 15:08:17 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
115 |
! |
|
116 |
||
117 |
path |
|
118 |
||
119 |
^entry path |
|
120 |
||
121 |
"Created: / 27-08-2009 / 08:45:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
122 |
! |
|
123 |
||
124 |
wc: aSVNWorkingCopy |
|
125 |
||
126 |
^entry wc: aSVNWorkingCopy |
|
127 |
||
128 |
"Created: / 27-08-2009 / 09:50:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
129 |
! ! |
|
130 |
||
710 | 131 |
!WCActionNotification methodsFor:'displaying'! |
132 |
||
133 |
displayString |
|
134 |
||
135 |
| icon | |
|
136 |
(icon := action icon) |
|
137 |
ifNil:[^(LabelAndIcon string: entry path) offset: 20; yourself] |
|
138 |
ifNotNil:[^LabelAndIcon label: entry path icon: action icon] |
|
139 |
! ! |
|
140 |
||
54 | 141 |
!WCActionNotification methodsFor:'initialization'! |
142 |
||
143 |
readFromString: string |
|
144 |
| pair path | |
|
145 |
||
146 |
pair := string tokensBasedOn: Character space. |
|
147 |
||
710 | 148 |
action := WCAction actionNamed: (string copyTo:1). |
54 | 149 |
path := pair last. |
150 |
(path first = $' and: [ path last = $' ]) |
|
151 |
ifTrue: [ path := path copyFrom: 2 to: path size - 1 ]. |
|
152 |
entry := WCEntry path: path |
|
153 |
||
154 |
"Created: / 16-03-2008 / 08:54:44 / janfrog" |
|
155 |
"Modified: / 16-03-2008 / 10:06:42 / janfrog" |
|
710 | 156 |
"Modified: / 02-11-2009 / 17:24:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
54 | 157 |
! |
158 |
||
159 |
readFromXml: xml |
|
160 |
||
161 |
| path | |
|
162 |
||
163 |
" |
|
164 |
<path |
|
165 |
action='M'>/trunk/extensions.st</path>" |
|
248 | 166 |
|
54 | 167 |
action := WCAction actionNamed: (xml @ 'action'). |
168 |
path := xml characterData. |
|
169 |
"Strip branch prefix" |
|
170 |
(path startsWith: '/trunk/') |
|
248 | 171 |
ifTrue: [ path := path "entry" copyFrom: ('/trunk/' size) + 1 ] |
54 | 172 |
ifFalse: |
173 |
[ ((path startsWith: '/branches/') or: [ path startsWith: '/tags/' ]) |
|
174 |
ifTrue: |
|
175 |
[ | idx | |
|
176 |
||
177 |
idx := path indexOf: $/ startingAt: 2. |
|
178 |
idx := path indexOf: $/ startingAt: idx + 1. |
|
179 |
idx isZero ifFalse: [ path := path copyFrom: idx + 1 ] ] ]. |
|
180 |
entry := WCEntry path: path. |
|
181 |
||
182 |
"Modified: / 16-03-2008 / 10:06:42 / janfrog" |
|
183 |
"Created: / 24-06-2009 / 15:00:43 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
184 |
"Modified: / 27-08-2009 / 08:22:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
248 | 185 |
"Modified: / 01-10-2009 / 16:17:58 / Felix Madrid <fm@exept.de>" |
54 | 186 |
! ! |
187 |
||
188 |
!WCActionNotification methodsFor:'printing'! |
|
189 |
||
190 |
printOn: stream |
|
191 |
||
192 |
action printOn: stream. |
|
193 |
stream tab. |
|
194 |
entry printOn: stream |
|
195 |
||
196 |
"Created: / 16-03-2008 / 09:01:46 / janfrog" |
|
197 |
! ! |
|
198 |
||
199 |
!WCActionNotification methodsFor:'processing'! |
|
200 |
||
201 |
processUsing: processor |
|
202 |
^ action processEntry: entry using: processor |
|
203 |
||
204 |
"Created: / 27-08-2009 / 08:52:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
205 |
! ! |
|
206 |
||
207 |
!WCActionNotification class methodsFor:'documentation'! |
|
208 |
||
209 |
version |
|
854
3b004dbab74d
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
710
diff
changeset
|
210 |
^ '$Header$' |
193 | 211 |
! |
212 |
||
213 |
version_SVN |
|
854
3b004dbab74d
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
710
diff
changeset
|
214 |
^ '§Id: SVN__WCActionNotification.st 363 2011-08-08 13:49:48Z vranyj1 §' |
54 | 215 |
! ! |