author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 12 May 2015 01:07:30 +0100 | |
branch | jv |
changeset 999 | 679cac09d882 |
parent 635 | 85074a06c86b |
child 1003 | 0ebeea1cdeeb |
permissions | -rw-r--r-- |
268 | 1 |
"{ Package: 'stx:goodies/monticello' }" |
2 |
||
999
679cac09d882
Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
635
diff
changeset
|
3 |
"{ NameSpace: Smalltalk }" |
679cac09d882
Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
635
diff
changeset
|
4 |
|
268 | 5 |
MCVersionInfo subclass:#MCLazyVersionInfo |
6 |
instanceVariableNames:'ancestorsProps stepChildrenProps' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
635 | 9 |
category:'SCM-Monticello-St/X support' |
268 | 10 |
! |
11 |
||
12 |
||
13 |
!MCLazyVersionInfo class methodsFor:'instance creation'! |
|
14 |
||
15 |
withProperties: properties |
|
16 |
||
17 |
^self new initializeWithProperties: properties |
|
18 |
||
19 |
"Created: / 28-10-2010 / 15:34:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
20 |
! ! |
|
21 |
||
22 |
!MCLazyVersionInfo methodsFor:'accessing'! |
|
23 |
||
24 |
ancestors |
|
25 |
||
26 |
ancestors ifNil: |
|
27 |
[ancestorsProps ifNotNil: |
|
28 |
[ancestors := ancestorsProps collect:[:p|MCLazyVersionInfo withProperties:p]. |
|
29 |
ancestorsProps := nil]]. |
|
30 |
^super ancestors |
|
31 |
||
32 |
"Created: / 28-10-2010 / 17:51:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
33 |
! |
|
34 |
||
35 |
stepChildren |
|
36 |
||
37 |
stepChildren ifNil: |
|
38 |
[stepChildrenProps ifNotNil: |
|
39 |
[stepChildren := stepChildrenProps collect:[:p|MCLazyVersionInfo withProperties:p]. |
|
40 |
stepChildrenProps := nil]]. |
|
41 |
^super stepChildren |
|
42 |
||
43 |
"Created: / 28-10-2010 / 17:52:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
44 |
! ! |
|
45 |
||
46 |
!MCLazyVersionInfo methodsFor:'initialization'! |
|
47 |
||
48 |
initializeWithProperties: dict |
|
49 |
||
50 |
name:= (dict at: #name ifAbsent: ['']). |
|
51 |
id:= (UUID fromString: (dict at: #id)). |
|
52 |
message:= (dict at: #message ifAbsent: ['']). |
|
53 |
date:= ([Date fromString: (dict at: #date) ] on: Error do: [ :ex | ex return: nil ]). |
|
54 |
time:= ([ Time fromString:(dict at: #time)] on: Error do: [ :ex | ex return: nil ]). |
|
55 |
author:= (dict at: #author ifAbsent: ['']). |
|
56 |
||
999
679cac09d882
Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
635
diff
changeset
|
57 |
(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
|
58 |
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
|
59 |
ancestors := nil. |
679cac09d882
Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
635
diff
changeset
|
60 |
]. |
268 | 61 |
stepChildrenProps:= dict at: #stepChildren ifAbsent: [#()]. |
62 |
||
63 |
"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
|
64 |
"Modified: / 12-05-2015 / 01:05:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
268 | 65 |
! ! |
66 |
||
67 |
!MCLazyVersionInfo class methodsFor:'documentation'! |
|
68 |
||
69 |
version |
|
635 | 70 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCLazyVersionInfo.st,v 1.3 2012-09-11 21:22:41 cg Exp $' |
268 | 71 |
! |
72 |
||
73 |
version_CVS |
|
635 | 74 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCLazyVersionInfo.st,v 1.3 2012-09-11 21:22:41 cg Exp $' |
268 | 75 |
! |
76 |
||
999
679cac09d882
Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
635
diff
changeset
|
77 |
version_HG |
679cac09d882
Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
635
diff
changeset
|
78 |
|
679cac09d882
Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
635
diff
changeset
|
79 |
^ '$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
|
80 |
! |
679cac09d882
Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
635
diff
changeset
|
81 |
|
268 | 82 |
version_SVN |
83 |
^ '§Id: MCLazyVersionInfo.st 23 2010-10-29 14:41:24Z vranyj1 §' |
|
84 |
! ! |
|
999
679cac09d882
Fix in MCLazyVersionInfo: set ancestor instvar to nil when initializing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
635
diff
changeset
|
85 |