Fixed reading session change log (st.chg)
When reading session change log, do not preserve package not
namespace between records so methods won't be in package that
happens to be specified earlier. Esentially, make each change
recotd isolated. A change record is everything which is between
two '---- timestamp ----' entries.
--- a/ChangeSet.st Tue Apr 19 06:49:19 2016 +0200
+++ b/ChangeSet.st Tue Apr 26 23:04:08 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
@@ -840,13 +838,13 @@
The lineNumber is only valid, if the underlying stream
provides line-numbers; otherwise, nil is passed."
- |encodedStream chunk s change currentNameSpace currentPackage
+ |encodedStream chunk s change currentNameSpace currentPackage defaultPackage
lineNumber pos reader reportProgress size |
aStream isNil ifTrue:[^ self].
currentNameSpace := Smalltalk.
- currentPackage := Class packageQuerySignal query.
+ currentPackage := defaultPackage := Class packageQuerySignal query.
(reader := aReader) isNil ifTrue:[
reader := ChangeFileReader new.
@@ -937,6 +935,12 @@
tree isConstant ifTrue:[
(s := tree evaluate) isString ifTrue:[
(s startsWith:'---- ') ifTrue:[
+ (s startsWith:'---- timestamp') ifTrue:[
+ "/ Beginning of next record in changelog. Reset all
+ "/ previously set namespaces and packages
+ currentPackage := defaultPackage.
+ currentNameSpace := Smalltalk.
+ ].
reader inputStream: s readStream.
reader processInfo: s.
reader inputStream: encodedStream.
@@ -976,7 +980,7 @@
"Created: / 16-02-1998 / 12:19:34 / cg"
"Modified: / 30-07-2013 / 21:34:16 / cg"
- "Modified: / 14-03-2014 / 16:39:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 26-04-2016 / 22:52:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSet class methodsFor:'queries'!