# HG changeset patch # User fm # Date 1253724303 -7200 # Node ID 7a99fc6767ef71f10e696b33004cdd5c1b16c91b # Parent 320bde8049c479bf178af9655aae3562a4fd268e initial checkin diff -r 320bde8049c4 -r 7a99fc6767ef SVN__Task.st --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SVN__Task.st Wed Sep 23 18:45:03 2009 +0200 @@ -0,0 +1,143 @@ +"{ Package: 'cvut:stx/goodies/libsvn' }" + +"{ NameSpace: SVN }" + +Object subclass:#Task + instanceVariableNames:'package classes workingCopy' + classVariableNames:'' + poolDictionaries:'' + category:'SVN-Tasks' +! + +!Task class methodsFor:'documentation'! + +version_SVN + ^'$Id$' +! ! + +!Task methodsFor:'accessing'! + +branch + + ^self workingCopy branch + + "Created: / 23-03-2009 / 17:16:14 / Jan Vrany " +! + +classes + ^ classes +! + +classes:aCollection"" + + self + assert: (aCollection allSatisfy: [:e|e isBehavior]) + message: 'All elements should be classes'. + + self + assert: (aCollection allSatisfy: [:e|e package = package]) + message: 'All classes should belongs to my package (' , package , ')'. + + classes := aCollection. + + "Modified: / 16-06-2009 / 20:56:53 / Jan Vrany " +! + +package + ^ package +! + +package:aSymbol + package := aSymbol. +! + +repository + + ^self workingCopy repository + + "Created: / 23-03-2009 / 11:24:36 / Jan Vrany " +! + +workingCopy + + workingCopy ifNil: + [workingCopy := + (SVN::RepositoryManager repositoryForPackage: self package) + workingCopy]. + ^workingCopy + + "Created: / 23-03-2009 / 11:18:39 / Jan Vrany " +! + +workingCopy:aWorkingCopy + workingCopy := aWorkingCopy. + package := aWorkingCopy package + + "Modified: / 23-03-2009 / 11:44:49 / Jan Vrany " +! ! + +!Task methodsFor:'executing'! + +do + " + Perform whole task + " + + ^ self subclassResponsibility + + "Modified: / 23-03-2009 / 11:16:11 / Jan Vrany " +! ! + +!Task methodsFor:'executing - private'! + +do: aBlock + + ^SVN::CompatModeQuery + answer: false + do: aBlock + + "Created: / 15-07-2009 / 20:07:14 / Jan Vrany " +! + +doCompileSvnRevisionNrMethod: compileRevision + | pkgDef revNr | + + SVN::ActivityNotification notify:'Compiling #svnRevisionNr method'. + pkgDef := self workingCopy packageDefinition. + revNr := compileRevision + ifTrue:[pkgDef svnRevision number] + ifFalse:[nil]. + + (revNr notNil or:[(pkgDef theMetaclass includesSelector:#svnRevisionNr) not]) ifTrue: + [pkgDef theMetaclass + compile: (pkgDef svnRevisionNr_code: revNr) + classified:'description - svn'. + (pkgDef theMetaclass compiledMethodAt:#svnRevisionNr) + setPackage:self package asSymbol]. + + "Created: / 16-06-2009 / 12:16:25 / Jan Vrany " +! ! + +!Task methodsFor:'notification'! + +notify: aString + + self notify: aString progress: nil + + "Created: / 29-05-2009 / 16:51:13 / Jan Vrany " +! + +notify: aString progress: aNumberOrNil + + aNumberOrNil + ifNil:[ActivityNotification notify: aString] + ifNotNil:[ProgressNotification notify: aString progress: aNumberOrNil] + + "Created: / 29-05-2009 / 16:51:59 / Jan Vrany " +! ! + +!Task class methodsFor:'documentation'! + +version + ^ '$Header$' +! !