SourceCodeManagerUtilitiesForContainerBasedManagers.st
author Claus Gittinger <cg@exept.de>
Thu, 05 Mar 2020 11:17:28 +0100
changeset 4561 eace75531554
parent 4536 04151e6d8f54
permissions -rw-r--r--
#UI_ENHANCEMENT by cg class: SourceCodeManagerUtilities changed: #compareClassWithRepository:askForRevision: typos: genitive of class is class's - not classes.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 2012 eXept Software AG
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
              All Rights Reserved
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libbasic3' }"
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
3772
399ff1b46d41 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3651
diff changeset
    14
"{ NameSpace: Smalltalk }"
399ff1b46d41 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3651
diff changeset
    15
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
SourceCodeManagerUtilities subclass:#SourceCodeManagerUtilitiesForContainerBasedManagers
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	instanceVariableNames:''
4202
0caab4226ccf #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4191
diff changeset
    18
	classVariableNames:''
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	poolDictionaries:''
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	category:'System-SourceCodeManagement'
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!SourceCodeManagerUtilitiesForContainerBasedManagers class methodsFor:'documentation'!
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
copyright
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
 COPYRIGHT (c) 2012 eXept Software AG
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
              All Rights Reserved
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 This software is furnished under a license and may be used
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 hereby transferred.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
"
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
! !
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
!SourceCodeManagerUtilitiesForContainerBasedManagers methodsFor:'utilities-cvs'!
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    41
checkinBuildSupportFilesForPackage:packageID winRCOnly:winRCOnly withInfo:checkinInfo onBranch:branchNameOrNil
4333
c6441a31864d #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4282
diff changeset
    42
    |anyFailure module directory mgr defClass checkedInFiles|
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    mgr := self sourceCodeManagerFor: packageID. 
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    defClass := ProjectDefinition definitionClassForPackage: packageID.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
3141
25cd1cd26450 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3133
diff changeset
    47
    "/ already done elsewhere now
25cd1cd26450 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3133
diff changeset
    48
    "/ defClass validateDescription.
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
    anyFailure := false.
4333
c6441a31864d #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4282
diff changeset
    51
    checkedInFiles := StringCollection new.
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
    module := packageID asPackageId module.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    directory := packageID asPackageId directory.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    56
    self activityNotification:(resources string:(winRCOnly ifTrue:['Checking in winRC files...'] ifFalse:['Checking in build-support files...'])).
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    (mgr checkForExistingModule:module directory:directory) ifFalse:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
        mgr createModule:module directory:directory
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
    ].
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    60
    defClass 
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    61
        forEachFileNameForWhich:[:fn | 
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    62
            winRCOnly not
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    63
            or:[ fn asFilename hasSuffix:'rc' ]
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    64
        ] 
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    65
        withGeneratedContentsDo:[:fileName :fileContents |
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    66
            |realFileName realDirectory|
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    68
            "/ care for subdirectories
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    69
            (fileName includes:$/) ifTrue:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    70
                realDirectory := (directory asFilename construct:(fileName asFilename directoryName)) name.
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    71
                realFileName := fileName asFilename baseName.
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    72
            ] ifFalse:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    73
                realDirectory := directory.
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    74
                realFileName := fileName.
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    75
            ].
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    76
            realDirectory := realDirectory replaceAll:$\ with:$/.
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    77
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    78
            self activityNotification:(resources string:'Checking in %1...' with:realFileName).
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    79
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    80
            UserInformation
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    81
                handle:[:ex | Transcript showCR:ex description ]
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    82
                do:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    83
                    (mgr isContainerBased
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    84
                     and:[(mgr checkForExistingContainer:realFileName inModule:module directory:realDirectory) not]
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    85
                    ) ifTrue:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    86
                        "/ a new file
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    87
                        realDirectory ~= directory ifTrue:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    88
                            (mgr checkForExistingModule:module directory:realDirectory) ifFalse:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    89
                                mgr createModule:module directory:realDirectory
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    90
                            ].
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    91
                        ].
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    92
                        [:exit |
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    93
                            |answer|
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    95
                            (mgr
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    96
                                createContainerForText:fileContents
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    97
                                inModule:module
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    98
                                package:realDirectory
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
    99
                                container:realFileName) ifTrue:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   100
                                    "success"
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   101
                                    checkedInFiles add:fileName.
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   102
                                    exit value:nil 
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   103
                            ].
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   104
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   105
                            answer := Dialog 
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   106
                                confirmWithRaiseAbortOnCancel:(resources
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   107
                                        stringWithCRs:'Cannot create new container: ''%3'' (in %1:%2).\\Retry?'
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   108
                                        with:module
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   109
                                        with:realDirectory
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   110
                                        with:realFileName).
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   112
                            answer == false ifTrue:[ exit value:nil ].
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   113
                        ] loopWithExit.
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   114
                    ] ifFalse:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   115
                        "/ an existing file
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   116
                        (mgr
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   117
                            checkin:realFileName
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   118
                            text:fileContents
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   119
                            directory:realDirectory
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   120
                            module:module
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   121
                            logMessage:checkinInfo logMessage
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   122
                            force:false
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   123
                            onBranch:branchNameOrNil
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   124
                        ) ifTrue:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   125
                            checkinInfo isStable ifTrue:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   126
                                self tagPath:(module, '/', realDirectory, '/', realFileName) as:#stable usingManager:mgr.
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   127
                            ].
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   128
                            checkinInfo tagIt ifTrue:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   129
                                self tagPath:(module, '/', realDirectory, '/', realFileName) as:checkinInfo tag usingManager:mgr.
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   130
                            ].
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   131
                            checkedInFiles add:fileName.
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   132
                        ] ifFalse:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   133
                            Transcript showCR:'checkin of %1 failed' with:realFileName.
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   134
                            anyFailure := true.
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
                        ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
                    ].
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   137
                ].
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   138
        ].
3573
af8f051e0a8b class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3537
diff changeset
   139
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   140
    winRCOnly ifFalse:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   141
        defClass instAndClassMethodsDo:[:m | m package:defClass package].
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   142
        [
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   143
            self
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   144
                checkinClasses:(Array with:defClass)
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   145
                withInfo:checkinInfo
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   146
                withCheck:false
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   147
                usingManager:nil
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   148
                confirmNewContainer:false.
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   149
        ] ifCurtailed:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   150
            self activityNotification:'Checkin of build-support files aborted - see Transcript'.
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   151
        ].
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
    ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
    anyFailure ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
        self warn:'Checkin failed - see Transcript.'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
        self activityNotification:'Checkin of build-support files failed - see Transcript.'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
    ] ifFalse:[
4333
c6441a31864d #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4282
diff changeset
   158
        checkedInFiles isEmpty ifTrue:[
c6441a31864d #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4282
diff changeset
   159
            self activityNotification:'No build-support files were checked in.'.
c6441a31864d #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4282
diff changeset
   160
        ] ifFalse:[
c6441a31864d #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4282
diff changeset
   161
            self activityNotification:('Build-support files checked into the repository: %1.' bindWith:(checkedInFiles asStringWith:', ')).
c6441a31864d #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4282
diff changeset
   162
        ].
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
    ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
4277
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   165
    "Created: / 05-12-2017 / 20:31:18 / cg"
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   166
    "Modified: / 05-12-2017 / 23:32:16 / cg"
4400
aeafd5d622d7 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4354
diff changeset
   167
    "Modified: / 15-02-2019 / 09:36:53 / Claus Gittinger"
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
!
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   170
checkinBuildSupportFilesForPackage:packageID withInfo:checkinInfo
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   171
    ^ self checkinBuildSupportFilesForPackage:packageID withInfo:checkinInfo onBranch:nil
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   172
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   173
    "Created: / 09-08-2006 / 18:59:42 / fm"
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   174
    "Modified: / 12-10-2011 / 11:36:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   175
    "Modified: / 05-12-2017 / 20:31:34 / cg"
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   176
!
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   177
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   178
checkinBuildSupportFilesForPackage:packageID withInfo:checkinInfo onBranch:branchNameOrNil
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   179
    ^ self
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   180
        checkinBuildSupportFilesForPackage:packageID winRCOnly:false
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   181
        withInfo:checkinInfo onBranch:branchNameOrNil
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   182
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   183
!
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   184
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
    "checkin a projects extensions into the source repository.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
     If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
4277
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   189
    ^ self checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil onBranch:nil
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   190
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   191
    "Modified: / 05-12-2017 / 20:13:21 / cg"
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   192
!
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   193
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   194
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil onBranch:branchNameOrNil
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   195
    "checkin a projects extensions into the source repository.
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   196
     If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   197
3133
14d574b2f82e extensions with utf8
Claus Gittinger <cg@exept.de>
parents: 2946
diff changeset
   198
    |logMessage checkinInfo mgr pri module directory containerFileName extensionsSource|
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
    "/ the following is wrong - must ask the projectDefinition !!
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
    aPackageID asPackageId projectDefinitionClass notNil ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
        mgr := self sourceCodeManagerFor:aPackageID asPackageId projectDefinitionClass.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
    ] ifFalse:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
        mgr := self sourceCodeManagerFor:aCollectionOfMethods first mclass.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
    ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
    mgr isNil ifTrue:[ ^ false ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
    module := aPackageID asPackageId module.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
    directory := aPackageID asPackageId directory.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
    containerFileName := self nameOfExtensionsContainer.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
    aLogInfoOrStringOrNil isNil ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
        checkinInfo := self getCheckinInfoFor:containerFileName allBold initialAnswer:nil.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
        checkinInfo isNil ifTrue:[^ false].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
        logMessage := checkinInfo logMessage.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
    ] ifFalse:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
        aLogInfoOrStringOrNil isString ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
            logMessage := aLogInfoOrStringOrNil
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
        ] ifFalse:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
            checkinInfo := aLogInfoOrStringOrNil.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
            logMessage := checkinInfo logMessage.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
        ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
    ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
    (mgr checkForExistingContainer:containerFileName inModule:module directory:directory) ifFalse:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
        (self checkForExistingModule:module usingManager:mgr allowCreate:true) ifFalse:[^ false].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
        LastModule := module.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
        (self checkForExistingModule:module directory:directory usingManager:mgr allowCreate:true) ifFalse:[^ false].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
        LastPackage := directory.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
        (self checkForExistingModule:module directory:directory container:containerFileName usingManager:mgr allowCreate:true) ifFalse:[^ false].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
    ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
    self activityNotification:(resources string:'Checking in %1' with:containerFileName).
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
    pri := Processor activePriority.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
    Processor activeProcess 
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
        withPriority:pri-1 to:pri
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
        do:[
3133
14d574b2f82e extensions with utf8
Claus Gittinger <cg@exept.de>
parents: 2946
diff changeset
   240
            extensionsSource := self sourceCodeForExtensions:aCollectionOfMethods package:aPackageID forManager:mgr.
14d574b2f82e extensions with utf8
Claus Gittinger <cg@exept.de>
parents: 2946
diff changeset
   241
            "Care for non-ASCII/non-ISO-8859 characters in extension methods"
14d574b2f82e extensions with utf8
Claus Gittinger <cg@exept.de>
parents: 2946
diff changeset
   242
            extensionsSource isWideString ifTrue:[
14d574b2f82e extensions with utf8
Claus Gittinger <cg@exept.de>
parents: 2946
diff changeset
   243
                extensionsSource := '"{ Encoding: utf8 }"' , Character cr asString , Character cr asString , extensionsSource.                
14d574b2f82e extensions with utf8
Claus Gittinger <cg@exept.de>
parents: 2946
diff changeset
   244
                extensionsSource := extensionsSource utf8Encoded.
14d574b2f82e extensions with utf8
Claus Gittinger <cg@exept.de>
parents: 2946
diff changeset
   245
            ].
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
            UserInformation handle:[:ex |
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
                Transcript showCR:ex description.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
                ex proceed.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
            ] do:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
                Transcript showCR:('checking in ',containerFileName,' ...').
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
                (mgr 
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
                    checkin:containerFileName
3133
14d574b2f82e extensions with utf8
Claus Gittinger <cg@exept.de>
parents: 2946
diff changeset
   254
                    text:extensionsSource
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
                    directory:directory 
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
                    module:module
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
                    logMessage:logMessage
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
                    force:false) 
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
                ifFalse:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
                    Transcript showCR:'Checkin of ''' , containerFileName , ''' failed'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
                    self warn:'Checkin of ''' , containerFileName allBold , ''' failed'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
                    ^ false.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
                ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
                checkinInfo notNil ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
                    |path|
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
                    path := (module, '/', directory, '/', containerFileName).
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
                    checkinInfo isStable ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   269
                        "set stable tag for class that has been checked in"
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
                        self tagPath:path as:#stable usingManager:mgr.    
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
                    ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
                    checkinInfo tagIt ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
                        "set an additional tag for class that has been checked in"
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
                        self tagPath:path as:(checkinInfo tag) usingManager:mgr.    
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
                    ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
                ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
                mgr postCheckInExtensionsForPackage:aPackageID    
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
            ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
        ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
    ^ true
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
4277
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   282
    "Created: / 05-12-2017 / 20:12:50 / cg"
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
!
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   285
checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuildSupportFiles winRCOnly:winRCOnly askForMethodsInOtherPackages:askForMethodsInOtherPackages onBranch:branchNameOrNil
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   286
    |mgr classesToCheckIn extensionMethodsToCheckIn methodsInPrjDef
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   287
     methodsInOtherPackages looseMethods otherPackages
3507
ef4dad1a2b32 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3400
diff changeset
   288
     msg classesInChangeSet newClasses checkinInfo originalCheckinInfo classesToTag
ef4dad1a2b32 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3400
diff changeset
   289
     answer|
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   290
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
    mgr := self sourceCodeManagerFor: packageToCheckIn.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   293
    classesToCheckIn := IdentitySet new.
3367
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   294
    classesInChangeSet := IdentitySet new.
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   295
    extensionMethodsToCheckIn := IdentitySet new.
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   296
    methodsInOtherPackages := IdentitySet new.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   297
    looseMethods := IdentitySet new.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
3164
e54571b3021f class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3145
diff changeset
   299
    "/ collect classes and individual methods...
3367
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   300
    (doClasses or:[doExtensions]) ifTrue:[
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   301
        Smalltalk allClassesDo:[:aClass | 
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   302
            |owner classPackage|
3141
25cd1cd26450 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3133
diff changeset
   303
3367
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   304
            (owner := aClass owningClass) notNil ifTrue:[
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   305
                classPackage := aClass topOwningClass package
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   306
            ] ifFalse:[
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   307
                classPackage := aClass package
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   308
            ].
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   309
            (classPackage = packageToCheckIn) ifTrue:[
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   310
                classesToCheckIn add:aClass.
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   311
            ].
3164
e54571b3021f class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3145
diff changeset
   312
3367
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   313
            doExtensions ifTrue:[
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   314
                aClass isMeta ifFalse:[
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   315
                    "/ ... whose class is not in the checkIn-set
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   316
                    (classesToCheckIn includes:aClass) ifFalse:[
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   317
                        aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   318
                            "/ methods in this project ...
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   319
                            (mthd package = packageToCheckIn) ifTrue:[
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   320
                                extensionMethodsToCheckIn add:mthd
3367
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   321
                            ]
3164
e54571b3021f class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3145
diff changeset
   322
                        ]
3367
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   323
                    ].
3164
e54571b3021f class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3145
diff changeset
   324
                ].
e54571b3021f class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3145
diff changeset
   325
            ].
e54571b3021f class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3145
diff changeset
   326
        ].
3367
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   327
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   328
        "/ cg: O(n^2) algorithm
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   329
        "/  classesInChangeSet := classesToCheckIn select:[:cls | cls hasUnsavedChanges].
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   330
        "/ replaced by: O(n) algorithm
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   331
        classesInChangeSet := ChangeSet current selectClassesForWhichIncludesChangeForClassOrMetaclassOrPrivateClassFrom:classesToCheckIn. 
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
    ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
    doExtensions ifTrue:[
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   335
        extensionMethodsToCheckIn notEmpty ifTrue:[
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
            doClasses ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
                msg := '%1 classes (%4 changed) '.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
            ] ifFalse:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
                msg := ''.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
            ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   341
            doExtensions ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
                doClasses ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
                    msg := msg , 'and '.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
                ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
                msg := msg , '%2 extensions '.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
            ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
            msg := msg , 'of project "%3"'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
            checkinInfo := self
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
                        getCheckinInfoFor:(msg
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
                                                    bindWith:classesToCheckIn size
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   352
                                                    with:extensionMethodsToCheckIn size
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
                                                    with:packageToCheckIn allBold
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
                                                    with:classesInChangeSet size)
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
                        initialAnswer:nil
3141
25cd1cd26450 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3133
diff changeset
   356
                        withQuickOption:(classesToCheckIn size > 0)
25cd1cd26450 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3133
diff changeset
   357
                        withValidateConsistencyOption:true.
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
            checkinInfo isNil ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
                ^ self.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
            ].
3145
e59d8d1ab71a class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
   361
e59d8d1ab71a class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
   362
            checkinInfo validateConsistency ifTrue:[
3772
399ff1b46d41 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3651
diff changeset
   363
                |setInProjectDef setForCheckin onlyInPrjDef onlyForCheckin moreInfo|
399ff1b46d41 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3651
diff changeset
   364
3145
e59d8d1ab71a class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
   365
                self validateConsistencyOfPackage:packageToCheckIn doClasses:doClasses doExtensions:doExtensions.
3196
d91dbd26f40c class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3172
diff changeset
   366
                "/ could have changed/recompiled methods...
d91dbd26f40c class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3172
diff changeset
   367
                "/ mhmh - should we checkin what is specified in the prj-def,
d91dbd26f40c class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3172
diff changeset
   368
                "/ or what is actually present in the image (in case user did not repair)???
4354
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   369
                packageToCheckIn asPackageId projectDefinitionClass notNil ifTrue:[
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   370
                    methodsInPrjDef  := packageToCheckIn asPackageId projectDefinitionClass extensionMethods.
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   371
                    methodsInPrjDef := methodsInPrjDef reject:[:m | m isNil].
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   372
                    (setInProjectDef := methodsInPrjDef asSet) ~= (setForCheckin := extensionMethodsToCheckIn asSet) ifTrue:[
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   373
                        onlyInPrjDef := setInProjectDef copy removeAllFoundIn:setForCheckin.
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   374
                        onlyForCheckin := setForCheckin copy removeAllFoundIn:setInProjectDef.
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   375
                        moreInfo := ''.
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   376
                        onlyInPrjDef notEmpty ifTrue:[
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   377
                            moreInfo := moreInfo , '\Only in Project: '.
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   378
                            moreInfo := moreInfo , (((onlyInPrjDef asOrderedCollection copyTo:(5 min:onlyInPrjDef size))
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   379
                                                    collect:#whoString) asStringWith:', ').
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   380
                            onlyInPrjDef size > 5 ifTrue:[ moreInfo := moreInfo , '...' ].
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   381
                        ].
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   382
                        onlyForCheckin notEmpty ifTrue:[
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   383
                            moreInfo := moreInfo , '\Only in Image: '.
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   384
                            moreInfo := moreInfo , (((onlyForCheckin asOrderedCollection copyTo:(5 min:onlyForCheckin size))
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   385
                                                    collect:#whoString) asStringWith:', ').
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   386
                            onlyForCheckin size > 5 ifTrue:[ moreInfo := moreInfo , '...' ].
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   387
                        ].
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   388
                        moreInfo notEmpty ifTrue:[ (moreInfo := moreInfo , '\') withCRs ].
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   389
    self halt.
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   390
                        answer:= Dialog 
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   391
                            confirmWithCancel:('The set of methods in image is different from what is specified in the project definition.\%1\You should probably make sure that all extension methods are all associated to the correct package.\\Check in image methods (%2) or definition methods (%3)?'
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   392
                                            bindWith: moreInfo
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   393
                                            with: extensionMethodsToCheckIn size
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   394
                                            with: methodsInPrjDef size) withCRs
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   395
                            labels:#('Image Methods' 'Definition Methods' 'Cancel') 
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   396
                            values:#(true false nil) 
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   397
                            default:nil.
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   398
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   399
    "/                    answer := Dialog 
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   400
    "/                        confirm:('Set of methods in image is different from what is specified in the project definition.\Check in image methods (%1) or definition methods (%2)?'
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   401
    "/                                        bindWith: extensionMethodsToCheckIn size
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   402
    "/                                        with: methodsInPrjDef size)
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   403
    "/                        yesLabel:'Image Methods' 
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   404
    "/                        noLabel:'Definition Methods'.
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   405
                        answer isNil ifTrue:[AbortOperationRequest raise].
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   406
                        answer ifFalse:[
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   407
                            extensionMethodsToCheckIn := methodsInPrjDef.
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   408
                        ].
3772
399ff1b46d41 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3651
diff changeset
   409
                    ].
4354
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   410
            
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   411
                    "/ also need the extensionVersion methods in the projectDefinition class,
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   412
                    "/ which are kept in the extensions container. (the reason is that we need the proper
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   413
                    "/ CVS id for the extensions container, not for the projDefinition container.
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   414
                    packageToCheckIn asPackageId projectDefinitionClass theMetaclass selectorsAndMethodsDo:[:sel :mthd |
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   415
                        (AbstractSourceCodeManager isExtensionsVersionMethodSelector:sel) ifTrue:[
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   416
                            extensionMethodsToCheckIn add:mthd
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   417
                        ].
3196
d91dbd26f40c class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3172
diff changeset
   418
                    ].
d91dbd26f40c class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3172
diff changeset
   419
                ].
3145
e59d8d1ab71a class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
   420
            ].
e59d8d1ab71a class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
   421
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
            (self
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   423
                checkinExtensionMethods:extensionMethodsToCheckIn
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
                forPackage:packageToCheckIn
4277
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   425
                withInfo:checkinInfo
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   426
                onBranch:branchNameOrNil)
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
            ifFalse:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
                Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn).
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
                ^ self.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
            ]
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   431
        ] ifFalse:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   432
            "/ there may have been extension-methods previously - if so, remove them
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   433
            (mgr
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   434
                checkForExistingContainer:'extensions.st' inPackage:packageToCheckIn)
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   435
            ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
                (self
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   437
                    checkinExtensionMethods:#()
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   438
                    forPackage:packageToCheckIn
4277
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   439
                    withInfo:'No extensions any more'
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   440
                    onBranch:branchNameOrNil)
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
                ifFalse:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   442
                    Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn).
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
                    ^ self.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
                ]
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
            ]
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   446
        ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
    ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
    checkinInfo isNil ifTrue:[
3367
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   450
        |infoString|
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   451
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   452
        doExtensions ifTrue:[
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   453
            extensionMethodsToCheckIn size == 0 ifTrue:[
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   454
                infoString := '"%3": %1 classes (%4 changed)'.
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   455
            ] ifFalse:[    
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   456
                infoString := '"%3": %1 classes (%4 changed), %2 extensions'.
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   457
            ].
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   458
        ] ifFalse:[ doClasses ifTrue:[
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   459
            infoString := '"%3": %1 classes (%4 changed)'.
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   460
        ] ifFalse:[ doBuildSupportFiles ifTrue:[
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   461
            infoString := '"%3": build support files'.
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   462
        ] ifFalse:[ winRCOnly ifTrue:[
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   463
            infoString := 'winRC file(s) regenerated'.
3367
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   464
        ] ifFalse:[
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   465
            infoString := 'I don''t know what I am doing'.
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   466
        ]]]].
3367
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   467
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   468
        infoString := infoString
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   469
                        bindWith:classesToCheckIn size
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   470
                        with:extensionMethodsToCheckIn size
3367
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   471
                        with:packageToCheckIn allBold
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   472
                        with:classesInChangeSet size.
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   473
    
4271
e61ee4626475 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4244
diff changeset
   474
        mgr notNil ifTrue:[
e61ee4626475 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4244
diff changeset
   475
            mgr isCVS ifTrue:[
e61ee4626475 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4244
diff changeset
   476
                |repos|
e61ee4626475 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4244
diff changeset
   477
                
e61ee4626475 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4244
diff changeset
   478
                repos := mgr repositoryForPackage:packageToCheckIn.
e61ee4626475 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4244
diff changeset
   479
                repos notNil ifTrue:[
e61ee4626475 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4244
diff changeset
   480
                    infoString := infoString,Character cr,('CVS Repository: "%1"' bindWith:repos)
e61ee4626475 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4244
diff changeset
   481
                ].    
e61ee4626475 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4244
diff changeset
   482
            ].    
e61ee4626475 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4244
diff changeset
   483
        ].
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   484
        branchNameOrNil notNil ifTrue:[
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   485
            infoString := infoString,Character cr,('Branch: "%1"' bindWith:branchNameOrNil)
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   486
        ].    
4271
e61ee4626475 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4244
diff changeset
   487
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   488
        checkinInfo := self
3367
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   489
                    getCheckinInfoFor:infoString
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   490
                    initialAnswer:nil
3141
25cd1cd26450 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3133
diff changeset
   491
                    withQuickOption:(classesToCheckIn size > 0)
25cd1cd26450 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3133
diff changeset
   492
                    withValidateConsistencyOption:true.
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   493
        checkinInfo isNil ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   494
            ^ self.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   495
        ].
3145
e59d8d1ab71a class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
   496
        checkinInfo validateConsistency ifTrue:[
e59d8d1ab71a class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
   497
            self validateConsistencyOfPackage:packageToCheckIn doClasses:doClasses doExtensions:doExtensions.
e59d8d1ab71a class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3141
diff changeset
   498
        ].
3141
25cd1cd26450 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3133
diff changeset
   499
    ].
25cd1cd26450 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3133
diff changeset
   500
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
    checkinInfo quickCheckIn ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   502
        (checkinInfo isStable or:[checkinInfo tagIt]) ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   503
            classesToTag := classesToCheckIn.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   504
            originalCheckinInfo := checkinInfo.
3367
dc9d785a4ca7 Open a checkin info dialog for build support files checkin
Stefan Vogel <sv@exept.de>
parents: 3362
diff changeset
   505
            checkinInfo := checkinInfo deepCopy.
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   506
            checkinInfo isStable:false.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   507
            checkinInfo tag:nil.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   508
        ].
3164
e54571b3021f class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3145
diff changeset
   509
        "/ not only the one's in the changeSet;
e54571b3021f class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3145
diff changeset
   510
        "/ also those which have not been checked in before.
e54571b3021f class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3145
diff changeset
   511
        newClasses := classesToCheckIn select:[:class | (class revisionOfManager:mgr) isNil ].
4277
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   512
        classesToCheckIn := Set new. 
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   513
        classesToCheckIn addAll:classesInChangeSet; addAll:newClasses.
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   514
    ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   515
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   516
    "/ check if any of the classes contains methods for other packages ...
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   517
    classesToCheckIn do:[:eachClass |
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   518
        eachClass instAndClassMethodsDo:[:eachMethod |
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   519
            |mPgk|
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   520
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   521
            mPgk := eachMethod package.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   522
            (mPgk = packageToCheckIn) ifFalse:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   523
                mPgk == PackageId noProjectID ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   524
                    looseMethods add:eachMethod
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   525
                ] ifFalse:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
                    methodsInOtherPackages add:eachMethod
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   527
                ]
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
            ]
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   529
        ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
    ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
    askForMethodsInOtherPackages ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
        methodsInOtherPackages notEmpty ifTrue:[
4004
ec719e16ce4a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3991
diff changeset
   534
            |package2|
ec719e16ce4a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3991
diff changeset
   535
            
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   536
            otherPackages := Set new.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   537
            methodsInOtherPackages do:[:eachMethod | otherPackages add:eachMethod package].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
            methodsInOtherPackages size == 1 ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
                msg := 'The ''%4'' method in ''%5'' is contained in the ''%2'' package.'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
                msg := msg , '\\This method will remain in its package.'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
            ] ifFalse:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
                otherPackages size == 1 ifTrue:[
3651
d58c178282c0 class: SourceCodeManagerUtilitiesForContainerBasedManagers
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
   544
                    msg := 'The %1 methods from the %2 package will remain in their package.'
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   545
                ] ifFalse:[
4004
ec719e16ce4a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3991
diff changeset
   546
                    package2 := otherPackages second allBold.
ec719e16ce4a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3991
diff changeset
   547
                    otherPackages size == 2 ifTrue:[
ec719e16ce4a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3991
diff changeset
   548
                        msg := 'The %1 methods from %3 other packages (%2, %6) will remain in their packages.'.
ec719e16ce4a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3991
diff changeset
   549
                    ] ifFalse:[
ec719e16ce4a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3991
diff changeset
   550
                        msg := 'The %1 methods from %3 other packages (%2, %6...) will remain in their packages.'.
ec719e16ce4a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3991
diff changeset
   551
                    ].
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   552
                ].
4004
ec719e16ce4a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3991
diff changeset
   553
                msg := msg , '\\Hint: if these are meant to belong to the %7 package,'.
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   554
                msg := msg , '\move them first, then repeat the checkin operation.'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
            ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
            msg := msg withCRs.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   557
            msg := msg bindWith:methodsInOtherPackages size
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
                           with:otherPackages first allBold
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
                           with:otherPackages size
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   560
                           with:methodsInOtherPackages first selector allBold
4004
ec719e16ce4a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3991
diff changeset
   561
                           with:methodsInOtherPackages first mclass name allBold
ec719e16ce4a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3991
diff changeset
   562
                           with:package2
ec719e16ce4a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3991
diff changeset
   563
                           with:packageToCheckIn.
4244
72e7f53c82ca #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4202
diff changeset
   564
            (Dialog confirm:msg yesLabel:'OK' noLabel:(resources string:'Cancel')) ifFalse:[^ self].
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
        ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
    ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   567
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   568
    doClasses ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   569
        classesToCheckIn notEmpty ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   570
            looseMethods notEmpty ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   571
                looseMethods size == 1 ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   572
                    msg := 'The ''%2'' method in ''%3'' is unassigned (loose).'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   573
                    msg := msg , '\\If you proceed, this method will be moved to the ''%4'' package'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   574
                    msg := msg , '\\Hint: if this is meant to be an extension of another package,'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   575
                    msg := msg , '\cancel and move it to the appropriate package first.'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   576
                ] ifFalse:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   577
                    msg := 'There are %1 unassigned (loose) methods in classes from this project.'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   578
                    msg := msg , '\\If you proceed, those will be moved to the ''%4'' package ?'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   579
                    msg := msg , '\\Hint: if these are meant to be extensions of another package,'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   580
                    msg := msg , '\cancel and move them to the appropriate package first.'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   581
                ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   582
                doClasses ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   583
                    msg := msg , '\\If you answer with "No" here, you will be asked for each class individually.'.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   584
                ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   585
                msg := msg withCRs.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   586
                msg := msg bindWith:looseMethods size
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   587
                               with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first selector allBold])
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   588
                               with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first mclass name allBold])
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   589
                               with:packageToCheckIn allBold.
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   590
                (Dialog confirm:msg noLabel:(resources string:'Cancel')) ifFalse:[^ self].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   591
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   592
                looseMethods do:[:mthd |
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   593
                    mthd package:packageToCheckIn
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   594
                ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   595
            ].
4277
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   596
            self checkinClasses:classesToCheckIn withInfo:checkinInfo onBranch:branchNameOrNil.
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   597
        ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   598
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   599
        originalCheckinInfo notNil ifTrue:[
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   600
            originalCheckinInfo isStable ifTrue:[
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   601
                self tagClasses:classesToTag as:#stable.
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   602
"/                classesToTag do:[:eachClass |
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   603
"/                    self tagClass:eachClass as:#stable
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   604
"/                ].
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   605
            ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   606
            originalCheckinInfo tagIt ifTrue:[
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   607
                self tagClasses:classesToTag as:(originalCheckinInfo tag).
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   608
"/                classesToTag do:[:eachClass |
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   609
"/                    self tagClass:eachClass as:(originalCheckinInfo tag)
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   610
"/                ].
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   611
            ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   612
        ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   613
    ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   614
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   615
    doBuildSupportFiles ifTrue:[
4536
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   616
        self 
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   617
            checkinBuildSupportFilesForPackage:packageToCheckIn winRCOnly:winRCOnly 
04151e6d8f54 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
   618
            withInfo:(originalCheckinInfo ? checkinInfo) onBranch:branchNameOrNil.
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   619
    ].
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   620
4277
84fb9579f31d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4271
diff changeset
   621
    "Created: / 05-12-2017 / 20:03:19 / cg"
4282
1f8310c7bb5d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   622
    "Modified: / 05-12-2017 / 23:15:52 / cg"
4354
f27b60626e89 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4333
diff changeset
   623
    "Modified: / 23-09-2018 / 04:18:14 / Claus Gittinger"
4516
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   624
!
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   625
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   626
tagExtensionsFromPackage:aPackageID with:tag
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   627
    "checkin a projects extensions into the source repository.
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   628
     If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   629
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   630
    |logMessage checkinInfo mgr pri module directory containerFileName extensionsSource path|
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   631
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   632
    mgr := self sourceCodeManagerFor:aPackageID asPackageId projectDefinitionClass.
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   633
    mgr isNil ifTrue:[ ^ false ].
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   634
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   635
    module := aPackageID asPackageId module.
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   636
    directory := aPackageID asPackageId directory.
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   637
    containerFileName := self nameOfExtensionsContainer.
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   638
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   639
    (mgr checkForExistingContainer:containerFileName inModule:module directory:directory) ifFalse:[
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   640
        (self checkForExistingModule:module usingManager:mgr allowCreate:true) ifFalse:[^ false].
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   641
        LastModule := module.
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   642
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   643
        (self checkForExistingModule:module directory:directory usingManager:mgr allowCreate:true) ifFalse:[^ false].
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   644
        LastPackage := directory.
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   645
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   646
        (self checkForExistingModule:module directory:directory container:containerFileName usingManager:mgr allowCreate:true) ifFalse:[^ false].
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   647
    ].
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   648
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   649
    self activityNotification:(resources string:'Tagging %1' with:containerFileName).
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   650
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   651
    path := (module, '/', directory, '/', containerFileName).
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   652
    self tagPath:path as:tag usingManager:mgr.    
f5c862a086b3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4400
diff changeset
   653
    ^ true
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   654
! !
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   655
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   656
!SourceCodeManagerUtilitiesForContainerBasedManagers class methodsFor:'documentation'!
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   657
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   658
version
3905
Claus Gittinger <cg@exept.de>
parents: 3830
diff changeset
   659
    ^ '$Header$'
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   660
!
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   661
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   662
version_CVS
3905
Claus Gittinger <cg@exept.de>
parents: 3830
diff changeset
   663
    ^ '$Header$'
2848
f182780810d6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   664
! !
3133
14d574b2f82e extensions with utf8
Claus Gittinger <cg@exept.de>
parents: 2946
diff changeset
   665