author | Merge Script |
Tue, 09 Aug 2016 06:39:39 +0200 | |
branch | jv |
changeset 1179 | a3c51fbc33cf |
parent 895 | d715a4e5255f |
permissions | -rw-r--r-- |
722 | 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 |
" |
|
480 | 26 |
"{ Package: 'stx:libsvn' }" |
25 | 27 |
|
28 |
"{ NameSpace: SVN }" |
|
29 |
||
30 |
Object subclass:#Task |
|
31 |
instanceVariableNames:'package classes workingCopy' |
|
32 |
classVariableNames:'' |
|
33 |
poolDictionaries:'' |
|
34 |
category:'SVN-Tasks' |
|
35 |
! |
|
36 |
||
722 | 37 |
!Task 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 |
! ! |
|
67 |
||
68 |
!Task class methodsFor:'others'! |
|
69 |
||
70 |
version_CVS |
|
895
d715a4e5255f
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
722
diff
changeset
|
71 |
^ '$Header$' |
722 | 72 |
! ! |
25 | 73 |
|
74 |
!Task methodsFor:'accessing'! |
|
75 |
||
76 |
branch |
|
77 |
||
78 |
^self workingCopy branch |
|
79 |
||
80 |
"Created: / 23-03-2009 / 17:16:14 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
81 |
! |
|
82 |
||
83 |
classes |
|
84 |
^ classes |
|
85 |
! |
|
86 |
||
87 |
classes:aCollection"<Collection[Class]>" |
|
88 |
||
89 |
self |
|
90 |
assert: (aCollection allSatisfy: [:e|e isBehavior]) |
|
91 |
message: 'All elements should be classes'. |
|
92 |
||
93 |
self |
|
94 |
assert: (aCollection allSatisfy: [:e|e package = package]) |
|
95 |
message: 'All classes should belongs to my package (' , package , ')'. |
|
96 |
||
97 |
classes := aCollection. |
|
98 |
||
99 |
"Modified: / 16-06-2009 / 20:56:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
100 |
! |
|
101 |
||
102 |
package |
|
103 |
^ package |
|
104 |
! |
|
105 |
||
106 |
package:aSymbol |
|
107 |
package := aSymbol. |
|
108 |
! |
|
109 |
||
110 |
repository |
|
111 |
||
112 |
^self workingCopy repository |
|
113 |
||
114 |
"Created: / 23-03-2009 / 11:24:36 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
115 |
! |
|
116 |
||
117 |
workingCopy |
|
118 |
||
119 |
workingCopy ifNil: |
|
120 |
[workingCopy := |
|
121 |
(SVN::RepositoryManager repositoryForPackage: self package) |
|
122 |
workingCopy]. |
|
123 |
^workingCopy |
|
124 |
||
125 |
"Created: / 23-03-2009 / 11:18:39 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
126 |
! |
|
127 |
||
128 |
workingCopy:aWorkingCopy |
|
129 |
workingCopy := aWorkingCopy. |
|
130 |
package := aWorkingCopy package |
|
131 |
||
132 |
"Modified: / 23-03-2009 / 11:44:49 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
133 |
! ! |
|
134 |
||
135 |
!Task methodsFor:'executing'! |
|
136 |
||
137 |
do |
|
138 |
" |
|
139 |
Perform whole task |
|
140 |
" |
|
141 |
||
142 |
^ self subclassResponsibility |
|
143 |
||
144 |
"Modified: / 23-03-2009 / 11:16:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
145 |
! ! |
|
146 |
||
147 |
!Task methodsFor:'executing - private'! |
|
148 |
||
149 |
do: aBlock |
|
150 |
||
151 |
^SVN::CompatModeQuery |
|
152 |
answer: false |
|
153 |
do: aBlock |
|
154 |
||
155 |
"Created: / 15-07-2009 / 20:07:14 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
156 |
! |
|
157 |
||
722 | 158 |
doCompileSvnRepositoryUrlStringMethod |
159 |
|pkgDef revNr| |
|
25 | 160 |
|
722 | 161 |
ActivityNotification notify:'Compiling #svnRepositoryUrlString method'. |
25 | 162 |
pkgDef := self workingCopy packageDefinition. |
722 | 163 |
(pkgDef theMetaclass includesSelector:#svnRepositoryUrlString) not |
164 |
ifTrue:[ |
|
165 |
pkgDef theMetaclass compile:(pkgDef svnRepositoryUrlString_code) |
|
166 |
classified:'description - svn'. |
|
167 |
(pkgDef theMetaclass compiledMethodAt:#svnRepositoryUrlString) |
|
168 |
setPackage:self package asSymbol |
|
169 |
]. |
|
170 |
||
171 |
"Created: / 08-04-2011 / 15:58:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
172 |
! |
|
173 |
||
174 |
doCompileSvnRevisionNrMethod:compileRevision |
|
175 |
|pkgDef revNr| |
|
25 | 176 |
|
722 | 177 |
ActivityNotification notify:'Compiling #svnRevisionNr method'. |
178 |
pkgDef := self workingCopy packageDefinition. |
|
179 |
revNr := compileRevision ifTrue:[ |
|
180 |
pkgDef svnRevision number |
|
181 |
] ifFalse:[ nil ]. |
|
182 |
(revNr notNil |
|
183 |
or:[ (pkgDef theMetaclass includesSelector:#svnRevisionNr) not ]) |
|
184 |
ifTrue:[ |
|
185 |
pkgDef theMetaclass compile:(pkgDef svnRevisionNr_code:revNr) |
|
186 |
classified:'description - svn'. |
|
187 |
(pkgDef theMetaclass compiledMethodAt:#svnRevisionNr) |
|
188 |
setPackage:self package asSymbol |
|
189 |
]. |
|
25 | 190 |
|
191 |
"Created: / 16-06-2009 / 12:16:25 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
192 |
! ! |
|
193 |
||
194 |
!Task methodsFor:'notification'! |
|
195 |
||
196 |
notify: aString |
|
197 |
||
198 |
self notify: aString progress: nil |
|
199 |
||
200 |
"Created: / 29-05-2009 / 16:51:13 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
201 |
! |
|
202 |
||
203 |
notify: aString progress: aNumberOrNil |
|
204 |
||
205 |
aNumberOrNil |
|
206 |
ifNil:[ActivityNotification notify: aString] |
|
207 |
ifNotNil:[ProgressNotification notify: aString progress: aNumberOrNil] |
|
208 |
||
209 |
"Created: / 29-05-2009 / 16:51:59 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
210 |
! ! |
|
211 |
||
212 |
!Task class methodsFor:'documentation'! |
|
213 |
||
214 |
version |
|
895
d715a4e5255f
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
722
diff
changeset
|
215 |
^ '$Header$' |
134 | 216 |
! |
217 |
||
218 |
version_SVN |
|
895
d715a4e5255f
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
722
diff
changeset
|
219 |
^ '§Id: SVN__Task.st 363 2011-08-08 13:49:48Z vranyj1 §' |
25 | 220 |
! ! |