SourceCodeManagerUtilitiesForContainerBasedManagers.st
changeset 4277 84fb9579f31d
parent 4271 e61ee4626475
child 4282 1f8310c7bb5d
equal deleted inserted replaced
4276:1725bf9d43b0 4277:84fb9579f31d
    37 ! !
    37 ! !
    38 
    38 
    39 !SourceCodeManagerUtilitiesForContainerBasedManagers methodsFor:'utilities-cvs'!
    39 !SourceCodeManagerUtilitiesForContainerBasedManagers methodsFor:'utilities-cvs'!
    40 
    40 
    41 checkinBuildSupportFilesForPackage:packageID withInfo:checkinInfo
    41 checkinBuildSupportFilesForPackage:packageID withInfo:checkinInfo
       
    42     ^ self checkinBuildSupportFilesForPackage:packageID withInfo:checkinInfo onBranch:nil
       
    43 
       
    44     "Created: / 09-08-2006 / 18:59:42 / fm"
       
    45     "Modified: / 12-10-2011 / 11:36:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    46     "Modified: / 05-12-2017 / 20:31:34 / cg"
       
    47 !
       
    48 
       
    49 checkinBuildSupportFilesForPackage:packageID withInfo:checkinInfo onBranch:branchNameOrNil
    42     |anyFailure module directory mgr defClass|
    50     |anyFailure module directory mgr defClass|
    43 
    51 
    44     mgr := self sourceCodeManagerFor: packageID. 
    52     mgr := self sourceCodeManagerFor: packageID. 
    45     defClass := ProjectDefinition definitionClassForPackage: packageID.
    53     defClass := ProjectDefinition definitionClassForPackage: packageID.
    46 
    54 
   144         self activityNotification:'Checkin of build-support files failed - see Transcript.'.
   152         self activityNotification:'Checkin of build-support files failed - see Transcript.'.
   145     ] ifFalse:[
   153     ] ifFalse:[
   146         self activityNotification:'Build-support files checked into the repository.'.
   154         self activityNotification:'Build-support files checked into the repository.'.
   147     ].
   155     ].
   148 
   156 
   149     "Created: / 09-08-2006 / 18:59:42 / fm"
   157     "Created: / 05-12-2017 / 20:31:18 / cg"
   150     "Modified: / 12-10-2011 / 11:36:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   151     "Modified: / 25-07-2012 / 14:27:30 / cg"
       
   152     "Modified (format): / 25-07-2012 / 22:25:48 / cg"
       
   153 !
   158 !
   154 
   159 
   155 checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil
   160 checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil
       
   161     "checkin a projects extensions into the source repository.
       
   162      If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
       
   163 
       
   164     ^ self checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil onBranch:nil
       
   165 
       
   166     "Modified: / 05-12-2017 / 20:13:21 / cg"
       
   167 !
       
   168 
       
   169 checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil onBranch:branchNameOrNil
   156     "checkin a projects extensions into the source repository.
   170     "checkin a projects extensions into the source repository.
   157      If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
   171      If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
   158 
   172 
   159     |logMessage checkinInfo mgr pri module directory containerFileName extensionsSource|
   173     |logMessage checkinInfo mgr pri module directory containerFileName extensionsSource|
   160 
   174 
   238                 mgr postCheckInExtensionsForPackage:aPackageID    
   252                 mgr postCheckInExtensionsForPackage:aPackageID    
   239             ].
   253             ].
   240         ].
   254         ].
   241     ^ true
   255     ^ true
   242 
   256 
   243     "Modified: / 25-07-2012 / 18:38:40 / cg"
   257     "Created: / 05-12-2017 / 20:12:50 / cg"
   244 !
   258 !
   245 
   259 
   246 checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages
   260 checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages onBranch:branchNameOrNil
   247     |mgr classesToCheckIn methodsToCheckIn methodsInPrjDef
   261     |mgr classesToCheckIn methodsToCheckIn methodsInPrjDef
   248      methodsInOtherPackages looseMethods otherPackages
   262      methodsInOtherPackages looseMethods otherPackages
   249      msg classesInChangeSet newClasses checkinInfo originalCheckinInfo classesToTag
   263      msg classesInChangeSet newClasses checkinInfo originalCheckinInfo classesToTag
   250      answer|
   264      answer|
   251 
   265 
   380             ].
   394             ].
   381 
   395 
   382             (self
   396             (self
   383                 checkinExtensionMethods:methodsToCheckIn
   397                 checkinExtensionMethods:methodsToCheckIn
   384                 forPackage:packageToCheckIn
   398                 forPackage:packageToCheckIn
   385                 withInfo:checkinInfo)
   399                 withInfo:checkinInfo
       
   400                 onBranch:branchNameOrNil)
   386             ifFalse:[
   401             ifFalse:[
   387                 Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn).
   402                 Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn).
   388                 ^ self.
   403                 ^ self.
   389             ]
   404             ]
   390         ] ifFalse:[
   405         ] ifFalse:[
   391             "/ there may have been extension-methods previously - if so, remove them
   406             "/ there may have been extension-methods previously - if so, remove them
   392             (mgr
   407             (mgr
   393                 checkForExistingContainer:'extensions.st' inPackage:packageToCheckIn)
   408                 checkForExistingContainer:'extensions.st' inPackage:packageToCheckIn)
   394             ifTrue:[
   409             ifTrue:[
   395 "/ self halt.
       
   396                 (self
   410                 (self
   397                     checkinExtensionMethods:#()
   411                     checkinExtensionMethods:#()
   398                     forPackage:packageToCheckIn
   412                     forPackage:packageToCheckIn
   399                     withInfo:'No extensions any more')
   413                     withInfo:'No extensions any more'
       
   414                     onBranch:branchNameOrNil)
   400                 ifFalse:[
   415                 ifFalse:[
   401                     Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn).
   416                     Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn).
   402                     ^ self.
   417                     ^ self.
   403                 ]
   418                 ]
   404             ]
   419             ]
   458             checkinInfo tag:nil.
   473             checkinInfo tag:nil.
   459         ].
   474         ].
   460         "/ not only the one's in the changeSet;
   475         "/ not only the one's in the changeSet;
   461         "/ also those which have not been checked in before.
   476         "/ also those which have not been checked in before.
   462         newClasses := classesToCheckIn select:[:class | (class revisionOfManager:mgr) isNil ].
   477         newClasses := classesToCheckIn select:[:class | (class revisionOfManager:mgr) isNil ].
   463         classesToCheckIn := Set new 
   478         classesToCheckIn := Set new. 
   464                                 addAll:classesInChangeSet; 
   479         classesToCheckIn addAll:classesInChangeSet; addAll:newClasses.
   465                                 addAll:newClasses; 
       
   466                                 yourself.
       
   467     ].
   480     ].
   468 
   481 
   469     "/ check if any of the classes contains methods for other packages ...
   482     "/ check if any of the classes contains methods for other packages ...
   470     classesToCheckIn do:[:eachClass |
   483     classesToCheckIn do:[:eachClass |
   471         eachClass instAndClassMethodsDo:[:eachMethod |
   484         eachClass instAndClassMethodsDo:[:eachMethod |
   544 
   557 
   545                 looseMethods do:[:mthd |
   558                 looseMethods do:[:mthd |
   546                     mthd package:packageToCheckIn
   559                     mthd package:packageToCheckIn
   547                 ].
   560                 ].
   548             ].
   561             ].
   549             self checkinClasses:classesToCheckIn withInfo:checkinInfo.
   562             self checkinClasses:classesToCheckIn withInfo:checkinInfo onBranch:branchNameOrNil.
   550         ].
   563         ].
   551 
   564 
   552         originalCheckinInfo notNil ifTrue:[
   565         originalCheckinInfo notNil ifTrue:[
   553             originalCheckinInfo isStable ifTrue:[
   566             originalCheckinInfo isStable ifTrue:[
   554                 classesToTag do:[:eachClass |
   567                 classesToTag do:[:eachClass |
   562             ].
   575             ].
   563         ].
   576         ].
   564     ].
   577     ].
   565 
   578 
   566     doBuild ifTrue:[
   579     doBuild ifTrue:[
   567         self checkinBuildSupportFilesForPackage:packageToCheckIn withInfo:(originalCheckinInfo ? checkinInfo).
   580         self checkinBuildSupportFilesForPackage:packageToCheckIn withInfo:(originalCheckinInfo ? checkinInfo) onBranch:branchNameOrNil.
   568     ].
   581     ].
   569 
   582 
   570     "Created: / 13-10-2011 / 11:15:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   583     "Created: / 05-12-2017 / 20:03:19 / cg"
   571     "Modified: / 04-12-2017 / 23:17:58 / cg"
       
   572 ! !
   584 ! !
   573 
   585 
   574 !SourceCodeManagerUtilitiesForContainerBasedManagers class methodsFor:'documentation'!
   586 !SourceCodeManagerUtilitiesForContainerBasedManagers class methodsFor:'documentation'!
   575 
   587 
   576 version
   588 version