[Pkg] Monticello Public: Monticello.impl-kph.598.mcz
squeak-dev-noreply at lists.squeakfoundation.org
squeak-dev-noreply at lists.squeakfoundation.org
Sun Dec 7 03:55:20 UTC 2008
A new version of Monticello.impl was added to project Monticello Public:
http://www.squeaksource.com/mc/Monticello.impl-kph.598.mcz
==================== Summary ====================
Name: Monticello.impl-kph.598
Author: kph
Time: 7 December 2008, 3:55:07 am
UUID: d90892a8-1a6e-4f92-8538-89c684be78c9
Ancestors: Monticello.impl-kph.597
+ ok files support added
+ ancestry go back one menu item
+ removing old package loader support (since we use LPF)
=============== Diff against Monticello.impl-kph.597 ===============
Item was added:
+ ----- Method: MCSnapshotBrowser>>filesCategory (in category 'accessing') -----
+ filesCategory
+ ^ ':FILES'!
Item was added:
+ ----- Method: MCMczWriter>>writeFile: (in category 'files') -----
+ writeFile: definition
+
+ self addFile: definition pathToSnapshotFull at: definition pathToSnapshot
+
+ !
Item was changed:
MCDefinition subclass: #MCScriptDefinition
instanceVariableNames: 'script packageName properties'
classVariableNames: ''
poolDictionaries: ''
+ category: 'Monticello-Base-Modeling-Scripts'!
- category: 'Monticello-Base-Modeling'!
Item was changed:
----- Method: MCVersionInfo>>authorFromName (in category 'pillaging') -----
authorFromName
+ | authorTokens out |
- | authorTokens |
authorTokens := OrderedCollection new.
self nameAfterLastDashAsTokens do: [ : token |
token first isDigit ifFalse: [ authorTokens add: token ].
].
+ out := String streamContents: [:str |
+ authorTokens do: [ :ea | str nextPutAll: ea ; nextPut: $. ]
+ ].
+
+ ^ out allButLast
- ^ authorTokens reduce: [ :a :b | a , '.' , b ]
-
!
Item was added:
+ ----- Method: MCMczReader>>snapshot (in category 'as yet unclassified') -----
+ snapshot
+ snapshot ifNil: [self loadSnapshot].
+ ^ snapshot!
Item was changed:
----- Method: MCSnapshotBrowser>>classDefinitionString (in category 'text') -----
classDefinitionString
| defs |
+ defs := self packageClasses
+ detect: [ : ea | ea className = classSelection] ifNone: [ ^ 'This class is defined elsewhere.' ].
- defs := items select: [:ea | (ea isClassDefinition or: [ea isClassDefinitionExtension])
- and: [ea className = classSelection]].
-
- defs isEmpty ifTrue: [^ 'This class is defined elsewhere.'].
^ String streamContents: [:stream |
defs asArray sort
do: [:ea | ea printDefinitionAndCommentOn: stream]
separatedBy: [stream nextPut: $.; cr]
].!
Item was changed:
MCMethodDefinition subclass: #MCMethodBeforeCommitUnloadDefinition
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
+ category: 'Monticello-Base-Modeling-Methods'!
- category: 'Monticello-Base-Modeling'!
Item was changed:
----- Method: MCMethodBeforeCommitUnloadDefinition class>>isModelFor: (in category 'as yet unclassified') -----
+ isModelFor: selectorString
- isModelFor: selector
+ ^ selectorString beginsWith: 'mcOnUninstall' !
- ^ selector beginsWith: 'mcOnUninstall' !
Item was added:
+ ----- Method: MCFileDefinition>>summary (in category 'as yet unclassified') -----
+ summary
+ ^ ':FILE: ', self path , ' (' , self fileSize asString , ' bytes)'!
Item was added:
+ ----- Method: MCMczWriter>>writeFiles: (in category 'writing') -----
+ writeFiles: definitions
+
+ definitions ifNil: [ ^ self ].
+ definitions ifEmpty: [ ^self ].
+
+ definitions do: [ :ea | self writeFile: ea ].!
Item was added:
+ ----- Method: MCFileDefinition>>pathToOriginalFull (in category 'as yet unclassified') -----
+ pathToOriginalFull
+
+ ^ FileDirectory default fullNameFor: self path!
Item was added:
+ ----- Method: MCSnapshotBrowser>>selectedFileSource (in category 'text') -----
+ selectedFileSource
+
+ ^ (self fileDefinitions detect: [ :ea | ea path = classSelection ] ifNone: [ ^ 'file?' ]) source!
Item was changed:
----- Method: MCSnapshotBrowser>>visibleClasses (in category 'listing') -----
visibleClasses
+
+ categorySelection = self filesCategory ifTrue: [
+ ^ self fileDefinitions collect: #path
+ ].
+
^ categorySelection = self extensionsCategory
ifTrue: [self extensionClassNames]
ifFalse: [self packageClasses
select: [:ea | ea category = categorySelection]
thenCollect: [:ea | ea className]].!
Item was added:
+ ----- Method: MCPackageLoader1b>>loadFiles (in category 'private') -----
+ loadFiles!
Item was added:
+ ----- Method: MCWorkingCopyBrowser>>trimOldestAncestry (in category 'actions') -----
+ trimOldestAncestry
+ self pickAncestorVersionInfo ifNotNilDo:
+ [:ancestor |
+ workingCopy ancestry trimAfterVersionInfo: ancestor]!
Item was added:
+ ----- Method: MCFileDefinition>>uuid: (in category 'as yet unclassified') -----
+ uuid: id
+
+ ^ self propertyAt: #uuid put: id!
Item was added:
+ ----- Method: MCFileDefinition>>fileSize (in category 'as yet unclassified') -----
+ fileSize
+
+ ^ self propertyAt: #fileSize ifAbsent: [ ]!
Item was changed:
----- Method: MCSnapshotReader>>snapshot (in category 'as yet unclassified') -----
snapshot
+ snapshot ifNil: [self loadSnapshot].
+ ^ snapshot!
- ^ MCSnapshot fromDefinitions: self definitions!
Item was added:
+ ----- Method: MCMiscDefinition>>accept: (in category 'as yet unclassified') -----
+ accept: writer!
Item was added:
+ ----- Method: MCPackageLoader class>>newCurrent (in category 'as yet unclassified') -----
+ newCurrent
+
+ ^ (self theChosenLoaderClass basicNew) initialize; yourself!
Item was changed:
----- Method: MCSnapshotBrowser>>allClassNames (in category 'accessing') -----
allClassNames
^ (items
+ select: [:ea | ea isOrganizationDefinition not and: [ ea isFileDefinition not ]]
- select: [:ea | ea isOrganizationDefinition not]
thenCollect: [:ea | ea className]) asSet.
!
Item was added:
+ ----- Method: MCFileDefinition>>description (in category 'as yet unclassified') -----
+ description
+ ^ Array with: self fileSize with: self path!
Item was added:
+ ----- Method: MCMczReader>>extractFileFrom: (in category 'as yet unclassified') -----
+ extractFileFrom: member
+
+ definitions add: (MCFileDefinition new
+ path: member fileName;
+ uuid: ((member fileName readStream upTo: $/; yourself) upTo: $/);
+ fileSize: member uncompressedSize;
+ yourself)!
Item was added:
+ ----- Method: MCFileDefinition>>unload (in category 'as yet unclassified') -----
+ unload
+
+ FileDirectory default deleteFileNamed: self pathToOriginalFull !
Item was changed:
MCScriptDefinition subclass: #MCRemovalPreambleDefinition
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
+ category: 'Monticello-Base-Modeling-Scripts'!
- category: 'Monticello-Base-Modeling'!
Item was changed:
----- Method: MCPackage>>snapshot (in category 'as yet unclassified') -----
snapshot
+
| definitions categories packageInfo |
packageInfo := self packageInfo.
definitions := OrderedCollection new.
categories := packageInfo systemCategories.
definitions addAll: (self orphanage orphansFor: packageInfo).
definitions removeAllFoundIn: self orphanage unlinkedClasses.
categories isEmpty ifFalse: [ definitions add: (MCOrganizationDefinition categories: categories) ].
packageInfo
classesDo: [:ea | definitions addAll: ea classDefinitions]
methodsDo: [:ea | definitions add: ea asMethodDefinition]
displayingProgress: 'Snapshotting...'.
MCScriptDefinition subclassesDo: [ :ea | ea from: packageInfo addTo: definitions ].
+
+ MCFileDefinition from: packageInfo addTo: definitions.
+
+ ^ MCSnapshot fromDefinitions: definitions
+ !
-
- ^ MCSnapshot fromDefinitions: definitions
- !
Item was changed:
----- Method: MCSnapshot>>install (in category 'loading') -----
install
+ (MCPackageLoader newCurrent)
- (MCPackageLoader new)
installSnapshot: self;
installOrphanage;
load!
Item was changed:
SystemOrganization addCategory: #'Monticello-Base'!
SystemOrganization addCategory: #'Monticello-Base-Chunk Format'!
SystemOrganization addCategory: #'Monticello-Base-Loading'!
SystemOrganization addCategory: #'Monticello-Base-Merging'!
SystemOrganization addCategory: #'Monticello-Base-Modeling'!
SystemOrganization addCategory: #'Monticello-Orphanage'!
SystemOrganization addCategory: #'Monticello-Base-Patching'!
SystemOrganization addCategory: #'Monticello-Base-Repositories'!
SystemOrganization addCategory: #'Monticello-Base-Storing'!
SystemOrganization addCategory: #'Monticello-UI-Repository'!
SystemOrganization addCategory: #'Monticello-Base-Versioning'!
- SystemOrganization addCategory: #'Monticello-Files'!
SystemOrganization addCategory: #'Monticello-Configurations'!
SystemOrganization addCategory: #'Monticello-UI-Browsers'!
SystemOrganization addCategory: #'Monticello-UI'!
+ SystemOrganization addCategory: #'Monticello-Base-Modeling-Methods'!
+ SystemOrganization addCategory: #'Monticello-Base-Modeling-Scripts'!
+ SystemOrganization addCategory: #'Monticello-Mocks'!
Item was changed:
----- Method: MCMethodBeforeCommitLoadDefinition class>>isModelFor: (in category 'as yet unclassified') -----
+ isModelFor: selectorString
- isModelFor: selector
+ ^ selectorString beginsWith: 'mcOnInstall' !
- ^ selector beginsWith: 'mcOnInstall' !
Item was changed:
----- Method: MCSnapshot>>updatePackage: (in category 'loading') -----
updatePackage: aPackage
+ (MCPackageLoader newCurrent)
- (MCPackageLoader new)
updatePackage: aPackage withSnapshot: self;
installOrphanage;
load
!
Item was added:
+ ----- Method: MCFileDefinition>>realize (in category 'as yet unclassified') -----
+ realize
+
+ | f1 f2 |
+ f1 := self pathToOriginalFull.
+
+ self fileSize: (FileDirectory on: f1) directoryEntry fileSize.
+
+ f2 := self pathToSnapshotFull.
+ (FileDirectory on: f2) containingDirectory assureExistence.
+
+ FileDirectory default deleteFileNamed: f2.
+
+ FileDirectory default copyFileNamed: f1
+ toFileNamed: f2.!
Item was added:
+ ----- Method: MCFileDefinition>>source (in category 'as yet unclassified') -----
+ source
+
+ | fs |
+
+ fs := self class cacheDir oldFileNamed: self pathToSnapshot.
+
+ [ ^ fs next: 1000 ] ensure: [ fs close ]!
Item was added:
+ ----- Method: MCFileDefinition>>install (in category 'as yet unclassified') -----
+ install
+
+ FileDirectory default copyFileNamed: self pathToSnapshotFull toFileNamed: self pathToOriginalFull!
Item was changed:
----- Method: MCPatchBrowser>>revertSelection (in category 'as yet unclassified') -----
revertSelection
| loader |
selection ifNotNil:
+ [loader := MCPackageLoader newCurrent.
- [loader := MCPackageLoader new.
selection inverse applyTo: loader.
loader loadWithName: self changeSetNameForInstall ]!
Item was changed:
----- Method: MCPackageLoader1b>>loadComplete (in category 'private') -----
loadComplete
MCMethodDefinition tidyCache.
self orphanage
addOrphans: unloadableDefinitions;
addOrphans: errorDefinitions;
loadComplete.
+ Behavior flushObsoleteSubclasses.
+ self loadFiles.!
- Behavior flushObsoleteSubclasses.!
Item was changed:
----- Method: MCMerger>>loadWithNameLike: (in category 'as yet unclassified') -----
loadWithNameLike: baseName
| loader |
+ loader := MCPackageLoader newCurrent.
- loader := MCPackageLoader new.
loader provisions addAll: self provisions.
self applyTo: loader.
loader loadWithNameLike: baseName!
Item was changed:
MCScriptDefinition subclass: #MCRemovalPostscriptDefinition
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
+ category: 'Monticello-Base-Modeling-Scripts'!
- category: 'Monticello-Base-Modeling'!
Item was changed:
----- Method: MCScriptDefinition>>installScript: (in category 'as yet unclassified') -----
installScript: aString
+
+ self packageInfo propertyAt: self scriptSelector put: aString.
+ !
- | sel pi |
- sel := (self scriptSelector, ':') asSymbol.
- pi := self packageInfo.
- (pi respondsTo: sel)
- ifTrue: [pi perform: sel with: aString]!
Item was added:
+ ----- Method: MCFileDefinition class>>cacheDir (in category 'as yet unclassified') -----
+ cacheDir
+
+ ^ FileDirectory default directoryNamed: 'package-cache'!
Item was added:
+ MCDefinition subclass: #MCMiscDefinition
+ instanceVariableNames: 'properties'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Monticello-Base-Modeling-Scripts'!
Item was added:
+ ----- Method: MCFileDefinition>>evaluate (in category 'as yet unclassified') -----
+ evaluate
+ self error!
Item was added:
+ ----- Method: MCFileDefinition>>script (in category 'as yet unclassified') -----
+ script
+
+ self error!
Item was changed:
----- Method: MCMczWriter>>writeDefinitions: (in category 'visiting') -----
writeDefinitions: aVersion
+ self writeSnapshot: aVersion snapshot.
+ !
- self writeSnapshot: aVersion snapshot!
Item was changed:
----- Method: MCPackageManager class>>methodModified: (in category 'system changes') -----
methodModified: anEvent
^self managersForClass: anEvent itemClass selector: anEvent itemSelector do:[:mgr| mgr modified: true].!
Item was added:
+ ----- Method: MCWorkingCopyBrowser>>ancestryGoBackOne (in category 'actions') -----
+ ancestryGoBackOne
+
+ (self notify: 'are you sure you want to discard the most recent history entry').
+
+ workingCopy ancestry ancestors in: [ :a | a at: 1 put: a first ancestors first ].
+
+ self workingCopyListChanged.!
Item was changed:
----- Method: MCMczReader>>loadDefinitions (in category 'as yet unclassified') -----
loadDefinitions
+ definitions := self snapshot definitions!
- definitions := OrderedCollection new.
- (self zip memberNamed: 'snapshot.bin') ifNotNilDo:
- [:m | [^ definitions := (DataStream on: m contentStream) next definitions]
- on: Error do: [:fallThrough | self halt ]].
- "otherwise"
- (self zip membersMatching: 'snapshot/*')
- do: [:m | self extractDefinitionsFrom: m].
- !
Item was changed:
----- Method: MCMczWriter>>writeVersion: (in category 'visiting') -----
writeVersion: aVersion
self writeFormat.
self writePackage: aVersion package.
self writeVersionInfo: aVersion info.
self writeDefinitions: aVersion.
+ aVersion dependencies do: [:ea | self writeVersionDependency: ea].
+ self writeFiles: (aVersion snapshot definitions select: [ :ea | ea isFileDefinition ]).
+ !
- aVersion dependencies do: [:ea | self writeVersionDependency: ea]!
Item was added:
+ ----- Method: MCFileDefinition>>uuid (in category 'as yet unclassified') -----
+ uuid
+
+ ^ self propertyAt: #uuid ifAbsent: [ self uuid: UUID new ]!
Item was changed:
----- Method: MCPatchBrowser>>installSelection (in category 'as yet unclassified') -----
installSelection
| loader |
selection ifNotNil:
+ [loader := MCPackageLoader newCurrent.
- [loader := MCPackageLoader new.
selection applyTo: loader.
loader loadWithName: self changeSetNameForInstall ]!
Item was changed:
----- Method: MCMethodUnloaderDefinition class>>isModelFor: (in category 'as yet unclassified') -----
+ isModelFor: selectorString
- isModelFor: selector
+ ^ selectorString = 'unload' !
- ^ selector = #unload !
Item was added:
+ ----- Method: MCFileDefinition>>initializeWithPath:packageName: (in category 'as yet unclassified') -----
+ initializeWithPath: aString packageName: packageString
+ self path:aString.
+ "packageName := packageString"!
Item was added:
+ ----- Method: MCSnapshotBrowser>>fileDefinitions (in category 'accessing') -----
+ fileDefinitions
+ ^ items select: [:ea | ea isFileDefinition ]!
Item was changed:
----- Method: MCFileBasedRepository class>>flushAllCaches (in category 'as yet unclassified') -----
flushAllCaches
+ self allSubInstancesDo: [:ea | ea flushCache].
+ MCFileDefinition freeSomeSpace.!
- self allSubInstancesDo: [:ea | ea flushCache]!
Item was changed:
----- Method: MCWorkingCopy>>backportChangesTo: (in category 'operations') -----
backportChangesTo: aVersionInfo
| baseVersion fullPatch currentVersionInfo currentVersion newSnapshot newAncestry |
currentVersionInfo := self currentVersionInfo.
baseVersion := self repositoryGroup versionWithInfo: aVersionInfo.
currentVersion := self repositoryGroup versionWithInfo: currentVersionInfo.
fullPatch := currentVersion snapshot patchRelativeToBase: baseVersion snapshot.
(MCChangeSelectionRequest new
patch: fullPatch;
label: 'Changes to Backport';
signal ) ifNotNilDo:
[:partialPatch |
newSnapshot := MCPatcher apply: partialPatch to: baseVersion snapshot.
newAncestry := MCWorkingAncestry new
addAncestor: aVersionInfo;
addStepChild: currentVersionInfo;
yourself.
+ (MCPackageLoader newCurrent)
- (MCPackageLoader new)
updatePackage: package withSnapshot: newSnapshot;
installOrphanage.
ancestry := newAncestry.
self modified: false; modified: true]!
Item was changed:
----- Method: MCSnapshotBrowser>>loadMethodSelection (in category 'menus') -----
loadMethodSelection
methodSelection ifNil: [ ^self ].
+ (MCPackageLoader1b new)
- (MCPackageLoader new)
addDefinition: methodSelection;
load!
Item was added:
+ ----- Method: MCMczWriter>>addFile:at: (in category 'writing') -----
+ addFile: aFile at: path
+
+ (zip addFile: aFile as: path) desiredCompressionMethod: ZipArchive compressionDeflated
+ !
Item was changed:
----- Method: MCWorkingCopy>>myMenu:inBrowser: (in category 'menu') -----
myMenu: aMenu inBrowser: browser
browser fillMenu: aMenu fromSpecs:
#(
('add required package' #addRequiredPackage)
('clear required packages' #clearRequiredPackages)
('add repository...' #addPackageRepository)
"('browse package' #browseWorkingCopy)
('view changes' #viewChanges)
('view history' #viewHistory)"
('recompile package' #recompilePackage)
('recompile all packages' #recompileAllPackages)
('memory use for all packages' #viewMemoryUseAll)
('memory use' #viewMemoryUse)
('revert package...' #revertPackage)
('unload package code' #unloadPackage)
('trim ancestry' #trimAncestry)
+ ('ancestry go back one' #ancestryGoBackOne)
('remove package name from list' #deleteWorkingCopy)
('explore working copy' #exploreWorkingCopy)
).
(Smalltalk includesKey: #SARMCPackageDumper) ifTrue: [
aMenu add: 'make SAR' target: self selector: #fileOutAsSAR
].
^ aMenu
!
Item was changed:
MCMethodDefinition subclass: #MCMethodBeforeCommitLoadDefinition
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
+ category: 'Monticello-Base-Modeling-Methods'!
- category: 'Monticello-Base-Modeling'!
!MCMethodBeforeCommitLoadDefinition commentStamp: 'kph 5/30/2007 16:20' prior: 0!
MCMethodSpecialActionDefinition
!
Item was changed:
MCMethodDefinition subclass: #MCMethodUnloaderDefinition
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
+ category: 'Monticello-Base-Modeling-Methods'!
- category: 'Monticello-Base-Modeling'!
Item was added:
+ ----- Method: MCFileDefinition>>path: (in category 'as yet unclassified') -----
+ path: p
+
+ ^ self propertyAt: #path put: p!
Item was changed:
----- Method: MCSnapshotBrowser>>text (in category 'text') -----
text
self switchIsComment ifTrue: [^ self classCommentString].
methodSelection ifNotNil: [^ methodSelection source].
protocolSelection ifNotNil: [^ ''].
+ categorySelection = self filesCategory ifTrue: [ ^ self selectedFileSource ].
classSelection ifNotNil: [^ self classDefinitionString].
+
^ ''!
Item was added:
+ ----- Method: MCFileDefinition>>pathToSnapshotFull (in category 'as yet unclassified') -----
+ pathToSnapshotFull
+
+ ^ self class cacheDir fullNameFor: self pathToSnapshot
+
+ !
Item was added:
+ ----- Method: MCFileDefinition class>>freeSomeSpace (in category 'as yet unclassified') -----
+ freeSomeSpace
+
+ | dir |
+ dir := self cacheDir directoryNamed: 'files'.
+ dir exists ifTrue: [ dir recursiveDelete ].!
Item was changed:
MCMethodDefinition subclass: #MCMethodAfterRemovalActionDefinition
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
+ category: 'Monticello-Base-Modeling-Methods'!
- category: 'Monticello-Base-Modeling'!
Item was changed:
MCMethodDefinition subclass: #MCMethodExternalFieldDefinition
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
+ category: 'Monticello-Base-Modeling-Methods'!
- category: 'Monticello-Base-Modeling'!
Item was added:
+ ----- Method: MCMczReader>>loadSnapshot (in category 'as yet unclassified') -----
+ loadSnapshot
+ (self zip memberNamed: 'snapshot.bin') ifNotNilDo:
+ [:m | [^ snapshot := (DataStream on: m contentStream) next ]
+ on: Error do: [:fallThrough | self halt ]].
+
+ "otherwise"
+ (self zip membersMatching: 'snapshot/*')
+ do: [:m | self extractDefinitionsFrom: m].
+
+ (self zip membersMatching: 'files/*')
+ do: [:m | self extractFileFrom: m].
+ !
Item was changed:
----- Method: MCMethodAfterRemovalActionDefinition class>>isModelFor: (in category 'as yet unclassified') -----
+ isModelFor: selectorString
- isModelFor: selector
+ ^ selectorString beginsWith: 'mcAfterRemoval' !
- ^ selector beginsWith: 'mcAfterRemoval' !
Item was changed:
----- Method: MCMethodInitializerDefinition class>>isModelFor: (in category 'as yet unclassified') -----
+ isModelFor: selectorString
- isModelFor: selector
+ ^ selectorString = 'initialize' or: [ selectorString beginsWith: 'mcAfterInstall' ] !
- ^ selector = 'initialize' or: [ selector beginsWith: 'mcAfterInstall' ] !
Item was changed:
MCScriptDefinition subclass: #MCPreambleDefinition
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
+ category: 'Monticello-Base-Modeling-Scripts'!
- category: 'Monticello-Base-Modeling'!
Item was changed:
----- Method: MCScriptDefinition>>preloadOver: (in category '') -----
preloadOver: aDefinition
super preloadOver: aDefinition.
+ self installScript!
- self load!
Item was added:
+ ----- Method: MCFileDefinition>>sortKey (in category 'as yet unclassified') -----
+ sortKey
+
+ ^ self summary!
Item was changed:
----- Method: MCDefinition>>load (in category 'installing') -----
load
+
+ self preloadOver: nil.
+ self install.
+ self postinstall.
+ self postloadOver: nil.!
- !
Item was changed:
MCDefinition subclass: #MCMethodDefinition
instanceVariableNames: 'classIsMeta source category selector className timeStamp properties dummy1 dummy2 methodAndNode requestor compiledMethod priorMethodOrNil compiledSelector isInstalled priorMethodCategory theClass defnToInstall'
classVariableNames: 'Definitions'
poolDictionaries: ''
+ category: 'Monticello-Base-Modeling-Methods'!
- category: 'Monticello-Base-Modeling'!
Item was changed:
----- Method: MCSnapshotBrowser>>loadClassSelectionDefinition (in category 'listing') -----
loadClassSelectionDefinition
| classDefinition |
classSelection ifNil: [ ^self ].
classDefinition := items
detect: [ :defn | defn isClassDefinition and: [ defn className = classSelection ] ].
+ (MCPackageLoader newCurrent)
- (MCPackageLoader new)
addDefinition: classDefinition;
load
!
Item was added:
+ ----- Method: MCMczReader>>loadFiles (in category 'files') -----
+ loadFiles
+
+ | dir |
+
+ dir := MCFileDefinition cacheDir.
+
+ ^ (self zip membersMatching: 'files/*') collect: [:m | m extractInDirectory: dir. m localFileName ].
+ !
Item was changed:
----- Method: MCWorkingCopy>>unload (in category 'operations') -----
unload
+ MCPackageLoader newCurrent unloadPackage: self package.
- MCPackageLoader new unloadPackage: self package.
self unregister.!
Item was changed:
----- Method: MCMethodExternalFieldDefinition class>>isModelFor: (in category 'as yet unclassified') -----
+ isModelFor: selectorString
- isModelFor: selector
+ ^ selectorString = 'fields'!
- ^ selector = 'fields'!
Item was changed:
MCScriptDefinition subclass: #MCPostscriptDefinition
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
+ category: 'Monticello-Base-Modeling-Scripts'!
- category: 'Monticello-Base-Modeling'!
Item was changed:
----- Method: MCMczReader>>loadPackage (in category 'as yet unclassified') -----
loadPackage
| dict |
+
dict := self parseMember: 'package'.
package := MCPackage named: (dict at: #name)!
Item was changed:
----- Method: MCSnapshotBrowser>>visibleCategories (in category 'listing') -----
visibleCategories
+ | cl |
+ cl := (self packageClasses collect: [:ea | ea category])
+ asSet asSortedCollection
+ add: self extensionsCategory;
+ yourself.
+
+ self fileDefinitions size > 0 ifTrue: [ cl add: self filesCategory ].
+
+ ^ cl!
- ^ (self packageClasses collect: [:ea | ea category])
- asSet asSortedCollection add: self extensionsCategory; yourself.!
Item was added:
+ MCMiscDefinition subclass: #MCFileDefinition
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Monticello-Base-Modeling-Scripts'!
+
+ !MCFileDefinition commentStamp: 'kph 12/6/2008 02:59' prior: 0!
+ Although we are not strictly a Script, we have similar loading behaviour!
Item was added:
+ ----- Method: MCFileDefinition>>path (in category 'as yet unclassified') -----
+ path
+
+ ^ self propertyAt: #path ifAbsent: [ ]!
Item was added:
+ ----- Method: MCMczReader>>basicVersion (in category 'as yet unclassified') -----
+ basicVersion
+
+ | v |
+
+ v := super basicVersion.
+
+ self loadFiles.
+
+ ^ v !
Item was added:
+ ----- Method: MCFileDefinition>>edLoad: (in category 'as yet unclassified') -----
+ edLoad: editor
+
+ FileDirectory default copyFileNamed: self pathToSnapshotFull toFileNamed: self pathToOriginalFull!
Item was added:
+ ----- Method: MCPackageLoader2>>loadFiles (in category 'private') -----
+ loadFiles
+ MCMethodDefinition tidyCache.
+ self orphanage
+ addOrphans: unloadableDefinitions;
+ addOrphans: errorDefinitions;
+ loadComplete.
+ !
Item was added:
+ ----- Method: MCFileDefinition>>fileSize: (in category 'as yet unclassified') -----
+ fileSize: n
+
+ ^ self propertyAt: #fileSize put: n!
Item was added:
+ ----- Method: MCFileDefinition>>pathToSnapshot (in category 'as yet unclassified') -----
+ pathToSnapshot
+
+ ^ 'files/' , self uuid asString, '/', self path.
+
+ !
Item was changed:
----- Method: MCMerger>>load (in category 'as yet unclassified') -----
load
| loader |
+ loader := MCPackageLoader newCurrent.
- loader := MCPackageLoader new.
loader provisions addAll: self provisions.
self applyTo: loader.
loader load!
Item was added:
+ ----- Method: MCFileDefinition>>installScript (in category 'as yet unclassified') -----
+ installScript
+
+ self error!
Item was added:
+ ----- Method: MCFileDefinition class>>from:addTo: (in category 'as yet unclassified') -----
+ from: aPackageInfo addTo: definitions
+
+ | trim |
+
+ trim := FileDirectory default fullName size + 1.
+
+ ^ aPackageInfo externalFiles collect: [ :aFD |
+ definitions add: (self path: (aFD fullName allButFirst: trim) packageName: aPackageInfo name) realize ].
+
+ !
Item was added:
+ ----- Method: MCDefinition>>isFileDefinition (in category 'testing') -----
+ isFileDefinition
+
+ ^ false!
Item was changed:
----- Method: MCMczWriter>>serializeInBinary: (in category 'serializing') -----
+ serializeInBinary: anObject
- serializeInBinary: aSnapshot
| writer s |
s := RWBinaryOrTextStream on: String new.
writer := DataStream on: s.
+ writer nextPut: anObject.
- writer nextPut: aSnapshot.
^ s contents!
Item was changed:
MCVersionReader subclass: #MCMczReader
+ instanceVariableNames: 'zip snapshot infoCache'
- instanceVariableNames: 'zip infoCache'
classVariableNames: ''
poolDictionaries: ''
category: 'Monticello-Base-Storing'!
Item was added:
+ ----- Method: MCFileDefinition class>>path:packageName: (in category 'as yet unclassified') -----
+ path: aString packageName: packageString
+ ^ self instanceLike: (self new initializeWithPath: aString packageName: packageString)!
Item was changed:
----- Method: MCVersionLoader>>loadWithNameLike: (in category 'loading') -----
loadWithNameLike: aString
| loader |
self checkForModifications.
+ loader := MCPackageLoader newCurrent.
- loader := MCPackageLoader new.
versions size > 1 ifTrue: [ loader beMultiplePackage ].
versions do: [:ea |
ea canOptimizeLoading
ifTrue: [ea patch applyTo: loader]
ifFalse: [loader updatePackage: ea package withSnapshot: ea snapshot
]
].
loader installOrphanage;
loadWithNameLike: aString.
versions do: [:ea | ea workingCopy loaded: ea]!
Item was changed:
----- Method: MCVersion class>>package:info: (in category 'instance creation') -----
package: aPackage info: aVersionInfo
+ ^ self package: aPackage info: aVersionInfo snapshot: (aPackage snapshotFor: aVersionInfo)!
- ^ self package: aPackage info: aVersionInfo snapshot: aPackage snapshot!
Item was changed:
MCMethodDefinition subclass: #MCMethodInitializerDefinition
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
+ category: 'Monticello-Base-Modeling-Methods'!
- category: 'Monticello-Base-Modeling'!
!MCMethodInitializerDefinition commentStamp: 'kph 1/16/2008 09:39' prior: 0!
MCMethodInitializerDefinition
is loaded as a normal method.
at #postloadOver:, it runs itself.
!
Item was added:
+ ----- Method: MCFileDefinition>>isFileDefinition (in category 'as yet unclassified') -----
+ isFileDefinition
+
+ ^ true!
Item was changed:
----- Method: MCPackageLoader2>>loadComplete (in category 'private') -----
loadComplete
MCMethodDefinition tidyCache.
self orphanage
addOrphans: unloadableDefinitions;
addOrphans: errorDefinitions;
loadComplete.
+ self loadFiles.
!
Item was removed:
- ----- Method: MCPackageLoader>>loadComplete (in category 'private') -----
- loadComplete!
Item was removed:
- ----- Method: MCMethodDefinition>>load (in category 'obsolete') -----
- load
-
- "obsolete , only remaining so that old MC's can load this code"
-
- self actualClass
- compile: source
- classified: category
- withStamp: timeStamp
- notifying: (SyntaxError new category: category).
-
- (selector == #initialize and: [ self classIsMeta ])
- ifTrue: [
- self actualClass soleInstance initialize.
- ].
- !
Item was removed:
- ----- Method: MCPackageLoader>>useChangeSetNamed:during: (in category 'private') -----
- useChangeSetNamed: baseName during: aBlock
- "Use the named change set, or create one with the given name."
- | changeHolder oldChanges newChanges |
- changeHolder := (ChangeSet respondsTo: #newChanges:)
- ifTrue: [ChangeSet]
- ifFalse: [Smalltalk].
- oldChanges := (ChangeSet respondsTo: #current)
- ifTrue: [ChangeSet current]
- ifFalse: [Smalltalk changes].
-
- newChanges := (ChangeSorter changeSetNamed: baseName) ifNil: [ ChangeSet new name: baseName ].
- changeHolder newChanges: newChanges.
- [aBlock value] ensure: [changeHolder newChanges: oldChanges].
- !
Item was removed:
- ----- Method: MCPackageLoader>>warnAboutErrors: (in category 'private') -----
- warnAboutErrors: errors
- errors isEmpty ifFalse: [ self notify: (self errorDefinitionWarning: errors) ]
- !
Item was removed:
- ----- Method: MCPackageLoader>>beUnloading (in category 'public') -----
- beUnloading
-
- "stub"!
Item was removed:
- ----- Method: MCPackageLoader>>loadWithName: (in category 'public') -----
- loadWithName: baseName
- self analyze.
- unloadableDefinitions isEmpty ifFalse: [self warnAboutDependencies].
- self useChangeSetNamed: baseName during: [self basicLoad]!
Item was removed:
- ----- Method: MCPackageLoader>>beMultiplePackage (in category 'public') -----
- beMultiplePackage
-
- isMultiplePackage := true!
Item was removed:
- MCMethodDefinition subclass: #MCMethodFileReferenceDefinition
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Monticello-Files'!
Item was removed:
- ----- Method: MCPackageLoader>>orderedAdditions (in category 'private') -----
- orderedAdditions
- ^ additions!
Item was removed:
- ----- Method: MCPackageLoader>>shouldWarnAboutErrors (in category 'private') -----
- shouldWarnAboutErrors
- ^ errorDefinitions isEmpty not and: [false "should make this a preference"]!
Item was removed:
- ----- Method: MCPackageLoader>>updatePackage:withSnapshot: (in category 'public') -----
- updatePackage: aPackage withSnapshot: aSnapshot
- | patch packageSnap |
- packageSnap := aPackage snapshot.
- patch := aSnapshot patchRelativeToBase: packageSnap.
- patch applyTo: self.
- packageSnap definitions do: [:ea | self provisions addAll: ea provisions]
- !
Item was removed:
- ----- Method: MCPackageLoader2>>tryToLoad: (in category 'obsolete') -----
- tryToLoad: aDefinition
- [aDefinition loadOver: (self obsoletionFor: aDefinition)] on: Error do: [errorDefinitions add: aDefinition].!
Item was removed:
- ----- Method: MCPackageLoader>>errorDefinitionWarning (in category 'private') -----
- errorDefinitionWarning
- ^ String streamContents:
- [:s |
- s nextPutAll: 'The following definitions had errors while loading. Press Proceed to try to load them again (they may work on a second pass):'; cr.
- errorDefinitions do: [:ea | s space; space; nextPutAll: ea summary; cr]] !
Item was removed:
- ----- Method: MCPackageLoader>>tryToLoad: (in category 'private') -----
- tryToLoad: aDefinition
- [aDefinition loadOver: (self obsoletionFor: aDefinition)] on: Error do: [errorDefinitions add: aDefinition].!
Item was removed:
- ----- Method: MCPackageLoader>>addDefinition: (in category 'patch ops') -----
- addDefinition: aDefinition
- additions add: aDefinition!
Item was removed:
- ----- Method: MCPackageLoader>>errorDefinitionWarning: (in category 'private') -----
- errorDefinitionWarning: erroredDefns
- ^ String streamContents:
- [:s |
- s nextPutAll: 'The following definitions had errors while loading. Press Proceed to try to load them again (they may work on a second pass):'; cr.
- erroredDefns do: [:ea |
- s space; space;
- nextPutAll: ea summary;
- space;
- nextPutAll: (ea because ifNil: [ '' ]); cr]] !
Item was removed:
- ----- Method: MCPackageLoader>>load (in category 'public') -----
- load
- self analyze.
- unloadableDefinitions isEmpty ifFalse: [self warnAboutDependencies].
- self useNewChangeSetDuring: [self basicLoad]!
Item was removed:
- ----- Method: MCPackageLoader>>provisions (in category 'private') -----
- provisions
- ^ provisions ifNil: [provisions := Set withAll: Smalltalk keys]!
Item was removed:
- ----- Method: MCPackageLoader>>basicLoad (in category 'private') -----
- basicLoad
- errorDefinitions := OrderedCollection new.
- [[additions do: [:ea | self tryToLoad: ea] displayingProgress: 'Loading...'.
- removals do: [:ea | ea unload] displayingProgress: 'Cleaning up...'.
- self shouldWarnAboutErrors ifTrue: [self warnAboutErrors].
- errorDefinitions do: [:ea | ea loadOver: (self obsoletionFor: ea)] displayingProgress: 'Reloading...'.
- additions do: [:ea | ea postloadOver: (self obsoletionFor: ea)] displayingProgress: 'Initializing...']
- on: InMidstOfFileinNotification
- do: [:n | n resume: true]]
- ensure: [self flushChangesFile]!
Item was removed:
- ----- Method: MCPackageLoader>>obsoletionFor: (in category 'private') -----
- obsoletionFor: aDefinition
- ^ obsoletions at: aDefinition ifAbsent: [nil]!
Item was removed:
- ----- Method: MCPackageLoader>>flushChangesFile (in category 'private') -----
- flushChangesFile
- "The changes file is second in the SourceFiles array"
-
- (SourceFiles at: 2) flush!
Item was removed:
- ----- Method: MCPackageLoader>>warnAboutErrors (in category 'private') -----
- warnAboutErrors
- self notify: self errorDefinitionWarning.
- !
Item was removed:
- ----- Method: MCPackageLoader>>installOrphanage (in category 'private') -----
- installOrphanage
-
- !
Item was removed:
- ----- Method: MCPackageLoader1b>>tryToLoad: (in category 'private') -----
- tryToLoad: aDefinition
- [aDefinition loadOver: (self obsoletionFor: aDefinition)] on: Error do: [errorDefinitions add: aDefinition].!
Item was removed:
- ----- Method: MCPackageLoader>>tryToLoad:errors: (in category 'private') -----
- tryToLoad: aDefinition errors: errs
-
- "a method used in some MC1 versions > md.308+"
-
- [aDefinition loadOver: (self obsoletionFor: aDefinition)] on: Error do: [errs add: aDefinition].!
Item was removed:
- ----- Method: MCPackageLoader>>modifyDefinition:to: (in category 'patch ops') -----
- modifyDefinition: old to: new
- self addDefinition: new.
- obsoletions at: new put: old.!
Item was removed:
- ----- Method: MCMethodFileReferenceDefinition class>>isModelFor: (in category 'as yet unclassified') -----
- isModelFor: selector
-
- ^ selector = 'files'!
Item was removed:
- ----- Method: MCPackageLoader>>warnAboutDependencies (in category 'private') -----
- warnAboutDependencies
- self notify: self dependencyWarning!
Item was removed:
- ----- Method: MCPackageLoader>>orderDefinitionsForLoading: (in category 'private') -----
- orderDefinitionsForLoading: aCollection
- ^ (self sorterForItems: aCollection) orderedItems!
Item was removed:
- ----- Method: MCPreambleDefinition>>load (in category 'as yet unclassified') -----
- load
- super load.
- self evaluate!
Item was removed:
- ----- Method: MCClassDefinition>>load (in category 'installing') -----
- load
-
- "for test cases and original MCPackageLoader"
- ^ self postloadOver: nil!
Item was removed:
- ----- Method: MCPackageLoader>>successfullyLoaded: (in category 'private') -----
- successfullyLoaded: ea
-
- "dummy"
-
- !
Item was removed:
- ----- Method: MCPackageLoader>>isUnloading (in category 'public') -----
- isUnloading
-
- ^ isUnloading ifNil: [ false ]!
Item was removed:
- ----- Method: MCPackageLoader>>useNewChangeSetDuring: (in category 'private') -----
- useNewChangeSetDuring: aBlock
- ^self useNewChangeSetNamedLike: 'MC' during: aBlock!
Item was removed:
- ----- Method: MCPackageLoader>>isMultiplePackage (in category 'public') -----
- isMultiplePackage
-
- ^ isMultiplePackage == true!
Item was removed:
- ----- Method: MCPackageLoader>>initialize (in category 'private') -----
- initialize
- additions := OrderedCollection new.
- errorDefinitions := OrderedCollection new.
- removals := OrderedCollection new.
- obsoletions := Dictionary new.
- !
Item was removed:
- ----- Method: MCPackageLoader>>analyzeMulti (in category 'private') -----
- analyzeMulti
- | index |
- index := MCDefinitionIndex definitions: additions.
- removals removeAllSuchThat: [:removal |
- (index definitionLike: removal
- ifPresent: [:addition | obsoletions at: addition put: removal]
- ifAbsent: []) notNil].!
Item was removed:
- ----- Method: MCPackageLoader>>removeDefinition: (in category 'patch ops') -----
- removeDefinition: aDefinition
- removals add: aDefinition!
Item was removed:
- ----- Method: MCPackageLoader>>useNewChangeSetNamedLike:during: (in category 'private') -----
- useNewChangeSetNamedLike: baseName during: aBlock
- ^self useChangeSetNamed: (ChangeSet uniqueNameLike: baseName) during: aBlock!
Item was removed:
- ----- Method: MCPackageLoader>>loadWithNameLike: (in category 'public') -----
- loadWithNameLike: baseName
- self analyze.
- unloadableDefinitions isEmpty ifFalse: [self warnAboutDependencies].
- self useNewChangeSetNamedLike: baseName during: [self basicLoad]!
Item was removed:
- ----- Method: MCPackageLoader>>analyze (in category 'private') -----
- analyze
- | sorter |
-
- self isMultiplePackage ifTrue: [ self analyzeMulti ].
-
- sorter := self sorterForItems: additions.
- additions := sorter orderedItems.
- requirements := sorter externalRequirements.
- unloadableDefinitions := sorter itemsWithMissingRequirements asSortedCollection.
-
- sorter := self sorterForItems: removals.
- removals := sorter orderedItems reversed.!
Item was removed:
- ----- Method: MCPackageLoader>>sorterForItems: (in category 'private') -----
- sorterForItems: aCollection
- | sorter |
- sorter := MCDependencySorter items: aCollection.
- sorter addExternalProvisions: self provisions.
- ^ sorter!
Item was removed:
- ----- Method: MCDefinition>>loadOver: (in category 'obsolete') -----
- loadOver: aDefinition
- "this method is now obsolete, it runs when old versions of Monticello are used to load this one.
- It is also the only place in the transition where you can put 'initialization' code if you have to"
-
- self load
- !
Item was removed:
- ----- Method: MCScriptDefinition>>load (in category 'as yet unclassified') -----
- load
- self installScript!
Item was removed:
- ----- Method: MCPackageLoader>>dependencyWarning (in category 'private') -----
- dependencyWarning
- ^ String streamContents:
- [:s |
- s nextPutAll: 'This package depends on the following classes:'; cr.
- requirements do: [:ea | s space; space; nextPutAll: ea; cr].
- s nextPutAll: 'You must resolve these dependencies before you will be able to load these definitions: '; cr.
- unloadableDefinitions do: [:ea | s space; space; nextPutAll: ea summary; cr]] !
Item was removed:
- ----- Method: MCPackageLoader>>installSnapshot: (in category 'public') -----
- installSnapshot: aSnapshot
- | patch |
- patch := aSnapshot patchRelativeToBase: MCSnapshot empty.
- patch applyTo: self.
- !
Item was removed:
- ----- Method: MCPackageLoader>>unloadPackage: (in category 'public') -----
- unloadPackage: aPackage
-
- (self
- updatePackage: aPackage withSnapshot: MCSnapshot empty;
- beUnloading;
- loadWithNameLike: aPackage name, '-unload';
- yourself)
- orphanage packageUnloaded: aPackage packageInfo. !
Item was removed:
- ----- Method: MCPackageLoader>>tryToUnload:errors: (in category 'private') -----
- tryToUnload: aDefinition errors: errs
-
- "a method used in some MC1 versions > md.308+"
-
- [aDefinition unload ] on: Error do: [errs add: aDefinition].!
More information about the Packages
mailing list