--- a/Change.st Tue Mar 26 00:47:05 2013 +0100
+++ b/Change.st Tue Mar 26 13:13:16 2013 +0100
@@ -49,7 +49,7 @@
!Change class methodsFor:'others'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic3/Change.st,v 1.62 2012-10-30 14:25:24 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/Change.st,v 1.63 2013-03-26 12:13:16 cg Exp $'
! !
!Change class methodsFor:'support'!
@@ -57,7 +57,7 @@
isSource:source1Arg sameSourceAs:source2Arg
"return true, if the given sources are the same, ignoring tabs and whitespace differences."
- |source1 source2|
+ |source1 source2 tSource1 tSource2|
source1 := source1Arg.
source2 := source2Arg.
@@ -68,10 +68,22 @@
source1 := source1 withoutTrailingSeparators asCollectionOfLines.
source2 := source2 withoutTrailingSeparators asCollectionOfLines.
+ [source1 last isEmptyOrNil] whileTrue:[ source1 removeLast ].
+ [source2 last isEmptyOrNil] whileTrue:[ source2 removeLast ].
+
source1 size ~~ source2 size ifTrue:[^ false].
- source1 := source1 collect:[:line | line withTabsExpanded withoutTrailingSeparators].
- source2 := source2 collect:[:line | line withTabsExpanded withoutTrailingSeparators].
- ^ source1 = source2
+ source1 = source2 ifTrue:[^ true].
+
+ tSource1 := source1 collect:[:line | (line withTabsExpanded:8) withoutTrailingSeparators].
+ tSource2 := source2 collect:[:line | (line withTabsExpanded:8) withoutTrailingSeparators].
+ tSource1 = tSource2 ifTrue:[^ true].
+
+"/ how about that one?
+"/ tSource1 := source1 collect:[:line | line withoutLeadingSeparators withoutTrailingSeparators].
+"/ tSource2 := source2 collect:[:line | line withoutLeadingSeparators withoutTrailingSeparators].
+"/ tSource1 = tSource2 ifTrue:[^ true].
+
+ ^ false.
"Created: / 25-07-2006 / 11:22:21 / cg"
! !
@@ -284,6 +296,9 @@
JV: personal note: we should switch to deltastreams
(http://wiki.squeak.org/squeak/6001)
+
+ CG: is the above really true - what about a classDefChange for
+ an existing class????
"
"/self error: 'Could not create antichange'
@@ -522,9 +537,10 @@
!Change class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic3/Change.st,v 1.62 2012-10-30 14:25:24 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/Change.st,v 1.63 2013-03-26 12:13:16 cg Exp $'
!
version_SVN
^ '§Id: Change.st 1942 2012-07-27 14:53:23Z vranyj1 §'
! !
+