MCPatch.st
changeset 193 910cb9414852
parent 155 c7a154a5ff3e
child 278 c2a9ae7cc695
--- a/MCPatch.st	Sat Aug 20 13:41:22 2011 +0200
+++ b/MCPatch.st	Sat Aug 20 13:41:27 2011 +0200
@@ -28,42 +28,35 @@
 
 applyTo: anObject
 	operations do: [:ea | ea applyTo: anObject].
+
 ! !
 
 !MCPatch methodsFor:'intializing'!
 
 initializeWithBase: baseSnapshot target: targetSnapshot
-        | 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)]]          
+	| 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)]]		
 !
 
 initializeWithOperations: aCollection
-	operations _ aCollection
+	operations := aCollection
 ! !
 
 !MCPatch methodsFor:'querying'!
@@ -72,18 +65,12 @@
 	^ operations isEmpty
 ! !
 
-!MCPatch methodsFor:'ui'!
-
-browse
-	^ (MCPatchBrowser forPatch: self) show
-! !
-
 !MCPatch class methodsFor:'documentation'!
 
-version
-    ^ '$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.3 2011-08-20 11:41:27 cg Exp $'
 !
 
-version_CVS
-    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCPatch.st,v 1.2 2009-10-26 17:54:19 cg Exp $'
+version_SVN
+    ^ '§Id: MCPatch.st 5 2010-08-29 07:30:29Z vranyj1 §'
 ! !