MCVersionInfo.st
author Merge Script
Thu, 07 Apr 2016 07:08:20 +0200
branchjv
changeset 1009 e25edee0d1e7
parent 1004 e48adfaf3541
child 1109 4aad118c1257
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"{ Package: 'stx:goodies/monticello' }"
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
1003
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
     3
"{ NameSpace: Smalltalk }"
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
     4
2
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
MCAncestry subclass:#MCVersionInfo
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
	instanceVariableNames:'id name message date time author'
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
	classVariableNames:''
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	poolDictionaries:''
700
2f3535bb1260 category change
Claus Gittinger <cg@exept.de>
parents: 532
diff changeset
     9
	category:'SCM-Monticello-Versioning'
2
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
MCVersionInfo comment:'Adds to the record of ancestry, other identifying details.'
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
!MCVersionInfo class methodsFor:'as yet unclassified'!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
name: vName id: id message: message date: date time: time author: author ancestors: ancestors
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	^ self 
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
		name: vName
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
		id: id
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
		message: message
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
		date: date
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
		time: time
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
		author: author
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
		ancestors: ancestors
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
		stepChildren: #()
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
name: vName id: id message: message date: date time: time author: author ancestors: ancestors stepChildren: stepChildren
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
	^ self new
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
		initializeWithName: vName
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
		id: id
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
		message: message
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
		date: date
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
		time: time
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
		author: author
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
		ancestors: ancestors
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
		stepChildren: stepChildren
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
! !
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
!MCVersionInfo methodsFor:'accessing'!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
1003
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    44
inspector2TabAncestry
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    45
    <inspector2Tab>
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    46
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    47
    ^ (self newInspector2Tab)
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    48
        label:'Ancestry';
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    49
        priority:50;
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    50
        view: [
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    51
            | list view |
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    52
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    53
            list := PluggableHierarchicalList new.
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    54
            list childBlock: [ :parent | parent ancestors ].
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    55
            list labelBlock: [ :child | child name ].
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    56
            list root: self.
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    57
            view := ScrollableView for:HierarchicalListView.
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    58
            view useDefaultIcons: false.
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    59
            view list: list.
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    60
            view
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    61
        ];
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    62
        yourself
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    63
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    64
    "Created: / 07-09-2015 / 15:38:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    65
!
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
    66
2
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
message
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
	^ message ifNil: ['']
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
name
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
	^ name ifNil: ['<working copy>']
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
summary
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
	^ String streamContents:
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
		[:s |
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
		s
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
			nextPutAll: self summaryHeader; cr; cr;
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
			nextPutAll: self message.
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
		]
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
summaryHeader
466
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    85
        ^ String streamContents:
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    86
                [:s |
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    87
                s
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    88
                        nextPutAll: 'Name: '; nextPutAll: self name; cr.
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    89
                date ifNotNil:
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    90
                        [s
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    91
                                nextPutAll: 'Author: '; nextPutAll: author; cr;
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    92
                                nextPutAll: 'Time: '; nextPutAll:  date asString, ', ', time asString; cr].
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    93
                id ifNotNil:
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    94
                        [s nextPutAll: 'UUID: '; nextPutAll: id printString; cr].
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    95
                s
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    96
                        nextPutAll: 'Ancestors: '; nextPutAll: self ancestorString.
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    97
                self stepChildren isEmpty ifFalse:
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    98
                        [s cr; nextPutAll: 'Backported From: '; nextPutAll: self stepChildrenString].
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    99
                ]
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
   100
853af85b57c3 changed: #summaryHeader
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
   101
    "Modified: / 05-09-2011 / 09:07:31 / cg"
2
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
timeStamp
532
590f64057fea changed: #timeStamp
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
   105
    Smalltalk isSmalltalkX ifTrue:[
590f64057fea changed: #timeStamp
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
   106
        ^ Timestamp fromDate: date andTime: time
590f64057fea changed: #timeStamp
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
   107
    ].
590f64057fea changed: #timeStamp
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
   108
    ^ TimeStamp date: date time: time
590f64057fea changed: #timeStamp
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
   109
590f64057fea changed: #timeStamp
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
   110
    "Modified: / 02-12-2011 / 14:36:15 / cg"
2
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
timeString
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
	^ date asString, ', ', time asString
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
! !
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
!MCVersionInfo methodsFor:'comparing'!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
= other
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
	^ other species = self species
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
		and: [other hasID: id]
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
hash
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
	^ id hash
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
! !
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
!MCVersionInfo methodsFor:'converting'!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
asDictionary
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
	^ Dictionary new
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
		at: #name put: name;
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
		at: #id put: id;
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
		at: #message put: message;
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
		at: #date put: date;
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
		at: #time put: time;
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
		at: #author put: author;
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
		at: #ancestors put: (self ancestors collect: [:a | a asDictionary]);
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
		yourself
1004
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   140
!
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   141
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   142
fromLiteralArrayEncoding: encoding
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   143
    name := encoding at: 3.
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   144
    id := UUID fromString: (encoding at: 5).
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   145
    date := Date readFrom:(encoding at: 7) format: '%y-%m-%d'.
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   146
    time := Time readFrom:(encoding at: 9) format: '%H:%m:%s.%i'.
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   147
    author :=  encoding at: 11.
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   148
    message := (encoding at: 13) asStringWithSqueakLineEndings.     
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   149
    encoding size > 13 ifTrue:[
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   150
        ancestors := (encoding at: 15) collect:[ :e | e decodeAsLiteralArray ].
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   151
    ].
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   152
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   153
    "Created: / 07-09-2015 / 17:36:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   154
    "Modified: / 08-09-2015 / 00:02:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   155
!
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   156
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   157
literalArrayEncoding
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   158
    ^ self literalArrayEncodingWithAncestors: true
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   159
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   160
    "Created: / 07-09-2015 / 17:23:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   161
!
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   162
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   163
literalArrayEncodingWithAncestors: withAncestors
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   164
    | encoding |
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   165
    encoding := Array new: 13 + (withAncestors ifTrue:[2] ifFalse:[0]).
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   166
    encoding
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   167
        at: 1 put: MCVersionInfo name;
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   168
        at: 2 put: #name:; at: 3 put: name;
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   169
        at: 4 put: #id:; at: 5 put: id printString;
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   170
        at: 6 put: #date:; at: 7 put: (date printStringFormat:'%y-%m-%d');
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   171
        at: 8 put: #time:; at: 9 put: (time printStringFormat:'%H:%m:%s.%i');
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   172
        at:10 put: #author:; at: 11 put: author;
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   173
        at:12 put: #message:; at: 13 put: (message asStringWithNativeLineEndings).
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   174
    withAncestors ifTrue:[    
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   175
        encoding at:14 put: #ancestors:; at: 15 put: (withAncestors ifTrue:[self ancestors collect:[ :e|e literalArrayEncodingWithAncestors: withAncestors ] as: Array] ifFalse:[ #() ]).
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   176
    ].
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   177
    ^ encoding.
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   178
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   179
    "Created: / 07-09-2015 / 17:22:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   180
    "Modified: / 08-09-2015 / 00:00:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   181
!
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   182
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   183
literalArrayEncodingWithoutAncestors
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   184
    ^ self literalArrayEncodingWithAncestors: false
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   185
e48adfaf3541 Added support for ancestry splicemaps.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1003
diff changeset
   186
    "Created: / 07-09-2015 / 17:47:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
! !
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
!MCVersionInfo methodsFor:'initialize-release'!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
initializeWithName: vName id: aUUID message: aString date: aDate time: aTime author: initials ancestors: aCollection stepChildren: stepCollection
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
	name _ vName.
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
	id _ aUUID.
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
	message _ aString.
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
	date _ aDate.
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
	time _ aTime.
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
	author _ initials.
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
	ancestors _  aCollection.
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
	stepChildren _ stepCollection
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
! !
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
!MCVersionInfo methodsFor:'pillaging'!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
author
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
	^ author
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
date
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
	^ date
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
id
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
	^ id 
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
time
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
	^ time
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
! !
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
!MCVersionInfo methodsFor:'printing'!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
printOn: aStream
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
	super printOn: aStream.
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
	aStream nextPut: $(; nextPutAll: self name; nextPut: $)
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
	
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
! !
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
!MCVersionInfo methodsFor:'private'!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
hasID: aUUID
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
	^ id = aUUID
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
! !
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
!MCVersionInfo class methodsFor:'documentation'!
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
version
700
2f3535bb1260 category change
Claus Gittinger <cg@exept.de>
parents: 532
diff changeset
   237
    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCVersionInfo.st,v 1.4 2012-09-11 21:30:28 cg Exp $'
2
af9d766a7b67 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
! !
1003
0ebeea1cdeeb Added MCWorkingAncestry>>ancestors:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 700
diff changeset
   239