SourceCodeManagerUtilitiesForContainerBasedManagers.st
changeset 3603 ef654acb24f8
parent 3573 af8f051e0a8b
child 3651 d58c178282c0
--- a/SourceCodeManagerUtilitiesForContainerBasedManagers.st	Mon Jul 21 13:27:19 2014 +0200
+++ b/SourceCodeManagerUtilitiesForContainerBasedManagers.st	Mon Jul 21 13:27:25 2014 +0200
@@ -148,284 +148,6 @@
     "Modified (format): / 25-07-2012 / 22:25:48 / cg"
 !
 
-checkinClass:aClass
-    "check a class into the source repository.
-     Asks interactively for a log-message."
-
-    ^ self checkinClass:aClass withInfo:nil
-!
-
-checkinClass:aClass withInfo:aLogInfoOrNil
-    "check a class into the source repository.
-     If the argument, aLogInfoOrNil isNil, ask interactively for a log-message."
-
-    ^ self checkinClass:aClass withInfo:aLogInfoOrNil withCheck:true
-!
-
-checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass
-    "check a class into the source repository.
-     If the argument, aLogInfoOrNil isNil, ask interactively for log-message.
-     If doCheckClass is true, the class is checked for send of halts etc."
-
-    ^ self 
-        checkinClass:aClass 
-        withInfo:aLogInfoOrNil 
-        withCheck:doCheckClass 
-        usingManager:(self sourceCodeManagerFor:aClass)
-
-    "Modified: / 21-12-2011 / 18:19:55 / cg"
-!
-
-checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClassHolder usingManager:managerOrNil
-    "check a class into the source repository.
-     If the argument, aLogInfoOrNil isNil, ask interactively for log-message.
-     If doCheckClass is true, the class is checked for send of halts etc."
-
-    |logMessage checkinInfo mgr pri|
-
-    aClass isLoaded ifFalse:[
-        self information:(resources string:'Cannot checkin unloaded classes (%1)' with:aClass name).
-        ^ false.
-    ].
-
-    mgr := managerOrNil.
-    mgr isNil ifTrue:[
-        mgr := self sourceCodeManagerFor:aClass.
-        mgr isNil ifTrue:[
-            ^ false
-        ]
-    ].
-
-    self ensureCorrectVersionMethodsInClass:aClass usingManager:mgr.
-    mgr supportsCheckinLogMessages ifTrue:[
-        (self 
-            getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil 
-            forClass:aClass
-            valuesInto:[:logMessageRet :checkinInfoRet |
-                logMessage := logMessageRet.
-                checkinInfo := checkinInfoRet.
-            ]
-        ) ifFalse:[^ false].
-    ].
-
-    (self classIsNotYetInRepository:aClass withManager:mgr) ifTrue:[
-        (self createSourceContainerForClass:aClass usingManager:mgr) ifFalse:[
-"/            self warn:'did not create a container for ''' , aClass name , ''''.
-            ^ false
-        ].
-        ^ true.
-    ].
-
-    self activityNotification:(resources string:'checking in %1' with:aClass name).
-    pri := Processor activePriority.
-    Processor activeProcess withPriority:pri-1 to:pri
-    do:[
-        |revision aborted freshCreated|
-
-        freshCreated := false.
-        revision := aClass revision.
-        revision isNil ifTrue:[ 
-            mgr isContainerBased ifTrue:[
-                "/ mhmh - check if it has a container.
-                (mgr checkForExistingContainerForClass:aClass) ifFalse:[
-                    (self createSourceContainerForClass:aClass usingManager:mgr) ifFalse:[
-                        self warn:'Did not create/change repository container for ''' , aClass name allBold , ''''.
-                        ^ false.
-                    ].
-                    freshCreated := true.
-                ]
-            ]
-        ].
-
-        doCheckClassHolder value ifTrue:[
-            "/ check if the class contains halts, error-sends etc.
-            (self checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:doCheckClassHolder) ifFalse:[
-                ^ false
-            ].
-        ].
-
-        freshCreated ifFalse:[
-            aborted := false.
-            AbortOperationRequest handle:[:ex |
-                aborted := true.
-                ex return.
-            ] do:[
-                |checkinState cause|
-                checkinState := false.
-                cause := ''.
-                [
-                    checkinState := mgr checkinClass:aClass logMessage:logMessage
-                ] on:SourceCodeManagerError do:[:ex| 
-                    cause := ex description.
-                    "/ ex proceed.
-                ].
-
-                checkinState ifFalse:[
-                    Transcript showCR:'checkin of ''' , aClass name , ''' failed - ', cause.
-                    self warn:(resources stringWithCRs:'Checkin of "%1" failed\\' with:aClass name allBold),cause.
-                    AbortOperationRequest raise.
-                    "/ ^ false.
-                ].
-                checkinInfo notNil ifTrue:[
-                    checkinInfo isStable ifTrue:[
-                        "set stable tag for class that has been checked in"
-                        self tagClass:aClass as:#stable.
-                    ].
-                    checkinInfo tagIt ifTrue:[
-                        "set any additional tags for the class that has been checked in"
-                        (checkinInfo tag asCollectionOfSubstringsSeparatedByAny:',;') do:[:eachTag |
-                            self tagClass:aClass as:eachTag withoutSeparators.
-                        ].
-                    ].
-                    CVSSourceCodeManager recentTag:checkinInfo tag.
-                ].
-            ].
-            aborted ifTrue:[
-                Transcript showCR:'Checkin of ''' , aClass name , ''' aborted'.
-
-                AbortAllOperationWantedQuery query ifTrue:[
-                    (Dialog 
-                        confirm:(resources stringWithCRs:'Checkin of "%1" aborted.\\Cancel all ?' with:aClass name)
-                        default:false)
-                    ifTrue:[
-                        AbortAllOperationRequest raise.
-                    ]
-                ].
-                ^ false.
-            ].
-        ].
-    ].
-    ^ true
-
-    "Created: / 21-12-2011 / 18:19:14 / cg"
-!
-
-checkinClasses:aCollectionOfClass
-    "check a collection of classes into the source repository.
-     Asks interactively for log-message."
-
-    ^ self checkinClasses:aCollectionOfClass withInfo:nil
-!
-
-checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil
-    "check a bunch of classes into the source repository.
-     If the argument, aLogInfoOrNil isNil, ask interactively for log-message."
-
-    |checkClassWhenCheckingInHolder|
-
-    checkClassWhenCheckingInHolder := ValueHolder with:(UserPreferences current at:#checkClassesWhenCheckingIn ifAbsent:true).
-    checkClassWhenCheckingInHolder 
-        onChangeEvaluate:[ UserPreferences current at:#checkClassesWhenCheckingIn put:checkClassWhenCheckingInHolder value ].
-
-    ^ self
-        checkinClasses:aCollectionOfClasses 
-        withInfo:aLogInfoOrNil 
-        withCheck:checkClassWhenCheckingInHolder
-!
-
-checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder
-    "check a bunch of classes into the source repository.
-     If the argument, aLogInfoOrStringNil isNil, ask interactively for log-message."
-
-    self checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder usingManager:nil
-
-    "Modified: / 21-12-2011 / 18:24:47 / cg"
-!
-
-checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder usingManager:aManagerOrNil
-    "check a bunch of classes into the source repository.
-     If the argument, aLogInfoOrStringNil isNil, ask interactively for log-message."
-
-    |classes allClasses checkinInfoOrString yesOrNoToAll unchangedClasses|
-
-    "/ ignore private classes
-    classes := aCollectionOfClasses select:[:aClass | aClass owningClass isNil].
-    classes isEmpty ifTrue:[
-        self information:'Only private classes given - nothing checked in.'.
-        ^ self
-    ].
-    classes := classes select:[:aClass | aClass isLoaded].
-    classes isEmpty ifTrue:[
-        self information:'Only unloaded classes given - nothing checked in.'.
-        ^ self
-    ].
-
-    classes size == 1 ifTrue:[
-        ^ self checkinClass:classes first withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder usingManager:aManagerOrNil.
-    ].
-
-    "ask once, for all classes"
-    aLogInfoOrStringNil isNil ifTrue:[
-        checkinInfoOrString := self 
-                        getCheckinInfoFor:(resources string:'%1 classes to checkin' with:aCollectionOfClasses size)
-                        initialAnswer:nil
-                        withQuickOption:true.
-        checkinInfoOrString isNil ifTrue:[^ self].
-    ] ifFalse:[
-        checkinInfoOrString := aLogInfoOrStringNil.
-    ].
-
-    allClasses := classes.    
-    checkinInfoOrString quickCheckIn ifTrue:[
-        "/ not only the one's in the changeSet;
-        "/ also those which have not been checked in before.
-        classes := classes select:[:each | each hasUnsavedChanges or:[ (each revisionOfManager:aManagerOrNil) isNil ]].
-        classes isEmpty ifTrue:[ Dialog information:'no changes to checkin (quickCheckIn)' ]
-    ].
-
-    "abortAll is handled, and also asked for here!!"
-    AbortAllOperationRequest handleAndAnswerQueryIn:[
-        classes notEmpty ifTrue:[
-            self yesToAllNotification handle:[:ex |
-                yesOrNoToAll := ex parameter.
-                ex proceed
-            ] do:[
-                self yesToAllQuery handle:[:ex |
-                    ex proceedWith:yesOrNoToAll
-                ] do:[
-                    classes do:[:aClass |
-                        self activityNotification:(resources string:'checking in %1' with:aClass name).
-                        "/ ca does not want boxes to pop up all over ...
-                        UserInformation handle:[:ex |
-                            Transcript showCR:ex description.
-                            ex proceed.
-                        ] do:[
-                            AbortOperationRequest catch:[
-                                self 
-                                    checkinClass:aClass 
-                                    withInfo:checkinInfoOrString 
-                                    withCheck:doCheckClassesHolder
-                                    usingManager:aManagerOrNil
-                            ]
-                        ].
-                    ].
-                ]
-            ].
-        ].
-
-        (checkinInfoOrString isStable or:[checkinInfoOrString tagIt])
-        ifTrue:[
-            "/mhmh - but tag should be set on all (even unchanged ones)
-            "/ the other onces have already been tagged
-            unchangedClasses := allClasses reject:[:eachClass | (classes includes:eachClass)].
-
-            "mhmh - could still have to tag them"
-            checkinInfoOrString isStable ifTrue:[
-                unchangedClasses do:[:eachClass |
-                    self tagClass:eachClass as:#stable.
-                ].
-            ].
-            checkinInfoOrString tagIt ifTrue:[
-                unchangedClasses do:[:eachClass |
-                    self tagClass:eachClass as:(checkinInfoOrString tag).
-                ].
-            ].
-        ].
-    ].
-
-    "Created: / 21-12-2011 / 18:24:25 / cg"
-!
-
 checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil
     "checkin a projects extensions into the source repository.
      If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
@@ -847,10 +569,10 @@
 !SourceCodeManagerUtilitiesForContainerBasedManagers class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilitiesForContainerBasedManagers.st,v 1.21 2014-06-03 09:04:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilitiesForContainerBasedManagers.st,v 1.22 2014-07-21 11:27:25 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilitiesForContainerBasedManagers.st,v 1.21 2014-06-03 09:04:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilitiesForContainerBasedManagers.st,v 1.22 2014-07-21 11:27:25 cg Exp $'
 ! !