author | fm |
Thu, 08 Oct 2009 14:04:29 +0200 | |
changeset 357 | 18ba210dfbf8 |
parent 134 | 379185993ee9 |
child 480 | d8216760f2c0 |
permissions | -rw-r--r-- |
25 | 1 |
"{ Package: 'cvut:stx/goodies/libsvn' }" |
2 |
||
3 |
"{ NameSpace: SVN }" |
|
4 |
||
5 |
Object subclass:#Task |
|
6 |
instanceVariableNames:'package classes workingCopy' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
9 |
category:'SVN-Tasks' |
|
10 |
! |
|
11 |
||
12 |
||
13 |
!Task methodsFor:'accessing'! |
|
14 |
||
15 |
branch |
|
16 |
||
17 |
^self workingCopy branch |
|
18 |
||
19 |
"Created: / 23-03-2009 / 17:16:14 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
20 |
! |
|
21 |
||
22 |
classes |
|
23 |
^ classes |
|
24 |
! |
|
25 |
||
26 |
classes:aCollection"<Collection[Class]>" |
|
27 |
||
28 |
self |
|
29 |
assert: (aCollection allSatisfy: [:e|e isBehavior]) |
|
30 |
message: 'All elements should be classes'. |
|
31 |
||
32 |
self |
|
33 |
assert: (aCollection allSatisfy: [:e|e package = package]) |
|
34 |
message: 'All classes should belongs to my package (' , package , ')'. |
|
35 |
||
36 |
classes := aCollection. |
|
37 |
||
38 |
"Modified: / 16-06-2009 / 20:56:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
39 |
! |
|
40 |
||
41 |
package |
|
42 |
^ package |
|
43 |
! |
|
44 |
||
45 |
package:aSymbol |
|
46 |
package := aSymbol. |
|
47 |
! |
|
48 |
||
49 |
repository |
|
50 |
||
51 |
^self workingCopy repository |
|
52 |
||
53 |
"Created: / 23-03-2009 / 11:24:36 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
54 |
! |
|
55 |
||
56 |
workingCopy |
|
57 |
||
58 |
workingCopy ifNil: |
|
59 |
[workingCopy := |
|
60 |
(SVN::RepositoryManager repositoryForPackage: self package) |
|
61 |
workingCopy]. |
|
62 |
^workingCopy |
|
63 |
||
64 |
"Created: / 23-03-2009 / 11:18:39 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
65 |
! |
|
66 |
||
67 |
workingCopy:aWorkingCopy |
|
68 |
workingCopy := aWorkingCopy. |
|
69 |
package := aWorkingCopy package |
|
70 |
||
71 |
"Modified: / 23-03-2009 / 11:44:49 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
72 |
! ! |
|
73 |
||
74 |
!Task methodsFor:'executing'! |
|
75 |
||
76 |
do |
|
77 |
" |
|
78 |
Perform whole task |
|
79 |
" |
|
80 |
||
81 |
^ self subclassResponsibility |
|
82 |
||
83 |
"Modified: / 23-03-2009 / 11:16:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
84 |
! ! |
|
85 |
||
86 |
!Task methodsFor:'executing - private'! |
|
87 |
||
88 |
do: aBlock |
|
89 |
||
90 |
^SVN::CompatModeQuery |
|
91 |
answer: false |
|
92 |
do: aBlock |
|
93 |
||
94 |
"Created: / 15-07-2009 / 20:07:14 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
95 |
! |
|
96 |
||
97 |
doCompileSvnRevisionNrMethod: compileRevision |
|
98 |
| pkgDef revNr | |
|
99 |
||
100 |
SVN::ActivityNotification notify:'Compiling #svnRevisionNr method'. |
|
101 |
pkgDef := self workingCopy packageDefinition. |
|
102 |
revNr := compileRevision |
|
103 |
ifTrue:[pkgDef svnRevision number] |
|
104 |
ifFalse:[nil]. |
|
105 |
||
106 |
(revNr notNil or:[(pkgDef theMetaclass includesSelector:#svnRevisionNr) not]) ifTrue: |
|
107 |
[pkgDef theMetaclass |
|
108 |
compile: (pkgDef svnRevisionNr_code: revNr) |
|
109 |
classified:'description - svn'. |
|
110 |
(pkgDef theMetaclass compiledMethodAt:#svnRevisionNr) |
|
111 |
setPackage:self package asSymbol]. |
|
112 |
||
113 |
"Created: / 16-06-2009 / 12:16:25 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
114 |
! ! |
|
115 |
||
116 |
!Task methodsFor:'notification'! |
|
117 |
||
118 |
notify: aString |
|
119 |
||
120 |
self notify: aString progress: nil |
|
121 |
||
122 |
"Created: / 29-05-2009 / 16:51:13 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
123 |
! |
|
124 |
||
125 |
notify: aString progress: aNumberOrNil |
|
126 |
||
127 |
aNumberOrNil |
|
128 |
ifNil:[ActivityNotification notify: aString] |
|
129 |
ifNotNil:[ProgressNotification notify: aString progress: aNumberOrNil] |
|
130 |
||
131 |
"Created: / 29-05-2009 / 16:51:59 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
132 |
! ! |
|
133 |
||
134 |
!Task class methodsFor:'documentation'! |
|
135 |
||
136 |
version |
|
137 |
^ '$Header$' |
|
134 | 138 |
! |
139 |
||
140 |
version_CVS |
|
141 |
^ '$Header$' |
|
142 |
! |
|
143 |
||
144 |
version_SVN |
|
357
18ba210dfbf8
update #version_SVN with § as keyword expansion character
fm
parents:
134
diff
changeset
|
145 |
^'§Id: SVN__Task.st 100 2009-07-15 18:35:02Z vranyj1 §' |
25 | 146 |
! ! |