MCLazyVersionInfo.st
author Claus Gittinger <cg@exept.de>
Mon, 09 Feb 2015 14:57:08 +0100
changeset 970 fa5b935ff989
parent 635 85074a06c86b
child 999 679cac09d882
child 1027 5e798b5ad58f
permissions -rw-r--r--
class: MCRepositoryBrowser added: #openOnRepository:forPackage: changed: #openOnPrimaryRepositoryForPackage:

"{ Package: 'stx:goodies/monticello' }"

MCVersionInfo subclass:#MCLazyVersionInfo
	instanceVariableNames:'ancestorsProps stepChildrenProps'
	classVariableNames:''
	poolDictionaries:''
	category:'SCM-Monticello-St/X support'
!


!MCLazyVersionInfo class methodsFor:'instance creation'!

withProperties: properties

    ^self new initializeWithProperties: properties

    "Created: / 28-10-2010 / 15:34:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!MCLazyVersionInfo methodsFor:'accessing'!

ancestors

    ancestors ifNil:
        [ancestorsProps ifNotNil:
            [ancestors := ancestorsProps collect:[:p|MCLazyVersionInfo withProperties:p].
            ancestorsProps := nil]].
    ^super ancestors

    "Created: / 28-10-2010 / 17:51:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

stepChildren

    stepChildren ifNil:
        [stepChildrenProps ifNotNil:
            [stepChildren := stepChildrenProps collect:[:p|MCLazyVersionInfo withProperties:p].
            stepChildrenProps := nil]].
    ^super stepChildren

    "Created: / 28-10-2010 / 17:52:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!MCLazyVersionInfo methodsFor:'initialization'!

initializeWithProperties: dict

    name:= (dict at: #name ifAbsent: ['']).
    id:= (UUID fromString: (dict at: #id)).
    message:= (dict at: #message ifAbsent: ['']).
    date:= ([Date fromString: (dict at: #date) ] on: Error do: [ :ex | ex return: nil ]).
    time:= ([ Time fromString:(dict at: #time)] on: Error do: [ :ex | ex return: nil ]).
    author:= (dict at: #author ifAbsent: ['']).

    ancestorsProps:= dict at: #ancestors ifAbsent:[#()].
    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>"
! !

!MCLazyVersionInfo class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCLazyVersionInfo.st,v 1.3 2012-09-11 21:22:41 cg Exp $'
!

version_CVS
    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCLazyVersionInfo.st,v 1.3 2012-09-11 21:22:41 cg Exp $'
!

version_SVN
    ^ '§Id: MCLazyVersionInfo.st 23 2010-10-29 14:41:24Z vranyj1 §'
! !