ChangeSet.st
changeset 3844 d404026a7a55
parent 3839 e16f2217fc74
child 3846 981cea119bc8
child 3856 f75fb195e35a
--- a/ChangeSet.st	Tue Apr 07 12:37:39 2015 +0200
+++ b/ChangeSet.st	Tue Apr 14 13:04:58 2015 +0200
@@ -841,23 +841,23 @@
     currentPackage := Class packageQuerySignal query.
 
     (reader := aReader) isNil ifTrue:[
-	reader := ChangeFileReader new.
+        reader := ChangeFileReader new.
     ].
 
     aStream isEncodedStream ifTrue:[
-	encodedStream := aStream
+        encodedStream := aStream
     ] ifFalse:[
-	aStream isPositionable ifTrue:[
-	    encodedStream := EncodedStream decodedStreamFor: aStream
-	] ifFalse:[
-	    encodedStream := EncodedStream stream: aStream encoder: CharacterEncoder nullEncoderInstance
-	].
+        aStream isPositionable ifTrue:[
+            encodedStream := EncodedStream decodedStreamFor: aStream
+        ] ifFalse:[
+            encodedStream := EncodedStream stream: aStream encoder: CharacterEncoder nullEncoderInstance
+        ].
     ].
     reportProgress := encodedStream stream isPositionable
-			and:[ ProgressNotification notNil
-			and:[ ProgressNotification isHandled ]].
+                        and:[ ProgressNotification notNil
+                        and:[ ProgressNotification isHandled ]].
     reportProgress ifTrue:[
-	size := encodedStream stream size.
+        size := encodedStream stream size.
     ].
 
     reader changeSet:aChangeSet.
@@ -865,99 +865,99 @@
     reader inputStream:encodedStream.
 
     [encodedStream atEnd] whileFalse:[
-	encodedStream skipSeparators.
-	lineNumber := encodedStream lineNumber.
-
-
-	reportProgress ifTrue:[
-	    pos := encodedStream position + 1.
-	    ProgressNotification notify: nil progress:(100 / size) * pos.
-	].
-
-	chunk := encodedStream nextChunk.
-
-	(chunk notEmptyOrNil) ifTrue:[
-	    Class nameSpaceQuerySignal handle:[:ex| ex proceedWith:currentNameSpace] do:[
-		Class packageQuerySignal handle:[:ex| ex proceedWith:currentPackage] do:[
-		    |parser tree ns pkg|
-
-		    parser := Parser for:chunk.
-		    "/ parser parseForCode.
-		    Parser parseErrorSignal handle:[:ex |
-			Transcript showCR:'ChangeSet: error while reading: ',ex description.
-			tree := #Error.
-		    ] do:[
-			tree := parser
-				parseExpressionWithSelf:nil
-				notifying:nil
-				ignoreErrors:true
-				ignoreWarnings:true
-				inNameSpace:currentNameSpace.
-		    ].
-		    tree ~~ #Error ifTrue:[
-			tree isNil ifTrue:[
-			    "/ Hmm....it could be package-definition chunk in extensions container...
-			    "/ if there is any package directive in there, extract it.
-			    ((pkg := parser currentPackage) notNil
-			    and:[pkg ~~ currentPackage]) ifTrue:[
-				currentPackage := pkg
-			    ] ifFalse:[
-				"/ if there is any nameSpace directive in there, extract it.
-				((ns := parser currentNameSpace) notNil
-				and:[ns ~~ currentNameSpace]) ifTrue:[
-				    currentNameSpace := ns
-				] ifFalse:[
-				    change := DoItChange new.
-				    change source:chunk.
-				    aBlock valueWithOptionalArgument:change and:lineNumber and:pos.
-				].
-			    ].
-			] ifFalse:[
-			    "/ if there is any nameSpace directive in there, extract it.
-			    ((ns := parser currentNameSpace) notNil
-			    and:[ns ~~ currentNameSpace]) ifTrue:[
-				currentNameSpace := ns
-			    ].
-			    "/ if there is any package directive in there, extract it.
-			    ((pkg := parser currentPackage) notNil
-			    and:[pkg ~~ currentPackage]) ifTrue:[
-				currentPackage := pkg
-			    ].
-			    "/
-			    "/ what type of chunk is this ...
-			    "/
-			    tree isConstant ifTrue:[
-				(s := tree evaluate) isString ifTrue:[
-				    (s startsWith:'---- ') ifTrue:[
-					reader inputStream: s readStream.
-					reader processInfo: s.
-					reader inputStream: encodedStream.
-				    ].
-				] ifFalse:[
-				    self error:'unexpected change-chunk' mayProceed:true
-				]
-			    ] ifFalse:[
-				tree isMessage ifTrue:[
-				    (reader
-					changesFromParseTree:tree
-					lineNumber:lineNumber
-					position:pos
-					chunk: chunk
-				    ) ifFalse:[
-					change := DoItChange new.
-					change source:chunk.
-					aBlock valueWithOptionalArgument:change and:lineNumber and:pos.
-				    ]
-				] ifFalse:[
-				    InvalidChangeChunkError
-					raiseRequestErrorString:('unexpected change-chunk i nor around line %1' bindWith:lineNumber)
-				]
-			    ]
-			]
-		    ]
-		]
-	    ]
-	]
+        encodedStream skipSeparators.
+        lineNumber := encodedStream lineNumber.
+
+
+        reportProgress ifTrue:[
+            pos := encodedStream position + 1.
+            ProgressNotification notify: nil progress:(100 / size) * pos.
+        ].
+
+        chunk := encodedStream nextChunk.
+
+        (chunk notEmptyOrNil) ifTrue:[
+            Class nameSpaceQuerySignal handle:[:ex| ex proceedWith:currentNameSpace] do:[
+                Class packageQuerySignal handle:[:ex| ex proceedWith:currentPackage] do:[
+                    |parser tree ns pkg|
+
+                    parser := Parser for:chunk.
+                    "/ parser parseForCode.
+                    Parser parseErrorSignal handle:[:ex |
+                        Transcript showCR:'ChangeSet: error while reading: ',ex description.
+                        tree := #Error.
+                    ] do:[
+                        tree := parser
+                                parseExpressionWithSelf:nil
+                                notifying:nil
+                                ignoreErrors:true
+                                ignoreWarnings:true
+                                inNameSpace:currentNameSpace.
+                    ].
+                    tree ~~ #Error ifTrue:[
+                        tree isNil ifTrue:[
+                            "/ Hmm....it could be package-definition chunk in extensions container...
+                            "/ if there is any package directive in there, extract it.
+                            ((pkg := parser currentPackage) notNil
+                            and:[pkg ~~ currentPackage]) ifTrue:[
+                                currentPackage := pkg
+                            ] ifFalse:[
+                                "/ if there is any nameSpace directive in there, extract it.
+                                ((ns := parser currentNameSpace) notNil
+                                and:[ns ~~ currentNameSpace]) ifTrue:[
+                                    currentNameSpace := ns
+                                ] ifFalse:[
+                                    change := DoItChange new.
+                                    change source:chunk.
+                                    aBlock valueWithOptionalArgument:change and:lineNumber and:pos.
+                                ].
+                            ].
+                        ] ifFalse:[
+                            "/ if there is any nameSpace directive in there, extract it.
+                            ((ns := parser currentNameSpace) notNil
+                            and:[ns ~~ currentNameSpace]) ifTrue:[
+                                currentNameSpace := ns
+                            ].
+                            "/ if there is any package directive in there, extract it.
+                            ((pkg := parser currentPackage) notNil
+                            and:[pkg ~~ currentPackage]) ifTrue:[
+                                currentPackage := pkg
+                            ].
+                            "/
+                            "/ what type of chunk is this ...
+                            "/
+                            tree isConstant ifTrue:[
+                                (s := tree evaluate) isString ifTrue:[
+                                    (s startsWith:'---- ') ifTrue:[
+                                        reader inputStream: s readStream.
+                                        reader processInfo: s.
+                                        reader inputStream: encodedStream.
+                                    ].
+                                ] ifFalse:[
+                                    self error:'unexpected change-chunk' mayProceed:true
+                                ]
+                            ] ifFalse:[
+                                tree isMessage ifTrue:[
+                                    (reader
+                                        changesFromParseTree:tree
+                                        lineNumber:lineNumber
+                                        position:pos
+                                        chunk: chunk
+                                    ) ifFalse:[
+                                        change := DoItChange new.
+                                        change source:chunk.
+                                        aBlock valueWithOptionalArgument:change and:lineNumber and:pos.
+                                    ]
+                                ] ifFalse:[
+                                    InvalidChangeChunkError
+                                        raiseRequestErrorString:('unexpected change-chunk in or around line %1' bindWith:lineNumber)
+                                ]
+                            ]
+                        ]
+                    ]
+                ]
+            ]
+        ]
     ].
 
     "
@@ -4340,7 +4340,7 @@
 !
 
 version_SVN
-    ^ '$Id: ChangeSet.st,v 1.260 2015-04-07 10:37:39 cg Exp $'
+    ^ '$Id: ChangeSet.st,v 1.261 2015-04-14 11:04:58 cg Exp $'
 ! !
 
 !ChangeSet::ClassSourceWriter::ClassInfo class methodsFor:'instance creation'!
@@ -5019,11 +5019,11 @@
 !ChangeSet class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ChangeSet.st,v 1.260 2015-04-07 10:37:39 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ChangeSet.st,v 1.261 2015-04-14 11:04:58 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/ChangeSet.st,v 1.260 2015-04-07 10:37:39 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ChangeSet.st,v 1.261 2015-04-14 11:04:58 cg Exp $'
 !
 
 version_HG
@@ -5032,5 +5032,6 @@
 !
 
 version_SVN
-    ^ '$Id: ChangeSet.st,v 1.260 2015-04-07 10:37:39 cg Exp $'
+    ^ '$Id: ChangeSet.st,v 1.261 2015-04-14 11:04:58 cg Exp $'
 ! !
+