mcz files --> change sets for Squeak files since 2008? (was Re:
[squeak-dev] more archaeology)
Edgar J. De Cleene
edgardec2005 at gmail.com
Sun Nov 3 10:26:56 UTC 2013
Skipped content of type multipart/alternative-------------- next part --------------
'From Squeak4.4 of 10 October 2013 [latest update: #13254] on 3 November 2013 at 7:22:30 am'!
Object subclass: #MCPackageLoader
instanceVariableNames: 'requirements unloadableDefinitions obsoletions additions removals errorDefinitions provisions methodAdditions preamble '
classVariableNames: 'ChangeHIghUp '
poolDictionaries: ''
category: 'Monticello-Loading'!
!MCPackageLoader methodsFor: 'private' stamp: 'edc 2/13/2010 17:46'!
useChangeSetNamed: baseName during: aBlock
"Use the named change set, or create one with the given name."
| changeHolder oldChanges newChanges csName |
changeHolder := (ChangeSet respondsTo: #newChanges:)
ifTrue: [ChangeSet]
ifFalse: [Smalltalk].
oldChanges := (ChangeSet respondsTo: #current)
ifTrue: [ChangeSet current]
ifFalse: [Smalltalk changes].
self class changeHighestUpdate
ifTrue: [csName := (SystemVersion current highestUpdate + 1) asString , baseName.
newChanges := (ChangesOrganizer changeSetNamed: csName)
ifNil: [ChangeSet new name: csName].
changeHolder newChanges: newChanges.
[aBlock value]
ensure: [changeHolder newChanges: oldChanges].
SystemVersion current registerUpdate: SystemVersion current highestUpdate + 1]
ifFalse: [newChanges := (ChangesOrganizer changeSetNamed: baseName)
ifNil: [ChangeSet new name: baseName].
changeHolder newChanges: newChanges.
[aBlock value]
ensure: [changeHolder newChanges: oldChanges]]! !
!MCPackageLoader class methodsFor: 'as yet unclassified' stamp: 'edc 9/29/2009 12:03'!
changeHighestUpdate
" MCPackageLoader changeHighestUpdate"
"Whether change highestUpdate by default.
If true, logs to a file named after the configuration (config.nn.log).
If false, logs to the transcript."
<preference: 'Change SystemVersion current highestUpdate'
category: 'Monticello'
description: 'If true, each monticello package loaded rises the highestUpdate)'
type: #Boolean>
^ChangeHIghUp ifNil:[ChangeHIghUp := false].! !
!MCPackageLoader class methodsFor: 'as yet unclassified' stamp: 'edc 10/1/2009 16:29'!
setHighestUpdate: aBoolean
" MCPackageLoader togleHighestUpdate"
self changeHighestUpdate.
^ChangeHIghUp := aBoolean! !
!Utilities class methodsFor: 'fetching updates' stamp: 'edc 1/24/2013 09:12'!
updateFromServer
"Update the image by loading all pending updates from the server."
| config |
MCPackageLoader setHighestUpdate: true.
"Flush all caches. If a previous download failed this is often helpful"
MCFileBasedRepository flushAllCaches.
config := MCMcmUpdater updateFromDefaultRepository.
config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated].
"self setSystemVersionFromConfig: config."
self inform: ('Update completed.
Current update number: ' translated, SystemVersion current highestUpdate).
self updateFromServerCleanup.
MCPackageLoader setHighestUpdate: false.
self updateFromServerCleanup! !
!Utilities class methodsFor: 'fetching updates' stamp: 'edc 1/24/2013 09:11'!
updateFromServerCleanup
MCFileBasedRepository flushAllCaches.
MCDefinition clearInstances.
Smalltalk garbageCollect.
! !
Object subclass: #MCPackageLoader
instanceVariableNames: 'requirements unloadableDefinitions obsoletions additions removals errorDefinitions provisions methodAdditions preamble'
classVariableNames: 'ChangeHIghUp'
poolDictionaries: ''
category: 'Monticello-Loading'!
More information about the Squeak-dev
mailing list
|