--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SVN__CommitTask.st Wed Sep 23 18:47:31 2009 +0200
@@ -0,0 +1,114 @@
+"{ Package: 'cvut:stx/goodies/libsvn' }"
+
+"{ NameSpace: SVN }"
+
+FileoutLikeTask subclass:#CommitTask
+ instanceVariableNames:'extensionMethods message'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'SVN-Tasks'
+!
+
+!CommitTask class methodsFor:'documentation'!
+
+version_SVN
+ ^'$Id$'
+! !
+
+!CommitTask methodsFor:'accessing'!
+
+buildSupportFilesFor: pkgDef
+
+ | common |
+ common := #('abbrev.stc' 'Make.proto' 'Make.spec').
+ ^pkgDef isApplicationDefinition
+ ifTrue:[common]
+ ifFalse:[common copyWith: 'libInit.cc']
+
+ "
+ SVN::CommitTask basicNew buildSupportFilesFor: stx_goodies_libsvn
+ "
+
+ "Created: / 20-06-2009 / 12:03:51 / Jan Vrany <vranyj1@fel.cvut.cz>"
+!
+
+extensionMethods
+ ^ extensionMethods
+!
+
+extensionMethods:aCollection"of Methods"
+
+ extensionMethods := aCollection.
+
+ "Modified: / 14-05-2009 / 13:38:15 / Jan Vrany <vranyj1@fel.cvut.cz>"
+!
+
+message
+ ^ message
+!
+
+message:aString
+ message := aString.
+! !
+
+!CommitTask methodsFor:'executing'!
+
+do
+
+ self
+ doUpdateWorkingCopy;
+ doCommit
+
+ "Created: / 23-03-2009 / 11:15:37 / Jan Vrany <vranyj1@fel.cvut.cz>"
+ "Modified: / 17-06-2009 / 10:16:37 / Jan Vrany <vranyj1@fel.cvut.cz>"
+!
+
+doCommit
+ | containers commitInfo |
+
+ self do:
+ [ SVN::ActivityNotification notify: 'Commiting ' , self package.
+ containers := self isSelectiveFileoutTask
+ ifTrue: [ self containersToFileOut ]
+ ifFalse: [ #() ].
+ self synchronized:
+ [ commitInfo := (CommitCommand new)
+ workingCopy: self workingCopy;
+ message: message ? '<no message>';
+ paths: containers;
+ execute.
+ "Update the working copy. We need svn info
+ to report commited revision"
+ (UpdateCommand new)
+ workingCopy: self workingCopy;
+ execute ].
+ self doCompileSvnRevisionNrMethod: true.
+ SVN::ActivityNotification notify: 'Shrinking changes'.
+ (ChangeSet current)
+ condenseChangesForPackage2: self package;
+ condenseChangesForExtensionsInPackage: self package;
+ flushChangedClassesCache;
+ yourself. ].
+ self workingCopy commited.
+ ^ commitInfo
+
+ "Created: / 11-04-2008 / 09:20:01 / Jan Vrany <vranyj1@fel.cvut.cz>"
+ "Modified: / 19-08-2009 / 12:27:44 / Jan Vrany <vranyj1@fel.cvut.cz>"
+!
+
+doUpdateWorkingCopy
+
+ self do:[
+ self workingCopy ensureIsValid.
+ self doFileOutAll
+ ]
+
+ "Created: / 11-04-2008 / 09:19:27 / Jan Vrany <vranyj1@fel.cvut.cz>"
+ "Modified: / 17-08-2009 / 18:28:34 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!CommitTask class methodsFor:'documentation'!
+
+version
+ ^ '$Header$'
+! !