core/MetacelloScriptEngine.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 10 Sep 2012 21:28:05 +0000
changeset 11 d354ac2af7ec
parent 10 fd87600067b8
child 14 f01fe37493e9
permissions -rw-r--r--
Metacello package refactoring - phase 2~
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11
d354ac2af7ec Metacello package refactoring - phase 2~
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
     1
"{ Package: 'stx:goodies/metacello/core' }"
1
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     2
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     3
Object subclass:#MetacelloScriptEngine
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     4
	instanceVariableNames:'root projectSpec options'
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     5
	classVariableNames:'DefaultRepositoryDescription DefaultVersionString'
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     6
	poolDictionaries:''
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     7
	category:'Metacello-Core-Scripts'
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     8
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
     9
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    10
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    11
!MetacelloScriptEngine class methodsFor:'defaults'!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    12
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    13
defaultRepositoryDescription
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    14
    DefaultRepositoryDescription
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    15
        ifNil: [ DefaultRepositoryDescription := MetacelloPlatform current defaultRepositoryDescription ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    16
    ^ DefaultRepositoryDescription
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    17
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    18
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    19
defaultVersionString
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    20
    DefaultVersionString ifNil: [ DefaultVersionString := #'stable' ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    21
    ^ DefaultVersionString
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    22
! !
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    23
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    24
!MetacelloScriptEngine class methodsFor:'utility'!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    25
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    26
baseNameOf: className
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    27
    ^ (className indexOfSubCollection: 'BaselineOf') = 0
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    28
        ifTrue: [ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    29
            (className indexOfSubCollection: 'ConfigurationOf') = 0
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    30
                ifTrue: [ className ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    31
                ifFalse: [ className copyFrom: 'ConfigurationOf' size + 1 to: className size ] ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    32
        ifFalse: [ className copyFrom: 'BaselineOf' size + 1 to: className size ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    33
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    34
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    35
baselineNameFrom: baseName
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    36
    "Return the fully-qualified configuration class name."
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    37
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    38
    ^ (baseName indexOfSubCollection: 'BaselineOf') > 0
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    39
        ifTrue: [ baseName ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    40
        ifFalse: [ 'BaselineOf' , baseName ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    41
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    42
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    43
baselineProjectNameOf: baselineClassName
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    44
    ^ (baselineClassName indexOfSubCollection: 'BaselineOf') = 0
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    45
        ifTrue: [ baselineClassName ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    46
        ifFalse: [ baselineClassName copyFrom: 'BaselineOf' size + 1 to: baselineClassName size ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    47
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    48
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    49
configurationNameFrom: baseName
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    50
    "Return the fully-qualified configuration class name."
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    51
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    52
    ^ (baseName indexOfSubCollection: 'ConfigurationOf') > 0
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    53
        ifTrue: [ baseName ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    54
        ifFalse: [ 'ConfigurationOf' , baseName ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    55
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    56
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    57
configurationProjectNameOf: configurationClassName
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    58
    ^ (configurationClassName indexOfSubCollection: 'ConfigurationOf') = 0
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    59
        ifTrue: [ configurationClassName ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    60
        ifFalse: [ configurationClassName copyFrom: 'ConfigurationOf' size + 1 to: configurationClassName size ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    61
! !
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    62
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    63
!MetacelloScriptEngine methodsFor:'accessing'!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    64
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    65
options
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    66
    options ifNil: [ options := Dictionary new ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    67
    ^ options
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    68
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    69
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    70
options: aDictionary
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    71
    options := aDictionary
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    72
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    73
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    74
projectName
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    75
    ^ self projectSpec name
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    76
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    77
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    78
projectSpec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    79
    ^ projectSpec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    80
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    81
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    82
projectSpec: aProjectSpec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    83
    projectSpec := aProjectSpec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    84
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    85
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    86
repositories
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    87
    ^ self projectSpec repositories
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    88
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    89
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    90
root
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    91
	^ root
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    92
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    93
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    94
root: anObject
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    95
	root := anObject
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    96
! !
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    97
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    98
!MetacelloScriptEngine methodsFor:'actions api'!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
    99
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   100
fetch: required
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   101
    self
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   102
        fetchRecord: [ :version | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   103
            required isEmpty
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   104
                ifTrue: [ version fetch ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   105
                ifFalse: [ version fetch: required ] ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   106
        required: required
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   107
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   108
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   109
fetchRecord: fetchRecordBlock required: required
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   110
    MetacelloProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   111
        copyRegistryWhile: [ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   112
            self
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   113
                handleNotificationsForAction: [ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   114
                    | version loadedSpec |
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   115
                    self validateProjectSpecForScript.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   116
                    [ loadedSpec := self lookupProjectSpecFor: self projectSpec ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   117
                        on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   118
                        do: [ :notification | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   119
                            notification
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   120
                                handleOnDownGrade: [ :ex :existing :new | ex allowEvenIfLocked ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   121
                                onUpgrade: [ :ex :existing :new | ex allowEvenIfLocked ] ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   122
                    version := loadedSpec versionForScriptEngine: self.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   123
                    self root: (fetchRecordBlock value: version) loadDirective ] ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   124
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   125
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   126
get
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   127
    " load a fresh copy from repo"
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   128
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   129
    | spec projectPackage |
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   130
    MetacelloProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   131
        copyRegistryRestoreOnErrorWhile: [ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   132
            self validateProjectSpecForScript.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   133
            spec := self projectSpec.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   134
            projectPackage := spec projectPackage.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   135
            projectPackage repositorySpecs do: [ :repoSpec | repoSpec createRepository flushForScriptGet ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   136
            projectPackage load.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   137
            self root: (Smalltalk at: spec className asSymbol) project.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   138
            MetacelloProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   139
                registrationForProjectSpec: spec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   140
                ifAbsent: [ :new | new registerProject ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   141
                ifPresent: [ :existing :new | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   142
                    existing
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   143
                        copyOnWrite: [ :existingCopy | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   144
                            spec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   145
                                copyForRegistration: existingCopy
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   146
                                onWrite: [ :specCopy | specCopy ifNil: [ existingCopy merge: new ] ifNotNil: [ specCopy mergeScriptRepository: spec ] ] ] ] ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   147
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   148
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   149
list
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   150
    self validateProjectSpecForScript.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   151
    self root: self projectSpec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   152
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   153
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   154
load: required
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   155
    self
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   156
        load: required
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   157
        onProjectDownGrade: [ :ex :existing :new | ex allowEvenIfLocked ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   158
        onProjectUpgrade: [ :ex :existing :new | ex allowEvenIfLocked ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   159
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   160
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   161
load: required onProjectDownGrade: onDownGradeBlock onProjectUpgrade: onUpgradeBlock
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   162
    MetacelloProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   163
        copyRegistryRestoreOnErrorWhile: [ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   164
            self
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   165
                handleNotificationsForAction: [ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   166
                    | version loadedSpec |
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   167
                    self validateProjectSpecForScript.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   168
                    [ loadedSpec := self lookupProjectSpecFor: self projectSpec ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   169
                        on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   170
                        do: [ :ex | ex handleOnDownGrade: onDownGradeBlock onUpgrade: onUpgradeBlock ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   171
                    version := loadedSpec versionForScriptEngine: self.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   172
                    self
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   173
                        root:
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   174
                            (required isEmpty
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   175
                                ifTrue: [ version load ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   176
                                ifFalse: [ version load: required ]) loadDirective.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   177
                    loadedSpec loads: required.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   178
                    MetacelloProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   179
                        registrationForProjectSpec: loadedSpec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   180
                        ifAbsent: [ :new | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   181
                            new
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   182
                                loadedInImage: true;
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   183
                                registerProject ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   184
                        ifPresent: [ :existing :new | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   185
                            existing
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   186
                                copyOnWrite: [ :existingCopy | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   187
                                    existingCopy
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   188
                                        loadedInImage: true;
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   189
                                        merge: new ] ] ] ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   190
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   191
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   192
lock
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   193
    | spec |
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   194
    MetacelloProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   195
        copyRegistryRestoreOnErrorWhile: [ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   196
            self validateProjectSpecForScript.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   197
            spec := self projectSpec.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   198
            MetacelloProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   199
                registrationForProjectSpec: spec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   200
                ifAbsent: [ :new | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   201
                    new
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   202
                        locked: true;
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   203
                        registerProject ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   204
                ifPresent: [ :existing :new | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   205
                    existing
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   206
                        copyOnWrite: [ :existingCopy | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   207
                            existingCopy locked: true.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   208
                            spec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   209
                                copyForRegistration: existingCopy
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   210
                                onWrite: [ :specCopy | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   211
                                    specCopy
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   212
                                        ifNil: [ existingCopy merge: new ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   213
                                        ifNotNil: [ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   214
                                            specCopy mergeScriptRepository: spec.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   215
                                            spec := specCopy ] ] ] ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   216
            self root: spec ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   217
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   218
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   219
record: required
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   220
    self
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   221
        fetchRecord: [ :version | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   222
            required isEmpty
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   223
                ifTrue: [ version record ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   224
                ifFalse: [ version record: required ] ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   225
        required: required
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   226
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   227
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   228
unlock
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   229
    | spec |
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   230
    MetacelloProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   231
        copyRegistryRestoreOnErrorWhile: [ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   232
            self validateProjectSpecForScript.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   233
            spec := self projectSpec.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   234
            MetacelloProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   235
                registrationForProjectSpec: spec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   236
                ifAbsent: [ :ignored |  ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   237
                ifPresent: [ :existing :new | existing copyOnWrite: [ :existingCopy | existingCopy locked: false ] ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   238
            self root: spec ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   239
! !
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   240
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   241
!MetacelloScriptEngine methodsFor:'defaults'!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   242
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   243
defaultRepositoryDescription
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   244
    ^ self class defaultRepositoryDescription
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   245
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   246
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   247
defaultVersionString
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   248
    ^ self class defaultVersionString
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   249
! !
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   250
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   251
!MetacelloScriptEngine methodsFor:'handlers'!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   252
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   253
handleConflict: exception
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   254
    ^ (self options at: #'onConflict' ifAbsent: [ ^ exception pass ])
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   255
        cull: exception
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   256
        cull: exception existingProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   257
        cull: exception newProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   258
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   259
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   260
handleDowngrade: exception
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   261
    ^ (self options at: #'onDowngrade' ifAbsent: [ ^ exception pass ])
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   262
        cull: exception
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   263
        cull: exception existingProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   264
        cull: exception newProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   265
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   266
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   267
handleEnsureProjectLoadedForDevelopment: exception
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   268
    "if useCurrentVersion resume with true, else resume with false"
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   269
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   270
    ^ exception resume: self useCurrentVersion
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   271
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   272
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   273
handleLookupBaselineSpecForEnsureLoad: exception
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   274
	"if existing and new don't compare equal, then ensure the new baseline is loaded"
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   275
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   276
	| existing new |
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   277
	new := exception projectSpec.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   278
	existing := self lookupBaselineSpecForEnsure: exception projectSpec.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   279
	^ exception resume: (existing registrationsCompareEqual: new) not
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   280
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   281
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   282
handleLookupProjectSpec: exception
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   283
    ^ exception
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   284
        resume:
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   285
            ((self lookupProjectSpecFor: exception projectSpec) ifNil: [ ^ exception resume: exception projectSpec ])
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   286
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   287
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   288
handleLookupProjectSpecForLoad: exception
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   289
    "if overrideProjectSpec is nil, use currentVersion in image, ignoreImage is false"
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   290
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   291
    | existing new override |
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   292
    existing := exception projectSpec.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   293
    override := self useCurrentVersion
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   294
        ifTrue: [ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   295
            "don't do lookup in registry if we expect to use the #currentVersion calculation"
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   296
            nil ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   297
        ifFalse: [ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   298
            new := self lookupProjectSpecFor: exception projectSpec.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   299
            (new compareEqual: existing)
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   300
                ifFalse: [ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   301
                    "counts as override, only if they differ in some aspect"
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   302
                    override := new ] ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   303
    ^ exception
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   304
        resume:
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   305
            (MetacelloProjectSpecForLoad new
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   306
                projectSpec: existing;
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   307
                useDetermineVersionForLoad: self useCurrentVersion;
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   308
                overrideProjectSpec: override;
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   309
                yourself)
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   310
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   311
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   312
handleNotificationsForAction: actionBlock
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   313
	[ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   314
	actionBlock
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   315
		on:
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   316
			MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad , MetacelloProjectSpecLoadedNotification
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   317
				, MetacelloScriptEnsureProjectLoadedForDevelopment , MetacelloLookupBaselineSpecForEnsureLoad
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   318
		do: [ :ex | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   319
			"lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications"
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   320
			ex handleResolutionFor: self ] ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   321
		on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade , MetacelloAllowConflictingProjectUpgrade
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   322
		do: [ :ex | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   323
			"option handlers need to be outermost set of handlers ... last line of defense before users are involved"
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   324
			ex handleResolutionFor: self ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   325
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   326
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   327
handleProjectSpecLoaded: exception
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   328
    MetacelloProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   329
        registrationForProjectSpec: exception projectSpec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   330
        ifAbsent: [ :new | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   331
            new
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   332
                loadedInImage: true;
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   333
                registerProject ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   334
        ifPresent: [ :existing :new | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   335
            "unconditionally merge new with existing (updates registration)"
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   336
            existing
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   337
                copyOnWrite: [ :existingCopy | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   338
                    existingCopy
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   339
                        loadedInImage: true;
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   340
                        merge: new ] ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   341
    exception resume
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   342
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   343
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   344
handleUpgrade: exception
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   345
    ^ (self options at: #'onUpgrade' ifAbsent: [ ^ exception pass ])
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   346
        cull: exception
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   347
        cull: exception existingProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   348
        cull: exception newProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   349
! !
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   350
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   351
!MetacelloScriptEngine methodsFor:'options'!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   352
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   353
cacheRepository
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   354
    ^ (MetacelloMCProject new repositorySpec description: (self options at: #'cacheRepository' ifAbsent: [ ^ nil ]))
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   355
        createRepository
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   356
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   357
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   358
ignoreImage
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   359
    ^ self options at: #'ignoreImage' ifAbsent: [ false ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   360
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   361
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   362
repositoryOverrides
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   363
    ^ (self options at: #'repositoryOverrides' ifAbsent: [ ^ nil ])
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   364
        collect: [ :description | (MetacelloMCProject new repositorySpec description: description) createRepository ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   365
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   366
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   367
silently
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   368
    ^ self options at: #'silently' ifAbsent: [ false ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   369
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   370
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   371
useCurrentVersion
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   372
    "private option used to implement the classic mode"
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   373
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   374
    ^ self options at: #'useCurrentVersion' ifAbsent: [ false ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   375
! !
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   376
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   377
!MetacelloScriptEngine methodsFor:'project lookup'!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   378
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   379
getBaselineProjectUnconditionalLoad: unconditionalLoad
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   380
    | project |
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   381
    project := (self getBaselineUnconditionalLoad: unconditionalLoad) project.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   382
    project version spec repositories: self repositories copy.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   383
    ^ project
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   384
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   385
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   386
getBaselineUnconditionalLoad: unconditionalLoad
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   387
    | spec |
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   388
    spec := self projectSpec.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   389
    Smalltalk
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   390
        at: spec className asSymbol
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   391
        ifPresent: [ :cl | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   392
            unconditionalLoad
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   393
                ifFalse: [ ^ cl ] ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   394
    (spec := self lookupProjectSpecFor: spec) projectPackage load.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   395
    ^ Smalltalk at: spec className asSymbol
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   396
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   397
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   398
getConfigurationProjectUnconditionalLoad: unconditionalLoad
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   399
    ^ (self getConfigurationUnconditionalLoad: unconditionalLoad) project
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   400
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   401
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   402
getConfigurationUnconditionalLoad: unconditionalLoad
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   403
    | spec |
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   404
    spec := self projectSpec.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   405
    Smalltalk
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   406
        at: spec className asSymbol
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   407
        ifPresent: [ :cl | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   408
            unconditionalLoad
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   409
                ifFalse: [ ^ cl ] ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   410
    (spec := self lookupProjectSpecFor: spec) projectPackage load.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   411
    ^ Smalltalk at: spec className asSymbol
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   412
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   413
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   414
lookupBaselineSpecForEnsure: aProjectSpec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   415
	| registration loadedSpec |
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   416
	registration := MetacelloProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   417
		registrationForProjectSpec: aProjectSpec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   418
		ifAbsent: [ :new | new ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   419
		ifPresent: [ :existing :new | existing ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   420
	^ registration lookupSpec: aProjectSpec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   421
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   422
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   423
lookupProjectSpecFor: aProjectSpec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   424
    | registration loadedSpec |
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   425
    registration := MetacelloProjectRegistration
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   426
        registrationForProjectSpec: aProjectSpec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   427
        ifAbsent: [ :new | new ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   428
        ifPresent: [ :existing :new | 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   429
            (existing hasLoadConflicts: new)
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   430
                ifTrue: [ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   431
                    ((existing canUpgradeTo: new)
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   432
                        ifTrue: [ MetacelloAllowProjectUpgrade new ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   433
                        ifFalse: [ 
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   434
                            (existing canDowngradeTo: new)
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   435
                                ifTrue: [ MetacelloAllowProjectDowngrade new ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   436
                                ifFalse: [ MetacelloAllowConflictingProjectUpgrade new ] ])
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   437
                        existingProjectRegistration: existing;
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   438
                        newProjectRegistration: new;
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   439
                        signal ]
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   440
                ifFalse: [ new ] ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   441
    ^ registration lookupSpec: aProjectSpec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   442
!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   443
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   444
validateProjectSpecForScript
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   445
    | issues |
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   446
    issues := self projectSpec
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   447
        validateForScriptLoad: self
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   448
        withDefaultVersionString: self defaultVersionString
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   449
        withDefaultRepositoryDecription: self defaultRepositoryDescription.
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   450
    issues isEmpty
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   451
        ifTrue: [ ^ self ].
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   452
    (MetacelloValidationFailure issues: issues message: 'Project spec validation failure') signal
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   453
! !
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   454
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   455
!MetacelloScriptEngine class methodsFor:'documentation'!
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   456
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   457
version_SVN
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   458
    ^ '$Id::                                                                                                                        $'
9e312de5f694 - Initial commit
jv
parents:
diff changeset
   459
! !