49
|
1 |
"{ Package: 'cvut:stx/goodies/libsvn' }"
|
|
2 |
|
|
3 |
"{ NameSpace: SVN }"
|
|
4 |
|
|
5 |
FileoutLikeTask subclass:#CommitTask
|
|
6 |
instanceVariableNames:'extensionMethods message'
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'SVN-Tasks'
|
|
10 |
!
|
|
11 |
|
|
12 |
!CommitTask class methodsFor:'documentation'!
|
|
13 |
|
|
14 |
version_SVN
|
|
15 |
^'$Id$'
|
|
16 |
! !
|
|
17 |
|
|
18 |
!CommitTask methodsFor:'accessing'!
|
|
19 |
|
|
20 |
buildSupportFilesFor: pkgDef
|
|
21 |
|
|
22 |
| common |
|
|
23 |
common := #('abbrev.stc' 'Make.proto' 'Make.spec').
|
|
24 |
^pkgDef isApplicationDefinition
|
|
25 |
ifTrue:[common]
|
|
26 |
ifFalse:[common copyWith: 'libInit.cc']
|
|
27 |
|
|
28 |
"
|
|
29 |
SVN::CommitTask basicNew buildSupportFilesFor: stx_goodies_libsvn
|
|
30 |
"
|
|
31 |
|
|
32 |
"Created: / 20-06-2009 / 12:03:51 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
33 |
!
|
|
34 |
|
|
35 |
extensionMethods
|
|
36 |
^ extensionMethods
|
|
37 |
!
|
|
38 |
|
|
39 |
extensionMethods:aCollection"of Methods"
|
|
40 |
|
|
41 |
extensionMethods := aCollection.
|
|
42 |
|
|
43 |
"Modified: / 14-05-2009 / 13:38:15 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
44 |
!
|
|
45 |
|
|
46 |
message
|
|
47 |
^ message
|
|
48 |
!
|
|
49 |
|
|
50 |
message:aString
|
|
51 |
message := aString.
|
|
52 |
! !
|
|
53 |
|
|
54 |
!CommitTask methodsFor:'executing'!
|
|
55 |
|
|
56 |
do
|
|
57 |
|
|
58 |
self
|
|
59 |
doUpdateWorkingCopy;
|
|
60 |
doCommit
|
|
61 |
|
|
62 |
"Created: / 23-03-2009 / 11:15:37 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
63 |
"Modified: / 17-06-2009 / 10:16:37 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
64 |
!
|
|
65 |
|
|
66 |
doCommit
|
|
67 |
| containers commitInfo |
|
|
68 |
|
|
69 |
self do:
|
|
70 |
[ SVN::ActivityNotification notify: 'Commiting ' , self package.
|
|
71 |
containers := self isSelectiveFileoutTask
|
|
72 |
ifTrue: [ self containersToFileOut ]
|
|
73 |
ifFalse: [ #() ].
|
|
74 |
self synchronized:
|
|
75 |
[ commitInfo := (CommitCommand new)
|
|
76 |
workingCopy: self workingCopy;
|
|
77 |
message: message ? '<no message>';
|
|
78 |
paths: containers;
|
|
79 |
execute.
|
|
80 |
"Update the working copy. We need svn info
|
|
81 |
to report commited revision"
|
|
82 |
(UpdateCommand new)
|
|
83 |
workingCopy: self workingCopy;
|
|
84 |
execute ].
|
|
85 |
self doCompileSvnRevisionNrMethod: true.
|
|
86 |
SVN::ActivityNotification notify: 'Shrinking changes'.
|
|
87 |
(ChangeSet current)
|
|
88 |
condenseChangesForPackage2: self package;
|
|
89 |
condenseChangesForExtensionsInPackage: self package;
|
|
90 |
flushChangedClassesCache;
|
|
91 |
yourself. ].
|
|
92 |
self workingCopy commited.
|
|
93 |
^ commitInfo
|
|
94 |
|
|
95 |
"Created: / 11-04-2008 / 09:20:01 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
96 |
"Modified: / 19-08-2009 / 12:27:44 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
97 |
!
|
|
98 |
|
|
99 |
doUpdateWorkingCopy
|
|
100 |
|
|
101 |
self do:[
|
|
102 |
self workingCopy ensureIsValid.
|
|
103 |
self doFileOutAll
|
|
104 |
]
|
|
105 |
|
|
106 |
"Created: / 11-04-2008 / 09:19:27 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
107 |
"Modified: / 17-08-2009 / 18:28:34 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
108 |
! !
|
|
109 |
|
|
110 |
!CommitTask class methodsFor:'documentation'!
|
|
111 |
|
|
112 |
version
|
|
113 |
^ '$Header$'
|
|
114 |
! !
|