AbstractSourceCodeManager.st
changeset 922 24cfcd3043a2
parent 919 20e138a64538
child 926 9e3b95bc9430
--- a/AbstractSourceCodeManager.st	Thu Mar 30 17:31:44 2000 +0200
+++ b/AbstractSourceCodeManager.st	Wed Apr 05 21:33:31 2000 +0200
@@ -326,16 +326,19 @@
         #base   - only check in methods from the classes package
         #all    - check in all"
 
-    |checkInClassPackageOnly clsPackage otherPackages msg answer|
+    |checkInClassPackageOnly clsPackage otherPackages methodsFromOtherPackages msg answer|
 
     checkInClassPackageOnly := false.
 
     clsPackage := aClass package.
-    otherPackages := IdentitySet new.
+    otherPackages := Set new.
+    methodsFromOtherPackages := IdentitySet new.
+
     aClass methodDictionary keysAndValuesDo:[:sel :mthd |
         |mthdPackage|
 
         (mthdPackage := mthd package) ~= clsPackage ifTrue:[
+            methodsFromOtherPackages add:mthd.
             otherPackages add:mthdPackage.
         ]
     ].
@@ -343,6 +346,7 @@
         |mthdPackage|
 
         (mthdPackage := mthd package) ~= clsPackage ifTrue:[
+            methodsFromOtherPackages add:mthd.
             otherPackages add:mthdPackage.
         ]
     ].
@@ -352,15 +356,16 @@
 
     msg := 'The class ''' , aClass name asText allBold.
     otherPackages size == 1 ifTrue:[
-        msg := msg , ''' contains methods for the ''%1'' package.\\Change those to belong to the ''%3'' package ?'
+        msg := msg , ''' contains %4 method(s) for the ''%1'' package.\\Change those to belong to the ''%3'' package ?'
     ] ifFalse:[
-        msg := msg , ''' contains methods for %2 other packages.\\Change those to belong to the ''%3'' package ?'
+        msg := msg , ''' contains %4 method(s) for %2 other packages.\\Change those to belong to the ''%3'' package ?'
     ].
 
     answer := Dialog 
                 confirmWithCancel:(msg bindWith:(otherPackages first asText allBold) 
                                        with:(otherPackages size) 
-                                       with:clsPackage asText allBold) withCRs
+                                       with:clsPackage asText allBold
+                                       with:methodsFromOtherPackages size) withCRs
                 default:9999. "/ i.e. no default
 
     answer == true ifTrue:[
@@ -1220,7 +1225,7 @@
     ^ nil
 
     "
-     SourceCodeManager revisionInfoFromString:'$Revision: 1.115 $'
+     SourceCodeManager revisionInfoFromString:'$Revision: 1.116 $'
      SourceCodeManager revisionInfoFromString:(SourceCodeManager version)
     "
 
@@ -1239,48 +1244,6 @@
     "Modified: 29.1.1997 / 18:57:29 / cg"
 !
 
-revisionLogInFile:classFileName directory:packageDir module:moduleDir
-    "return info about the repository container and
-     (part of) the revisionlog as a collection of revision entries.
-     Return nil on failure.
-
-     The returned information is a structure (IdentityDictionary)
-     filled with:
-            #container          -> the RCS container file name 
-            #filename           -> the actual source file name
-            #newestRevision     -> the revisionString of the newest revision
-            #numberOfRevisions  -> the number of revisions in the container
-            #revisions          -> collection of per-revision info (see below)
-
-            per revision info consists of one record per revision:
-
-              #revision              -> the revision string
-              #author                -> who checked that revision into the repository
-              #date                  -> when was it checked in
-              #state                 -> the RCS state
-              #numberOfChangedLines  -> the number of changed line w.r.t the previous
-
-            revisions are ordered newest first 
-            (i.e. the last entry is for the initial revision; 
-                  the first for the most recent one)
-        "
-
-    ^ self
-        revisionLogOf:nil 
-        fromRevision:nil 
-        toRevision:nil 
-        fileName:classFileName 
-        directory:packageDir 
-        module:moduleDir
-
-    "
-     CVSSourceCodeManager
-        revisionLogInFile:'Array.st' directory:'libbasic' module:'stx'
-    "
-
-    "Modified: 10.1.1997 / 13:29:06 / cg"
-!
-
 revisionLogOf:aClass
     "return info about the repository container and
      the revisionlog as a collection of revision entries.
@@ -1437,6 +1400,107 @@
     "Modified: 10.1.1997 / 13:30:00 / cg"
 !
 
+revisionLogOfContainer:classFileName directory:packageDir module:moduleDir
+    "return info about the repository container and
+     (part of) the revisionlog as a collection of revision entries.
+     Return nil on failure.
+
+     The returned information is a structure (IdentityDictionary)
+     filled with:
+            #container          -> the RCS container file name 
+            #filename           -> the actual source file name
+            #newestRevision     -> the revisionString of the newest revision
+            #numberOfRevisions  -> the number of revisions in the container
+            #revisions          -> collection of per-revision info (see below)
+
+            per revision info consists of one record per revision:
+
+              #revision              -> the revision string
+              #author                -> who checked that revision into the repository
+              #date                  -> when was it checked in
+              #state                 -> the RCS state
+              #numberOfChangedLines  -> the number of changed line w.r.t the previous
+
+            revisions are ordered newest first 
+            (i.e. the last entry is for the initial revision; 
+                  the first for the most recent one)
+        "
+
+    ^ self
+        revisionLogOf:nil 
+        fromRevision:nil 
+        toRevision:nil 
+        fileName:classFileName 
+        directory:packageDir 
+        module:moduleDir
+
+    "
+     CVSSourceCodeManager
+        revisionLogInFile:'Array.st' directory:'libbasic' module:'stx'
+    "
+
+    "Modified: 10.1.1997 / 13:29:06 / cg"
+!
+
+revisionLogOfContainer:fileName module:moduleDir package:packageDir fromRevision:rev1 toRevision:rev2
+    "return info about the repository container and
+     (part of) the revisionlog as a collection of revision entries.
+     Return nil on failure.
+
+     The returned information is a structure (IdentityDictionary)
+     filled with:
+            #container          -> the RCS container file name 
+            #filename           -> the actual source file name
+            #newestRevision     -> the revisionString of the newest revision
+            #numberOfRevisions  -> the number of revisions in the container
+            #revisions          -> collection of per-revision info (see below)
+
+         for some classes, additional info is returned:
+
+            #renamed            -> true if the class has been renamed or copied
+                                   and the sourceInfo is from the previous one
+            #expectedFileName   -> the filename we would expect (i.e. for the new class)
+
+            rev1 / rev2 specify from which revisions a logEntry is wanted:
+              If rev1 is nil, the first revision is the initial revision
+              otherwise, the log starts with that revision.
+              If rev2 is nil, the last revision is the newest revision
+              otherwise, the log ends with that revision.
+              If both are nil, no logEntries are extracted (i.e. only the header).
+
+            per revision info consists of one record per revision:
+
+              #revision              -> the revision string
+              #author                -> who checked that revision into the repository
+              #date                  -> when was it checked in
+              #state                 -> the RCS state
+              #numberOfChangedLines  -> the number of changed line w.r.t the previous
+
+            revisions are ordered newest first 
+            (i.e. the last entry is for the initial revision; 
+                  the first for the most recent one)
+        "
+
+    |info|
+
+    info := self 
+        revisionLogOf:nil
+        fromRevision:rev1 
+        toRevision:rev2
+        fileName:fileName
+        directory:packageDir 
+        module:moduleDir.
+
+    ^ info
+
+    "
+     CVSSourceCodeManager revisionLogOfContainer:'Array.st' module:'stx' package:'libbasic' fromRevision:'1.40' toRevision:'1.43' 
+    "
+
+    "Created: 6.11.1995 / 18:56:00 / cg"
+    "Modified: 10.1.1997 / 13:30:00 / cg"
+!
+
 revisionsOf:aClass
     "return a collection of revisions (as strings) found in the repository.
      The most recent (newest) revision will be the first in the list.
@@ -1665,6 +1729,6 @@
 !AbstractSourceCodeManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.115 2000-03-29 18:34:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.116 2000-04-05 19:32:25 cg Exp $'
 ! !
 AbstractSourceCodeManager initialize!