--- a/SVN__UpdateTask.st Mon Aug 08 15:18:33 2011 +0200
+++ b/SVN__UpdateTask.st Mon Aug 08 15:19:52 2011 +0200
@@ -1,15 +1,75 @@
+"
+ Copyright (c) 2007-2010 Jan Vrany
+ Copyright (c) 2009-2010 eXept Software AG
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the 'Software'), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+"
"{ Package: 'stx:libsvn' }"
"{ NameSpace: SVN }"
-FileoutLikeTask subclass:#UpdateTask
- instanceVariableNames:'revision notifications updates conflicts resolution loadChangeSet
- mergeDiffSet updateChangeSet'
+UpdateLikeTask subclass:#UpdateTask
+ instanceVariableNames:'revision loadChangeSet mergeDiffSet updateChangeSet'
classVariableNames:''
poolDictionaries:''
category:'SVN-Tasks'
!
+!UpdateTask class methodsFor:'documentation'!
+
+copyright
+"
+ Copyright (c) 2007-2010 Jan Vrany
+ Copyright (c) 2009-2010 eXept Software AG
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the 'Software'), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+"
+! !
+
+!UpdateTask class methodsFor:'others'!
+
+version_CVS
+ ^ '$ÂHeader: /cvs/stx/stx/libsvn/SVN__UpdateTask.st,v 1.5 2009/10/19 12:22:32 fm Exp Â$'
+! !
!UpdateTask methodsFor:'accessing'!
@@ -28,88 +88,35 @@
!UpdateTask methodsFor:'executing'!
-do
- "
- Perform whole task"
-
- self assert: revision notNil message: 'No revision specified'.
- self doUpdateWorkingCopy doApplyMergedChangeSet
-
- "Modified: / 09-04-2009 / 09:40:28 / Jan Vrany <vranyj1@fel.cvut.cz>"
-!
+doApplyUpdates
-doApplyResolutions
- self do:
- [resolution isNilOrEmptyCollection ifFalse:
- [(Class updateChangeFileQuerySignal , Class updateChangeListQuerySignal)
- answer: false
- do:
- [resolution withIndexDo:
- [:change :index |
- change apply.
- SVN::ProgressNotification
- notify: 'Applying changes'
- progress: (100 / resolution size) * index ] ] ].
- self doCompileSvnRevisionNrMethod: true]
+ super doApplyUpdates.
+ self doCompileSvnRevisionNrMethod:true;
+ doCompileSvnRepositoryUrlStringMethod.
- "Created: / 23-03-2009 / 18:36:32 / Jan Vrany <vranyj1@fel.cvut.cz>"
- "Modified: / 17-08-2009 / 19:39:17 / Jan Vrany <vranyj1@fel.cvut.cz>"
-!
-
-doUpdateWorkingCopy
- self do:
- [ self workingCopy ensureIsValid.
- self
- doRevert;
- doFileOutAll;
- doUpdate;
- doLoadChanges ]
-
- "Created: / 23-03-2009 / 18:35:06 / Jan Vrany <vranyj1@fel.cvut.cz>"
- "Modified: / 17-08-2009 / 19:01:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
+ "Created: / 26-11-2009 / 14:50:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 08-04-2011 / 15:59:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!UpdateTask methodsFor:'executing - private'!
-doLoadChanges
- updates := ChangeSet new.
- conflicts := ChangeSet::DiffSet new.
- notifications do: [:each | self doLoadChangesFor: each ].
-
- "Modified: / 18-08-2009 / 08:59:11 / Jan Vrany <vranyj1@fel.cvut.cz>"
-!
+doUpdate
-doLoadChangesFor: aWCActionNotify
-
- "We should process only notifications for source
- and/or conflicted entries"
-
- (aWCActionNotify action isConflict or:
- [aWCActionNotify entry isSourceFileEntry])
- ifTrue:[aWCActionNotify processUsing: self]
+ | containers |
- "Created: / 18-08-2009 / 08:59:10 / Jan Vrany <vranyj1@fel.cvut.cz>"
- "Modified: / 27-08-2009 / 08:57:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
+ ActivityNotification notify:'Updating working copy'.
+ containers := self isSelectiveFileoutTask
+ ifTrue:[self containersToFileOut]
+ ifFalse:[ #() ].
-doRevert
- SVN::ActivityNotification notify: 'Reverting local changes'.
- (RevertCommand new)
- workingCopy: self workingCopy path;
- paths: (ProgrammingLanguage
- allCollect: [:lang | '*.' , lang sourceFileSuffix ]);
- execute.
-!
-
-doUpdate
- SVN::ActivityNotification
- notify: 'Updating working copy to revision ' , self revision printString.
notifications := (UpdateCommand new)
- workingCopy: self workingCopy;
- revision: self revision;
- execute
+ workingCopy:self workingCopy;
+ revision:self revision;
+ paths:containers;
+ execute
"Modified: / 19-08-2009 / 12:22:49 / Jan Vrany <vranyj1@fel.cvut.cz>"
+ "Modified: / 10-12-2009 / 12:31:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!UpdateTask methodsFor:'private'!
@@ -130,40 +137,18 @@
"Created: / 08-04-2009 / 09:53:49 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !
-!UpdateTask methodsFor:'processing - private'!
-
-processAddedEntry: entry
-
- entry sourceLanguage isSmalltalk
- ifTrue:
- [updates addAll:
- (ChangeSet fromStream: entry readStream) ]
- ifFalse:
- [self error:'Non smalltalk source not yet supported']
+!UpdateTask methodsFor:'testing'!
- "Created: / 27-08-2009 / 08:54:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 27-08-2009 / 10:37:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-processDeletedEntry: entry
-
- entry sourceLanguage isSmalltalk ifTrue:
- [entry path = 'extensions.st' ifTrue:[self halt"not yet finished"].
- self halt.]
-
- "Created: / 27-08-2009 / 09:56:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+isUpdateTask
+ ^ true
! !
!UpdateTask class methodsFor:'documentation'!
version
- ^ '$Header$'
-!
-
-version_CVS
- ^ '$Header$'
+ ^ '$Id$'
!
version_SVN
- ^'§Id: SVN__UpdateTask.st 113 2009-08-28 11:43:01Z vranyj1 §'
+ ^ '§Id: SVN__UpdateTask.st 350 2011-07-07 18:42:56Z vranyj1 §'
! !