PerforceSourceCodeManagerUtilities.st
changeset 14333 3391320df63d
parent 13926 70a1af3d7b8e
child 14665 9cc738d8e4e7
--- a/PerforceSourceCodeManagerUtilities.st	Thu May 08 15:59:19 2014 +0200
+++ b/PerforceSourceCodeManagerUtilities.st	Thu May 08 16:20:05 2014 +0200
@@ -153,8 +153,6 @@
     packageHolder := initialPackage asValue.
     fileNameHolder := initialFileName asValue.
 
-    resources := self classResources.
-
     "/
     "/ open a dialog for this
     "/
@@ -270,97 +268,96 @@
 
     |logMessage checkinInfo mgr pri doSubmit|
 
-    resources := self classResources.
     doSubmit := false.
 
     aClass isLoaded ifFalse:[
-	self information:(resources string:'Cannot checkin unloaded classes (%1)' with:aClass name).
-	^ false.
+        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
-	]
+        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.
-		checkinInfo notNil ifTrue:[
-		    doSubmit := checkinInfo submitHolder value.
-		].
-	    ]
-	) ifFalse:[^ false].
+        (self
+            getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil
+            forClass:aClass
+            valuesInto:[:logMessageRet :checkinInfoRet |
+                logMessage := logMessageRet.
+                checkinInfo := checkinInfoRet.
+                checkinInfo notNil ifTrue:[
+                    doSubmit := checkinInfo submitHolder value.
+                ].
+            ]
+        ) ifFalse:[^ false].
     ].
 
     (self classIsNotYetInRepository:aClass withManager:mgr) ifTrue:[
-	(self createSourceContainerForClass:aClass usingManager:mgr) ifFalse:[
+        (self createSourceContainerForClass:aClass usingManager:mgr) ifFalse:[
 "/            self warn:'did not create a container for ''' , aClass name , ''''.
-	    ^ false
-	].
-	^ true.
+            ^ 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|
-
-
-
-	aborted := false.
-	AbortOperationRequest handle:[:ex |
-	    aborted := true.
-	    ex return.
-	] do:[
-	    |checkinState cause|
-	    checkinState := false.
-	    cause := ''.
-	    [
-		checkinState := mgr checkinClass:aClass logMessage:logMessage submit:doSubmit
-	    ] 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.
-		^ 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 an additional tag for class that has been checked in"
-		    self tagClass:aClass as:(checkinInfo tag).
-		].
-	    ].
-	].
-	aborted ifTrue:[  |con|
-	    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.
-	].
+        |revision aborted|
+
+
+
+        aborted := false.
+        AbortOperationRequest handle:[:ex |
+            aborted := true.
+            ex return.
+        ] do:[
+            |checkinState cause|
+            checkinState := false.
+            cause := ''.
+            [
+                checkinState := mgr checkinClass:aClass logMessage:logMessage submit:doSubmit
+            ] 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.
+                ^ 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 an additional tag for class that has been checked in"
+                    self tagClass:aClass as:(checkinInfo tag).
+                ].
+            ].
+        ].
+        aborted ifTrue:[  |con|
+            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
 
@@ -379,7 +376,6 @@
 
     mgr isNil ifTrue:[^  false].
 
-    resources := self classResources.
     aClass isLoaded ifFalse:[
         self warn:(resources string:'Please load the %1-class first' with:aClass name).
         ^ false.
@@ -4125,10 +4121,10 @@
 !PerforceSourceCodeManagerUtilities class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/PerforceSourceCodeManagerUtilities.st,v 1.9 2014-02-12 15:42:54 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/PerforceSourceCodeManagerUtilities.st,v 1.10 2014-05-08 14:20:05 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/PerforceSourceCodeManagerUtilities.st,v 1.9 2014-02-12 15:42:54 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/PerforceSourceCodeManagerUtilities.st,v 1.10 2014-05-08 14:20:05 stefan Exp $'
 ! !