MCLazyVersionInfo.st
author Jan Vrany <jan.vrany@labware.com>
Tue, 11 Jul 2023 12:59:07 +0100
branchjv
changeset 1174 f0a16c301971
parent 1095 87f223484bc3
permissions -rw-r--r--
Make `ProjectDefinition >> #monticelloTimestamps_code` an extension in `stx:goodies/monticello` ...and convert it to use (not so) new annotation-based extension mechanism.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1095
87f223484bc3 Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1003
diff changeset
     1
"{ Encoding: utf8 }"
87f223484bc3 Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1003
diff changeset
     2
268
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"{ Package: 'stx:goodies/monticello' }"
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
999
679cac09d882 Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 635
diff changeset
     5
"{ NameSpace: Smalltalk }"
679cac09d882 Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 635
diff changeset
     6
268
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
MCVersionInfo subclass:#MCLazyVersionInfo
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	instanceVariableNames:'ancestorsProps stepChildrenProps'
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
	classVariableNames:''
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
	poolDictionaries:''
635
85074a06c86b category change
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
    11
	category:'SCM-Monticello-St/X support'
268
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
!
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
!MCLazyVersionInfo class methodsFor:'instance creation'!
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
withProperties: properties
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
    ^self new initializeWithProperties: properties
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
    "Created: / 28-10-2010 / 15:34:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
! !
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
!MCLazyVersionInfo methodsFor:'accessing'!
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
ancestors
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
1003
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 999
diff changeset
    28
    ancestors isNil ifTrue:
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 999
diff changeset
    29
        [ancestorsProps notNil ifTrue:
268
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
            [ancestors := ancestorsProps collect:[:p|MCLazyVersionInfo withProperties:p].
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
            ancestorsProps := nil]].
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
    ^super ancestors
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
    "Created: / 28-10-2010 / 17:51:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1003
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 999
diff changeset
    35
    "Modified: / 07-09-2015 / 15:45:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
268
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
!
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
stepChildren
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
    stepChildren ifNil:
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
        [stepChildrenProps ifNotNil:
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
            [stepChildren := stepChildrenProps collect:[:p|MCLazyVersionInfo withProperties:p].
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
            stepChildrenProps := nil]].
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    ^super stepChildren
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    "Created: / 28-10-2010 / 17:52:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
! !
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
!MCLazyVersionInfo methodsFor:'initialization'!
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
initializeWithProperties: dict
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
    name:= (dict at: #name ifAbsent: ['']).
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    id:= (UUID fromString: (dict at: #id)).
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
    message:= (dict at: #message ifAbsent: ['']).
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
    date:= ([Date fromString: (dict at: #date) ] on: Error do: [ :ex | ex return: nil ]).
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    time:= ([ Time fromString:(dict at: #time)] on: Error do: [ :ex | ex return: nil ]).
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
    author:= (dict at: #author ifAbsent: ['']).
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
999
679cac09d882 Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 635
diff changeset
    60
    (dict includesKey: #ancestors) ifTrue:[ 
679cac09d882 Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 635
diff changeset
    61
        ancestorsProps:= dict at: #ancestors.
679cac09d882 Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 635
diff changeset
    62
        ancestors := nil.
679cac09d882 Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 635
diff changeset
    63
    ].
268
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
    stepChildrenProps:= dict at: #stepChildren ifAbsent: [#()].
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
    "Created: / 28-10-2010 / 15:36:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
999
679cac09d882 Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 635
diff changeset
    67
    "Modified: / 12-05-2015 / 01:05:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
268
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
! !
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
!MCLazyVersionInfo class methodsFor:'documentation'!
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
version
635
85074a06c86b category change
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
    73
    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCLazyVersionInfo.st,v 1.3 2012-09-11 21:22:41 cg Exp $'
268
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
!
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
version_CVS
635
85074a06c86b category change
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
    77
    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCLazyVersionInfo.st,v 1.3 2012-09-11 21:22:41 cg Exp $'
268
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
!
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
999
679cac09d882 Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 635
diff changeset
    80
version_HG
679cac09d882 Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 635
diff changeset
    81
679cac09d882 Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 635
diff changeset
    82
    ^ '$Changeset: <not expanded> $'
679cac09d882 Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 635
diff changeset
    83
!
679cac09d882 Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 635
diff changeset
    84
268
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
version_SVN
1095
87f223484bc3 Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents: 1003
diff changeset
    86
    ^ '§Id: MCLazyVersionInfo.st 23 2010-10-29 14:41:24Z vranyj1 §'
268
5778c85179ee initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
! !
999
679cac09d882 Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 635
diff changeset
    88