*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Tue, 22 Aug 2000 21:57:35 +0200
changeset 957 54dade11e57f
parent 956 0c6c209df4e9
child 958 6bc25cd82843
*** empty log message ***
ClassCommentChange.st
ClassDefinitionChange.st
ClassInstVarDefinitionChange.st
ClassPrimitiveChange.st
ClassPrimitiveDefinitionsChange.st
ClassPrimitiveFunctionsChange.st
ClassPrimitiveVariablesChange.st
DoItChange.st
HistoryManager.st
MessageTally.st
MessageTracer.st
MethodCategoryChange.st
MethodPrivacyChange.st
MethodRemoveChange.st
ProfileTree.st
SourceCodeManagerUtilities.st
--- a/ClassCommentChange.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/ClassCommentChange.st	Tue Aug 22 21:57:35 2000 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libbasic3' }"
+
 ClassChange subclass:#ClassCommentChange
 	instanceVariableNames:'comment'
 	classVariableNames:''
@@ -120,5 +122,5 @@
 !ClassCommentChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ClassCommentChange.st,v 1.23 2000-02-03 18:32:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ClassCommentChange.st,v 1.24 2000-08-22 19:57:27 cg Exp $'
 ! !
--- a/ClassDefinitionChange.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/ClassDefinitionChange.st	Tue Aug 22 21:57:35 2000 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libbasic3' }"
+
 ClassChange subclass:#ClassDefinitionChange
 	instanceVariableNames:'definition objectType nameSpaceName classType otherParameters'
 	classVariableNames:''
@@ -106,5 +108,5 @@
 !ClassDefinitionChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.20 2000-03-21 12:44:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.21 2000-08-22 19:57:17 cg Exp $'
 ! !
--- a/ClassInstVarDefinitionChange.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/ClassInstVarDefinitionChange.st	Tue Aug 22 21:57:35 2000 +0200
@@ -11,6 +11,8 @@
 "
 
 
+"{ Package: 'stx:libbasic3' }"
+
 ClassChange subclass:#ClassInstVarDefinitionChange
 	instanceVariableNames:''
 	classVariableNames:''
@@ -76,5 +78,5 @@
 !ClassInstVarDefinitionChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ClassInstVarDefinitionChange.st,v 1.3 2000-02-01 20:14:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ClassInstVarDefinitionChange.st,v 1.4 2000-08-22 19:57:12 cg Exp $'
 ! !
--- a/ClassPrimitiveChange.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/ClassPrimitiveChange.st	Tue Aug 22 21:57:35 2000 +0200
@@ -11,6 +11,8 @@
 "
 
 
+"{ Package: 'stx:libbasic3' }"
+
 ClassChange subclass:#ClassPrimitiveChange
 	instanceVariableNames:''
 	classVariableNames:''
@@ -64,5 +66,5 @@
 !ClassPrimitiveChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ClassPrimitiveChange.st,v 1.2 1999-07-12 12:06:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ClassPrimitiveChange.st,v 1.3 2000-08-22 19:57:19 cg Exp $'
 ! !
--- a/ClassPrimitiveDefinitionsChange.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/ClassPrimitiveDefinitionsChange.st	Tue Aug 22 21:57:35 2000 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libbasic3' }"
+
 ClassPrimitiveChange subclass:#ClassPrimitiveDefinitionsChange
 	instanceVariableNames:''
 	classVariableNames:''
@@ -76,5 +78,5 @@
 !ClassPrimitiveDefinitionsChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ClassPrimitiveDefinitionsChange.st,v 1.7 1999-07-15 19:46:42 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ClassPrimitiveDefinitionsChange.st,v 1.8 2000-08-22 19:57:32 cg Exp $'
 ! !
--- a/ClassPrimitiveFunctionsChange.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/ClassPrimitiveFunctionsChange.st	Tue Aug 22 21:57:35 2000 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libbasic3' }"
+
 ClassPrimitiveChange subclass:#ClassPrimitiveFunctionsChange
 	instanceVariableNames:''
 	classVariableNames:''
@@ -76,5 +78,5 @@
 !ClassPrimitiveFunctionsChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ClassPrimitiveFunctionsChange.st,v 1.7 1999-07-15 19:46:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ClassPrimitiveFunctionsChange.st,v 1.8 2000-08-22 19:57:23 cg Exp $'
 ! !
--- a/ClassPrimitiveVariablesChange.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/ClassPrimitiveVariablesChange.st	Tue Aug 22 21:57:35 2000 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libbasic3' }"
+
 ClassPrimitiveChange subclass:#ClassPrimitiveVariablesChange
 	instanceVariableNames:''
 	classVariableNames:''
@@ -76,5 +78,5 @@
 !ClassPrimitiveVariablesChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ClassPrimitiveVariablesChange.st,v 1.7 1999-07-15 19:46:23 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ClassPrimitiveVariablesChange.st,v 1.8 2000-08-22 19:57:14 cg Exp $'
 ! !
--- a/DoItChange.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/DoItChange.st	Tue Aug 22 21:57:35 2000 +0200
@@ -11,6 +11,8 @@
 "
 
 
+"{ Package: 'stx:libbasic3' }"
+
 Change subclass:#DoItChange
 	instanceVariableNames:''
 	classVariableNames:''
@@ -55,5 +57,5 @@
 !DoItChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/DoItChange.st,v 1.4 1999-07-12 12:06:41 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/DoItChange.st,v 1.5 2000-08-22 19:57:13 cg Exp $'
 ! !
--- a/HistoryManager.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/HistoryManager.st	Tue Aug 22 21:57:35 2000 +0200
@@ -11,6 +11,8 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libbasic3' }"
+
 Object subclass:#HistoryManager
 	instanceVariableNames:'historyMode fullHistoryUpdate'
 	classVariableNames:'TheOneAndOnlyInstance'
@@ -847,7 +849,7 @@
 !
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.45 1999-03-19 07:20:09 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.46 2000-08-22 19:57:33 cg Exp $'
 ! !
 
 !HistoryManager::HistoryLine class methodsFor:'filtering'!
@@ -1479,6 +1481,6 @@
 !HistoryManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.45 1999-03-19 07:20:09 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.46 2000-08-22 19:57:33 cg Exp $'
 ! !
 HistoryManager initialize!
--- a/MessageTally.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/MessageTally.st	Tue Aug 22 21:57:35 2000 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libbasic3' }"
+
 Object subclass:#MessageTally
 	instanceVariableNames:'tree probes ntally theBlock spyInterval executing startTime
 		endTime'
@@ -681,5 +683,5 @@
 !MessageTally class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/MessageTally.st,v 1.37 1999-06-23 12:46:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/MessageTally.st,v 1.38 2000-08-22 19:57:25 cg Exp $'
 ! !
--- a/MessageTracer.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/MessageTracer.st	Tue Aug 22 21:57:35 2000 +0200
@@ -22,14 +22,14 @@
 	category:'System-Debugging-Support'
 !
 
-MessageTracer subclass:#InteractionCollector
+MessageTracer subclass:#PrintingMessageTracer
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:MessageTracer
 !
 
-MessageTracer subclass:#PrintingMessageTracer
+MessageTracer subclass:#InteractionCollector
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -2860,15 +2860,6 @@
 
 ! !
 
-!MessageTracer::InteractionCollector methodsFor:'trace helpers '!
-
-stepInterrupt
-    StepInterruptPending := nil.
-    ObjectMemory flushInlineCaches.
-    StepInterruptPending := 1.
-    InterruptPending := 1.
-! !
-
 !MessageTracer::PrintingMessageTracer methodsFor:'trace helpers '!
 
 stepInterrupt
@@ -2946,9 +2937,18 @@
     "
 ! !
 
+!MessageTracer::InteractionCollector methodsFor:'trace helpers '!
+
+stepInterrupt
+    StepInterruptPending := nil.
+    ObjectMemory flushInlineCaches.
+    StepInterruptPending := 1.
+    InterruptPending := 1.
+! !
+
 !MessageTracer class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/MessageTracer.st,v 1.87 2000-08-21 18:04:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/MessageTracer.st,v 1.88 2000-08-22 19:57:22 cg Exp $'
 ! !
 MessageTracer initialize!
--- a/MethodCategoryChange.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/MethodCategoryChange.st	Tue Aug 22 21:57:35 2000 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libbasic3' }"
+
 MethodChange subclass:#MethodCategoryChange
 	instanceVariableNames:''
 	classVariableNames:''
@@ -92,5 +94,5 @@
 !MethodCategoryChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/MethodCategoryChange.st,v 1.10 1999-12-07 15:35:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/MethodCategoryChange.st,v 1.11 2000-08-22 19:57:29 cg Exp $'
 ! !
--- a/MethodPrivacyChange.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/MethodPrivacyChange.st	Tue Aug 22 21:57:35 2000 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libbasic3' }"
+
 MethodChange subclass:#MethodPrivacyChange
 	instanceVariableNames:''
 	classVariableNames:''
@@ -79,5 +81,5 @@
 !MethodPrivacyChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/MethodPrivacyChange.st,v 1.7 1998-02-16 13:59:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/MethodPrivacyChange.st,v 1.8 2000-08-22 19:57:35 cg Exp $'
 ! !
--- a/MethodRemoveChange.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/MethodRemoveChange.st	Tue Aug 22 21:57:35 2000 +0200
@@ -11,6 +11,8 @@
 "
 
 
+"{ Package: 'stx:libbasic3' }"
+
 ClassChange subclass:#MethodRemoveChange
 	instanceVariableNames:'selector'
 	classVariableNames:''
@@ -75,5 +77,5 @@
 !MethodRemoveChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/MethodRemoveChange.st,v 1.3 1999-07-12 12:06:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/MethodRemoveChange.st,v 1.4 2000-08-22 19:57:31 cg Exp $'
 ! !
--- a/ProfileTree.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/ProfileTree.st	Tue Aug 22 21:57:35 2000 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libbasic3' }"
+
 Object subclass:#ProfileTree
 	instanceVariableNames:'receiver selector class leafTally totalTally called isBlock'
 	classVariableNames:''
@@ -500,5 +502,5 @@
 !ProfileTree class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ProfileTree.st,v 1.19 1997-03-21 13:02:40 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ProfileTree.st,v 1.20 2000-08-22 19:57:21 cg Exp $'
 ! !
--- a/SourceCodeManagerUtilities.st	Tue Aug 22 13:10:19 2000 +0200
+++ b/SourceCodeManagerUtilities.st	Tue Aug 22 21:57:35 2000 +0200
@@ -323,7 +323,8 @@
     ].
 
     aLogMessageOrNil isNil ifTrue:[
-        logMessage := SourceCodeManagerUtilities getLogMessageFor:aClass name asText allBold.
+        logMessage := SourceCodeManagerUtilities 
+                        getLogMessageFor:aClass name asText allBold.
         logMessage isNil ifTrue:[^ self].
     ] ifFalse:[
         logMessage := aLogMessageOrNil
@@ -414,7 +415,11 @@
     resources := ResourcePack for:self.
 
     (logMessage := aLogMessageOrNil) isNil ifTrue:[
-        logMessage := SourceCodeManagerUtilities getLogMessageFor:(resources string:'classes to checkin').
+        logMessage := SourceCodeManagerUtilities getLogMessageFor:(resources string:'%1 classes to checkin' with:aCollectionOfClasses size).
+
+        logMessage isNil ifTrue:[
+            ^ self
+        ].
     ].
 
     classes do:[:aClass |
@@ -434,6 +439,23 @@
 
     |logMessage info mgr pri resources module package i containerFileName|
 
+    resources := ResourcePack for:self.
+
+    mgr := aCollectionOfMethods first mclass sourceCodeManager.
+    mgr isNil ifTrue:[
+        self warn:'No sourceCode manager defined - cannot checkin.'.
+"/        self error:'No sourceCode manager defined' mayProceed:true.
+        ^  false.
+    ].
+    i := aPackageID indexOf:$:.
+    i == 0 ifTrue:[
+        self warn:'Cannot extract module/package from the packageID (invalid format)\\Please change the packageID to be of the form <module>:<subdirectory>,\and try again.\Or, alternatively, move the extensions to their classes project and checkIn the class(es).' withCRs.
+"/        self error:'cannot extract module/package from packageID' mayProceed:true.
+        ^  false.
+    ].
+    module := aPackageID copyTo:i-1.
+    package := aPackageID copyFrom:i+1.
+
     containerFileName := 'extensions.st'.
 
     aLogMessageOrNil isNil ifTrue:[
@@ -443,21 +465,6 @@
         logMessage := aLogMessageOrNil
     ].
 
-    resources := ResourcePack for:self.
-
-    mgr := aCollectionOfMethods first mclass sourceCodeManager.
-    mgr isNil ifTrue:[
-        self error:'No sourceCode manager defined'.
-        ^  false.
-    ].
-    i := aPackageID indexOf:$:.
-    i == 0 ifTrue:[
-        self error:'cannot extract module/package from packageID'.
-        ^  false.
-    ].
-    module := aPackageID copyTo:i-1.
-    package := aPackageID copyFrom:i+1.
-
     "/
     "/ check for the module
     "/
@@ -533,6 +540,132 @@
     ^ true
 !
 
+compareClassWithRepository:aClass
+    "open a diff-textView comparing the current (in-image) version
+     against its orgiginal version found in the repository."
+
+    |currentClass resources
+     aStream comparedSource currentSource v rev revString thisRevString mgr
+     nm msg rev2 newestRev
+     containerModule containerPackage containerFile rslt
+     lastModule lastPackage pkg|
+
+    resources := ResourcePack for:self.
+
+    currentClass := aClass theNonMetaclass.
+
+    nm := currentClass name.
+    mgr := currentClass sourceCodeManager.
+    mgr isNil ifTrue:[
+        self warn:'No sourceCode manager - check settings'.
+        ^ self
+    ].
+    rev := currentClass binaryRevision.
+    rev2 := currentClass revision.
+    rev isNil ifTrue:[
+        rev := rev2
+    ].
+    rev isNil ifTrue:[
+        self warn:'Class seems to be not yet in the repository'.
+        ^ self
+    ].
+
+    "/
+    "/ class in repository - ask for revision
+    "/
+    newestRev := mgr newestRevisionOf:currentClass.
+
+    msg := resources string:'compare to revision: (empty for newest)'.
+    rev notNil ifTrue:[
+        msg := msg , '\\' , (resources string:'Current %1 is based upon rev %2.'
+                                       with:nm asText allBold with:rev).
+        (rev2 notNil and:[rev2 ~= rev]) ifTrue:[
+            msg := msg , '\' , (resources string:'And has been checked into the repository as %1.'
+                                           with:rev2)
+        ]
+    ].
+    newestRev notNil ifTrue:[
+        msg := msg , '\' , (resources string:'Newest in reporitory is %1.'
+                                       with:newestRev)
+    ].
+
+    rev := SourceCodeManagerUtilities
+                askForExistingRevision:msg 
+                title:'Compare with repository' 
+                class:currentClass.
+
+    (rev notNil or:[containerFile notNil]) ifTrue:[
+        rev notNil ifTrue:[
+            rev withoutSpaces isEmpty ifTrue:[
+                msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
+                "/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
+                aStream := mgr getSourceStreamFor:currentClass revision:newestRev.
+                revString := '(newest: ' , (newestRev ? '???') , ')'.
+            ] ifFalse:[
+                msg := 'extracting previous %1'.
+                aStream := mgr getSourceStreamFor:currentClass revision:rev.
+                revString := rev
+            ].
+        ] ifFalse:[
+            msg := 'extracting newest version from ' , containerModule , '/' , containerPackage, '/' , containerFile.
+            aStream := mgr streamForClass:nil fileName:containerFile revision:#newest directory:containerPackage module:containerModule cache:false.
+            revString := '???'
+        ].
+
+        aStream isNil ifTrue:[
+            self warn:'could not extract source from repository'.
+            ^ self
+        ].
+        aStream class readErrorSignal handle:[:ex |
+            self warn:('read error while reading extracted source\\' , ex errorString) withCRs.
+            aStream close.
+            ^ self
+        ] do:[
+            comparedSource := aStream contents asString.
+        ].
+        aStream close.
+
+        self activityNotification:'generating current source ...'.
+
+        aStream := '' writeStream.
+        Method flushSourceStreamCache.
+        currentClass fileOutOn:aStream withTimeStamp:false.
+        currentSource := aStream contents asString.
+        aStream close.
+
+        self activityNotification:'comparing  ...'.
+
+        comparedSource = currentSource ifTrue:[
+            self information:'versions are identical'.
+        ] ifFalse:[
+            thisRevString := currentClass revision.
+            thisRevString isNil ifTrue:[
+                thisRevString := 'no revision'
+            ].
+
+            revString = '(newest)' ifTrue:[
+                (rev := mgr newestRevisionOf:currentClass) notNil ifTrue:[
+                    revString := '(newest is ' , rev , ')'
+                ]
+            ].
+
+            self activityNotification:'comparing  ...'.
+
+            (UserPreferences current versionDiffViewerClass)
+                  openOnClass:currentClass
+                  labelA:('repository: ' , revString)
+                  sourceA:comparedSource
+                  labelB:('current: (based on: ' , thisRevString , ')')
+                  sourceB:currentSource
+                  title:('comparing ' , currentClass name).
+        ].
+    ].
+
+    "
+     self compareClassWithRepository:Array
+    "
+!
+
 createSourceContainerForClass:aClass
     "let user specify the source-repository values for aClass"
 
@@ -916,10 +1049,50 @@
     "
 
 
+!
+
+getLogMessageFor:aString withButton:additionalButton
+    "get a log message for checking in a class.
+     Return the message or nil if aborted."
+
+    |resources logMsg dialog textHolder|
+
+    resources := ResourcePack for:self.
+    textHolder := '' asValue.
+    dialog := Dialog 
+                forRequestText:(resources string:'enter log message for: %1' with:aString)
+                lines:10
+                columns:70
+                initialAnswer:LastSourceLogMessage
+                model:textHolder.
+
+    additionalButton notNil ifTrue:[
+        dialog addButton:additionalButton before:(dialog okButton).
+    ].
+
+    dialog open.
+    dialog accepted ifFalse:[
+        ^ nil.
+    ].
+    logMsg := textHolder value.
+"/    logMsg := Dialog
+"/        requestText:(resources string:'enter log message for: %1' with:aString)
+"/        lines:10
+"/        columns:70
+"/        initialAnswer:LastSourceLogMessage.
+    logMsg notNil ifTrue:[
+        LastSourceLogMessage := logMsg
+    ].
+    ^ logMsg
+
+    "
+     SourceCodeManagerUtilities getLogMessageFor:'hello'
+     SourceCodeManagerUtilities getLogMessageFor:'hello' withButton:(Button label:'foo')
+    "
 ! !
 
 !SourceCodeManagerUtilities class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.17 2000-08-21 12:53:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.18 2000-08-22 19:57:16 cg Exp $'
 ! !