SVN__UpdateTask.st
author Claus Gittinger <cg@exept.de>
Fri, 18 Nov 2016 16:14:26 +0100
changeset 1180 92753f6cc822
parent 869 c701e19b75aa
permissions -rw-r--r--
#REFACTORING by cg class: SVNSourceCodeManager SVNVersionInfo is private

"
 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 }"

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$'
! !

!UpdateTask methodsFor:'accessing'!

revision
    ^ revision

    "Modified: / 09-04-2009 / 09:39:42 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

revision:aRevision
    revision := aRevision.
    loadChangeSet := mergeDiffSet := updateChangeSet := nil.

    "Modified: / 23-03-2009 / 18:40:00 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !

!UpdateTask methodsFor:'executing'!

doApplyUpdates

    super doApplyUpdates.
    self doCompileSvnRevisionNrMethod:true;
         doCompileSvnRepositoryUrlStringMethod.

    "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'!

doUpdate

    | containers |

    ActivityNotification notify:'Updating working copy'.
    containers := self isSelectiveFileoutTask 
                        ifTrue:[self containersToFileOut] 
                        ifFalse:[ #() ].

    notifications := (UpdateCommand new)
                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'!

filterChangeSet: aChangeSet 
    "
        Removes changes for methods that are not interesting
        (such as version methods & autogenerated package description
        methods)"
    
    | changesToRemove |

    changesToRemove := aChangeSet 
                select: [:change | change isForGeneratedSubject ].
    aChangeSet removeAll: changesToRemove.
    ^ aChangeSet

    "Created: / 08-04-2009 / 09:53:49 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !

!UpdateTask methodsFor:'testing'!

isUpdateTask
    ^ true
! !

!UpdateTask class methodsFor:'documentation'!

version
    ^ '$Header$'
!

version_SVN
    ^ '§Id: SVN__UpdateTask.st 363 2011-08-08 13:49:48Z vranyj1 §'
! !