Fixes in ChangeSetDiff... jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 17 Jan 2013 17:02:15 +0000
branchjv
changeset 3099 be6ff432a2ad
parent 3098 67aaf3fadffb
child 3100 4154b5ce8690
Fixes in ChangeSetDiff...
ChangeSetDiff.st
ChangeSetDiffComponent.st
ChangeSetDiffEntry.st
ChangeSetDiffSet.st
Make.proto
bc.mak
libbasic3.rc
--- a/ChangeSetDiff.st	Wed Jan 16 11:55:57 2013 +0000
+++ b/ChangeSetDiff.st	Thu Jan 17 17:02:15 2013 +0000
@@ -135,9 +135,12 @@
         ]
     ].
     ds changed do:[:chgPair | 
-        (include value:chgPair first) ifTrue:[
-            (diffsByClass at:chgPair first nonMetaClassName
-                ifAbsentPut:[ChangeSetDiffSet new name:chgPair first nonMetaClassName]) 
+        | chg |
+
+        chg := chgPair first ? chgPair second.
+        (include value:chg) ifTrue:[
+            (diffsByClass at:chg nonMetaClassName
+                ifAbsentPut:[ChangeSetDiffSet new name:chg nonMetaClassName]) 
                     add:(ChangeSetDiffEntry versionA:chgPair first versionB:chgPair second)
         ]
     ].
@@ -193,7 +196,7 @@
 
     "Created: / 02-11-2009 / 16:17:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 29-06-2011 / 08:22:49 / Jan Vrany <enter your email here>"
-    "Modified: / 20-03-2012 / 22:59:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 17-01-2013 / 16:16:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !ChangeSetDiff methodsFor:'initialization'!
@@ -213,9 +216,9 @@
 !ChangeSetDiff class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ChangeSetDiff.st 1957 2012-09-05 11:45:38Z vranyj1 $'
+    ^ '$Id: ChangeSetDiff.st 1986 2013-01-17 17:02:15Z vranyj1 $'
 !
 
 version_SVN
-    ^ '$Id: ChangeSetDiff.st 1957 2012-09-05 11:45:38Z vranyj1 $'
+    ^ '$Id: ChangeSetDiff.st 1986 2013-01-17 17:02:15Z vranyj1 $'
 ! !
--- a/ChangeSetDiffComponent.st	Wed Jan 16 11:55:57 2013 +0000
+++ b/ChangeSetDiffComponent.st	Thu Jan 17 17:02:15 2013 +0000
@@ -226,6 +226,18 @@
     ^stream nextPut: self
 
     "Created: / 05-12-2009 / 11:06:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+sort
+    self sort: [:a :b|a printString < b printString ].
+
+    "Created: / 17-01-2013 / 13:56:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+sort: sortBlock
+    self subclassResponsibility
+
+    "Created: / 17-01-2013 / 13:57:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !ChangeSetDiffComponent methodsFor:'testing'!
@@ -274,9 +286,9 @@
 !ChangeSetDiffComponent class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ChangeSetDiffComponent.st 1985 2013-01-16 11:55:57Z vranyj1 $'
+    ^ '$Id: ChangeSetDiffComponent.st 1986 2013-01-17 17:02:15Z vranyj1 $'
 !
 
 version_SVN
-    ^ '$Id: ChangeSetDiffComponent.st 1985 2013-01-16 11:55:57Z vranyj1 $'
+    ^ '$Id: ChangeSetDiffComponent.st 1986 2013-01-17 17:02:15Z vranyj1 $'
 ! !
--- a/ChangeSetDiffEntry.st	Wed Jan 16 11:55:57 2013 +0000
+++ b/ChangeSetDiffEntry.st	Thu Jan 17 17:02:15 2013 +0000
@@ -342,6 +342,16 @@
     "Modified (comment): / 09-04-2012 / 18:01:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!ChangeSetDiffEntry methodsFor:'private'!
+
+sort:sortBlock
+    "superclass ChangeSetDiffComponent says that I am responsible to implement this method"
+
+    "Ignored"
+
+    "Modified: / 17-01-2013 / 13:57:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !ChangeSetDiffEntry methodsFor:'testing'!
 
 isConflict
@@ -405,9 +415,9 @@
 !ChangeSetDiffEntry class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ChangeSetDiffEntry.st 1957 2012-09-05 11:45:38Z vranyj1 $'
+    ^ '$Id: ChangeSetDiffEntry.st 1986 2013-01-17 17:02:15Z vranyj1 $'
 !
 
 version_SVN
-    ^ '$Id: ChangeSetDiffEntry.st 1957 2012-09-05 11:45:38Z vranyj1 $'
+    ^ '$Id: ChangeSetDiffEntry.st 1986 2013-01-17 17:02:15Z vranyj1 $'
 ! !
--- a/ChangeSetDiffSet.st	Wed Jan 16 11:55:57 2013 +0000
+++ b/ChangeSetDiffSet.st	Thu Jan 17 17:02:15 2013 +0000
@@ -125,6 +125,44 @@
     name := aString.
 !
 
+nextEntryAfter: entry suchThat: predicate
+    | found |
+
+    entry isNil ifTrue:[ 
+        self do:[:each|(predicate value: each) ifTrue:[^each]].
+        ^nil
+    ].
+
+    found := false.
+    self do:[:each|
+        each == entry ifTrue:[
+            found := true
+        ] ifFalse:[
+            (found and:[predicate value: each]) ifTrue:[ ^ each ]
+        ].
+    ].
+    ^nil
+
+    "Created: / 17-01-2013 / 13:00:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 17-01-2013 / 16:55:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+nextEntryBefore: entry suchThat: predicate
+    | last |
+
+    entry isNil ifTrue:[ 
+        ^nil
+    ].
+
+    self do:[:each|
+        each == entry ifTrue:[ ^ last ].
+        (predicate value: each) ifTrue:[last := each].
+    ].
+    ^nil
+
+    "Created: / 17-01-2013 / 16:57:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 resolution
     | changeset |
 
@@ -239,6 +277,15 @@
     diffs do:[:diff|diff flattenOn: stream]
 
     "Created: / 05-12-2009 / 11:07:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+sort:sortBlock
+    "superclass ChangeSetDiffComponent says that I am responsible to implement this method"
+
+    diffs sort: sortBlock.
+    diffs do:[:e|e sort: sortBlock].
+
+    "Modified: / 17-01-2013 / 14:18:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !ChangeSetDiffSet methodsFor:'testing'!
@@ -290,9 +337,9 @@
 !ChangeSetDiffSet class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ChangeSetDiffSet.st 1985 2013-01-16 11:55:57Z vranyj1 $'
+    ^ '$Id: ChangeSetDiffSet.st 1986 2013-01-17 17:02:15Z vranyj1 $'
 !
 
 version_SVN
-    ^ '$Id: ChangeSetDiffSet.st 1985 2013-01-16 11:55:57Z vranyj1 $'
+    ^ '$Id: ChangeSetDiffSet.st 1986 2013-01-17 17:02:15Z vranyj1 $'
 ! !
--- a/Make.proto	Wed Jan 16 11:55:57 2013 +0000
+++ b/Make.proto	Thu Jan 17 17:02:15 2013 +0000
@@ -141,7 +141,7 @@
 $(OUTDIR)Change.$(O) Change.$(H): Change.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)ChangeDeltaInformation.$(O) ChangeDeltaInformation.$(H): ChangeDeltaInformation.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)ChangeNotificationParameter.$(O) ChangeNotificationParameter.$(H): ChangeNotificationParameter.st $(INCLUDE_TOP)/stx/libbasic/Array.$(H) $(INCLUDE_TOP)/stx/libbasic/ArrayedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)ChangeSet.$(O) ChangeSet.$(H): ChangeSet.st $(INCLUDE_TOP)/stx/libbasic/OrderedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/SmalltalkChunkFileSourceWriter.$(H) $(INCLUDE_TOP)/stx/libbasic/AbstractSourceFileWriter.$(H) $(STCHDR)
+$(OUTDIR)ChangeSet.$(O) ChangeSet.$(H): ChangeSet.st $(INCLUDE_TOP)/stx/libbasic/OrderedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/SmalltalkChunkFileSourceWriter.$(H) $(INCLUDE_TOP)/stx/libbasic/AbstractSourceFileWriter.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(STCHDR)
 $(OUTDIR)ChangeSetDiff.$(O) ChangeSetDiff.$(H): ChangeSetDiff.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)ChangeSetDiffComponent.$(O) ChangeSetDiffComponent.$(H): ChangeSetDiffComponent.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)ClassOrganizer.$(O) ClassOrganizer.$(H): ClassOrganizer.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
@@ -177,7 +177,7 @@
 $(OUTDIR)MethodChangeNotificationParameter.$(O) MethodChangeNotificationParameter.$(H): MethodChangeNotificationParameter.st $(INCLUDE_TOP)/stx/libbasic3/ChangeNotificationParameter.$(H) $(INCLUDE_TOP)/stx/libbasic/Array.$(H) $(INCLUDE_TOP)/stx/libbasic/ArrayedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)NameSpaceCreationChange.$(O) NameSpaceCreationChange.$(H): NameSpaceCreationChange.st $(INCLUDE_TOP)/stx/libbasic3/Change.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)OtherChange.$(O) OtherChange.$(H): OtherChange.st $(INCLUDE_TOP)/stx/libbasic3/Change.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)PerforceSourceCodeManager.$(O) PerforceSourceCodeManager.$(H): PerforceSourceCodeManager.st $(INCLUDE_TOP)/stx/libbasic3/AbstractSourceCodeManager.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic3/VersionInfo.$(H) $(INCLUDE_TOP)/stx/libbasic/ProceedableError.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(STCHDR)
+$(OUTDIR)PerforceSourceCodeManager.$(O) PerforceSourceCodeManager.$(H): PerforceSourceCodeManager.st $(INCLUDE_TOP)/stx/libbasic3/AbstractSourceCodeManager.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProceedableError.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic3/VersionInfo.$(H) $(STCHDR)
 $(OUTDIR)SVNVersionInfo.$(O) SVNVersionInfo.$(H): SVNVersionInfo.st $(INCLUDE_TOP)/stx/libbasic3/VersionInfo.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)SourceCodeManagerUtilitiesForContainerBasedManagers.$(O) SourceCodeManagerUtilitiesForContainerBasedManagers.$(H): SourceCodeManagerUtilitiesForContainerBasedManagers.st $(INCLUDE_TOP)/stx/libbasic3/SourceCodeManagerUtilities.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)SourceCodeManagerUtilitiesForWorkspaceBasedManagers.$(O) SourceCodeManagerUtilitiesForWorkspaceBasedManagers.$(H): SourceCodeManagerUtilitiesForWorkspaceBasedManagers.st $(INCLUDE_TOP)/stx/libbasic3/SourceCodeManagerUtilities.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
--- a/bc.mak	Wed Jan 16 11:55:57 2013 +0000
+++ b/bc.mak	Thu Jan 17 17:02:15 2013 +0000
@@ -76,7 +76,7 @@
 $(OUTDIR)Change.$(O) Change.$(H): Change.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)ChangeDeltaInformation.$(O) ChangeDeltaInformation.$(H): ChangeDeltaInformation.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)ChangeNotificationParameter.$(O) ChangeNotificationParameter.$(H): ChangeNotificationParameter.st $(INCLUDE_TOP)\stx\libbasic\Array.$(H) $(INCLUDE_TOP)\stx\libbasic\ArrayedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)ChangeSet.$(O) ChangeSet.$(H): ChangeSet.st $(INCLUDE_TOP)\stx\libbasic\OrderedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\SmalltalkChunkFileSourceWriter.$(H) $(INCLUDE_TOP)\stx\libbasic\AbstractSourceFileWriter.$(H) $(STCHDR)
+$(OUTDIR)ChangeSet.$(O) ChangeSet.$(H): ChangeSet.st $(INCLUDE_TOP)\stx\libbasic\OrderedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\SmalltalkChunkFileSourceWriter.$(H) $(INCLUDE_TOP)\stx\libbasic\AbstractSourceFileWriter.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(STCHDR)
 $(OUTDIR)ChangeSetDiff.$(O) ChangeSetDiff.$(H): ChangeSetDiff.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)ChangeSetDiffComponent.$(O) ChangeSetDiffComponent.$(H): ChangeSetDiffComponent.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)ClassOrganizer.$(O) ClassOrganizer.$(H): ClassOrganizer.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
@@ -112,7 +112,7 @@
 $(OUTDIR)MethodChangeNotificationParameter.$(O) MethodChangeNotificationParameter.$(H): MethodChangeNotificationParameter.st $(INCLUDE_TOP)\stx\libbasic3\ChangeNotificationParameter.$(H) $(INCLUDE_TOP)\stx\libbasic\Array.$(H) $(INCLUDE_TOP)\stx\libbasic\ArrayedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)NameSpaceCreationChange.$(O) NameSpaceCreationChange.$(H): NameSpaceCreationChange.st $(INCLUDE_TOP)\stx\libbasic3\Change.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)OtherChange.$(O) OtherChange.$(H): OtherChange.st $(INCLUDE_TOP)\stx\libbasic3\Change.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)PerforceSourceCodeManager.$(O) PerforceSourceCodeManager.$(H): PerforceSourceCodeManager.st $(INCLUDE_TOP)\stx\libbasic3\AbstractSourceCodeManager.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic3\VersionInfo.$(H) $(INCLUDE_TOP)\stx\libbasic\ProceedableError.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(STCHDR)
+$(OUTDIR)PerforceSourceCodeManager.$(O) PerforceSourceCodeManager.$(H): PerforceSourceCodeManager.st $(INCLUDE_TOP)\stx\libbasic3\AbstractSourceCodeManager.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProceedableError.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic3\VersionInfo.$(H) $(STCHDR)
 $(OUTDIR)SVNVersionInfo.$(O) SVNVersionInfo.$(H): SVNVersionInfo.st $(INCLUDE_TOP)\stx\libbasic3\VersionInfo.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)SourceCodeManagerUtilitiesForContainerBasedManagers.$(O) SourceCodeManagerUtilitiesForContainerBasedManagers.$(H): SourceCodeManagerUtilitiesForContainerBasedManagers.st $(INCLUDE_TOP)\stx\libbasic3\SourceCodeManagerUtilities.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)SourceCodeManagerUtilitiesForWorkspaceBasedManagers.$(O) SourceCodeManagerUtilitiesForWorkspaceBasedManagers.$(H): SourceCodeManagerUtilitiesForWorkspaceBasedManagers.st $(INCLUDE_TOP)\stx\libbasic3\SourceCodeManagerUtilities.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/libbasic3.rc	Wed Jan 16 11:55:57 2013 +0000
+++ b/libbasic3.rc	Thu Jan 17 17:02:15 2013 +0000
@@ -3,7 +3,7 @@
 // automagically generated from the projectDefinition: stx_libbasic3.
 //
 VS_VERSION_INFO VERSIONINFO
-  FILEVERSION     6,2,1981,1981
+  FILEVERSION     6,2,1985,1985
   PRODUCTVERSION  6,2,3,0
 #if (__BORLANDC__)
   FILEFLAGSMASK   VS_FF_DEBUG | VS_FF_PRERELEASE
@@ -20,12 +20,12 @@
     BEGIN
       VALUE "CompanyName", "eXept Software AG\0"
       VALUE "FileDescription", "Smalltalk/X Additional Developer Basic Classes (LIB)\0"
-      VALUE "FileVersion", "6.2.1981.1981\0"
+      VALUE "FileVersion", "6.2.1985.1985\0"
       VALUE "InternalName", "stx:libbasic3\0"
       VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2012\nCopyright eXept Software AG 1998-2012\0"
       VALUE "ProductName", "Smalltalk/X\0"
       VALUE "ProductVersion", "6.2.3.0\0"
-      VALUE "ProductDate", "Wed, 16 Jan 2013 11:57:17 GMT\0"
+      VALUE "ProductDate", "Thu, 17 Jan 2013 17:03:31 GMT\0"
     END
 
   END