changed: #initializeWithBase:target:
authorClaus Gittinger <cg@exept.de>
Mon, 26 Oct 2009 18:54:19 +0100
changeset 155 c7a154a5ff3e
parent 154 8194c64661da
child 156 d565f9e9cee1
changed: #initializeWithBase:target:
MCPatch.st
--- a/MCPatch.st	Mon Oct 26 18:54:13 2009 +0100
+++ b/MCPatch.st	Mon Oct 26 18:54:19 2009 +0100
@@ -33,25 +33,33 @@
 !MCPatch methodsFor:'intializing'!
 
 initializeWithBase: baseSnapshot target: targetSnapshot
-	| base target |	
-	operations _ OrderedCollection new.
-	base _ MCDefinitionIndex definitions: baseSnapshot definitions.
-	target _ MCDefinitionIndex definitions: targetSnapshot definitions.
-	
-	target definitions do:
-		[:t |
-		base
-			definitionLike: t
-			ifPresent: [:b | (b isSameRevisionAs: t) ifFalse: [operations add: (MCModification of: b to: t)]]
-			ifAbsent: [operations add: (MCAddition of: t)]]
-		displayingProgress: 'Diffing...'.
-		
-	base definitions do:
-		[:b |
-		target
-			definitionLike: b
-			ifPresent: [:t]
-			ifAbsent: [operations add: (MCRemoval of: b)]]		
+        | base target |         
+        operations _ OrderedCollection new.
+        base _ MCDefinitionIndex definitions: baseSnapshot definitions.
+        target _ MCDefinitionIndex definitions: targetSnapshot definitions.
+
+        Smalltalk isSmalltalkX ifTrue:[
+            target definitions do:
+                [:t |
+                base
+                        definitionLike: t
+                        ifPresent: [:b | (b isSameRevisionAs: t) ifFalse: [operations add: (MCModification of: b to: t)]]
+                        ifAbsent: [operations add: (MCAddition of: t)]].
+        ] ifFalse:[
+            target definitions do:
+                [:t |
+                base
+                        definitionLike: t
+                        ifPresent: [:b | (b isSameRevisionAs: t) ifFalse: [operations add: (MCModification of: b to: t)]]
+                        ifAbsent: [operations add: (MCAddition of: t)]]
+                displayingProgress: 'Diffing...'.
+        ].                
+        base definitions do:
+                [:b |
+                target
+                        definitionLike: b
+                        ifPresent: [:t]
+                        ifAbsent: [operations add: (MCRemoval of: b)]]          
 !
 
 initializeWithOperations: aCollection
@@ -73,5 +81,9 @@
 !MCPatch class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCPatch.st,v 1.1 2006-11-22 13:12:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCPatch.st,v 1.2 2009-10-26 17:54:19 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCPatch.st,v 1.2 2009-10-26 17:54:19 cg Exp $'
 ! !