Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 12 May 2015 01:07:30 +0100
branchjv
changeset 999 679cac09d882
parent 998 85a0b8dca6aa
child 1000 dbc3a47007d6
Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing ...so lazy-loading of ancestry works.
MCLazyVersionInfo.st
--- a/MCLazyVersionInfo.st	Mon May 11 16:05:41 2015 +0100
+++ b/MCLazyVersionInfo.st	Tue May 12 01:07:30 2015 +0100
@@ -1,5 +1,7 @@
 "{ Package: 'stx:goodies/monticello' }"
 
+"{ NameSpace: Smalltalk }"
+
 MCVersionInfo subclass:#MCLazyVersionInfo
 	instanceVariableNames:'ancestorsProps stepChildrenProps'
 	classVariableNames:''
@@ -52,11 +54,14 @@
     time:= ([ Time fromString:(dict at: #time)] on: Error do: [ :ex | ex return: nil ]).
     author:= (dict at: #author ifAbsent: ['']).
 
-    ancestorsProps:= dict at: #ancestors ifAbsent:[#()].
+    (dict includesKey: #ancestors) ifTrue:[ 
+        ancestorsProps:= dict at: #ancestors.
+        ancestors := nil.
+    ].
     stepChildrenProps:= dict at: #stepChildren ifAbsent: [#()].
 
     "Created: / 28-10-2010 / 15:36:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 28-10-2010 / 17:49:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 12-05-2015 / 01:05:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !MCLazyVersionInfo class methodsFor:'documentation'!
@@ -69,6 +74,12 @@
     ^ '$Header: /cvs/stx/stx/goodies/monticello/MCLazyVersionInfo.st,v 1.3 2012-09-11 21:22:41 cg Exp $'
 !
 
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+!
+
 version_SVN
     ^ '§Id: MCLazyVersionInfo.st 23 2010-10-29 14:41:24Z vranyj1 §'
 ! !
+