common/extensions.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 05 Feb 2013 15:24:24 +0100
changeset 219 475366f8ba6f
parent 114 8b27cb46af9a
child 282 fb71143ed353
permissions -rw-r--r--
Bugfix: HGCommandParser>>parseCommandMerge: handle correctly clear merges.

"{ Package: 'stx:libscm/common' }"!

!ChangeSet methodsFor:'utilities'!

condenseChangesForPackageAfterCommit:aPackageSymbol
    "remove more changes for aPackageSymbol
     This is invoked when a project is checked into the repository."

    |changesToRemove|

    changesToRemove := self select:[:aChange |
        |removeThis mClass mthd|

        removeThis := false.
        (aChange isMethodChange or:[aChange isMethodRemoveChange]) ifTrue:[
            mClass := aChange changeClass.
            mClass notNil ifTrue:[
                mthd := mClass compiledMethodAt:(aChange selector).
                mthd isNil ifTrue:[
                    removeThis := (mClass package = aPackageSymbol)
                ] ifFalse:[
                    removeThis := (mthd package = aPackageSymbol)
                ]
            ].
        ] ifFalse:[
            (aChange isClassChange) ifTrue:[
                (aChange changeClass notNil) ifTrue:[
                    removeThis := (aChange changeClass package = aPackageSymbol)
                ].
            ].
        ].
        removeThis
    ].

    self condenseChanges:changesToRemove

    "Created: / 21-11-2012 / 01:45:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!stx_libscm_common class methodsFor:'documentation'!

extensionsVersion_HG

    ^ '$Changeset: <not expanded> $'
! !