Fixed bug in ChangeSetDiff that likely caused stx:libscm issue 27 jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 18 Dec 2013 21:43:41 +0100
branchjv
changeset 3424 0c07b4e1b5e8
parent 3423 1f427a221d47
child 3427 fbc706ecd67d
Fixed bug in ChangeSetDiff that likely caused stx:libscm issue 27 Due to a typo in the code both changes only in A and only in B were added as versionB in diff entry. This explains funny behavior observerd and reported in [1]. This commit fixes the bug and therefore should fix issue #27. [1] https://bitbucket.org/janvrany/stx-libscm/issue/27/swapped-to-be-commited-and-working-copy
ChangeSetDiff.st
--- a/ChangeSetDiff.st	Wed Dec 18 21:39:13 2013 +0100
+++ b/ChangeSetDiff.st	Wed Dec 18 21:43:41 2013 +0100
@@ -65,21 +65,18 @@
 "
 ! !
 
-
 !ChangeSetDiff class methodsFor:'instance creation'!
 
 new
     ^ self basicNew initialize.
 ! !
 
-
 !ChangeSetDiff class methodsFor:'others'!
 
 version_CVS
     ^ '$Header: /cvs/stx/stx/libbasic3/ChangeSetDiff.st,v 1.4 2012-07-31 12:34:25 vrany Exp $'
 ! !
 
-
 !ChangeSetDiff class methodsFor:'utilities'!
 
 versionA:changesetA versionB:changesetB 
@@ -98,7 +95,6 @@
     "Created: / 03-11-2009 / 07:58:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-
 !ChangeSetDiff methodsFor:'accessing'!
 
 diffset
@@ -109,7 +105,6 @@
     ^ same
 ! !
 
-
 !ChangeSetDiff methodsFor:'diffing'!
 
 versionA:changesetA versionB:changesetB 
@@ -134,7 +129,7 @@
           (include value:chg) ifTrue:[
             (diffsByClass at:chg nonMetaClassName
                 ifAbsentPut:[ChangeSetDiffSet new name:chg nonMetaClassName]) 
-                    add:(ChangeSetDiffEntry versionB:chg)
+                    add:(ChangeSetDiffEntry versionA:chg)
         ]
     ].
     ds changed do:[:chgPair | 
@@ -199,10 +194,9 @@
 
     "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: / 17-01-2013 / 17:11:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 18-12-2013 / 21:05:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-
 !ChangeSetDiff methodsFor:'initialization'!
 
 initialize
@@ -217,7 +211,6 @@
     "Modified: / 19-03-2012 / 21:51:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-
 !ChangeSetDiff class methodsFor:'documentation'!
 
 version