[Pkg] The Trunk: Monticello-cmm.560.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Aug 15 21:07:39 UTC 2013
Chris Muller uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-cmm.560.mcz
==================== Summary ====================
Name: Monticello-cmm.560
Author: cmm
Time: 15 August 2013, 4:06:17.456 pm
UUID: 10b8124c-656a-43a2-8e7f-d5367bba04f1
Ancestors: Monticello-cmm.559
- The ancestry can be restored from the MCVersion's Info that's loaded in the image, it isn't necessary to restore it from an older file. This means not finding a version to recover ancestry is much less likely to happen.
- If it does happen, the user is now given a chance to copy the file back to where it was loaded from and simply Proceed, rather than requiring them to close the debugger and "try again".
- Stub the stepChildren too.
=============== Diff against Monticello-cmm.559 ===============
Item was added:
+ ----- Method: MCAncestry>>stubAncestryFor:using: (in category 'initialize-release') -----
+ stubAncestryFor: childInfo using: aMCRepository
+ "childInfo was retrieved from aMCRepository. Replace my ancestry with a Proxy that can retrieve the full tree from these two elements."
+ ancestors := ancestors collect:
+ [ : each | MCInfoProxy
+ info: each copyWithTrimmedAncestry
+ child: childInfo
+ repository: aMCRepository ].
+ stepChildren := stepChildren collect:
+ [ : each | MCInfoProxy
+ info: each copyWithTrimmedAncestry
+ child: childInfo
+ repository: aMCRepository ].!
Item was removed:
- ----- Method: MCAncestry>>stubAncestryUsing: (in category 'initialize-release') -----
- stubAncestryUsing: aMCRepository
- ancestors := ancestors collect:
- [ : each | MCInfoProxy
- info: each copyWithTrimmedAncestry
- repository: aMCRepository ]!
Item was changed:
ProtoObject subclass: #MCInfoProxy
+ instanceVariableNames: 'info repository childInfo'
- instanceVariableNames: 'info repository'
classVariableNames: ''
poolDictionaries: ''
category: 'Monticello-Repositories'!
!MCInfoProxy commentStamp: 'cmm 8/12/2013 21:51' prior: 0!
A MCInfoProxy takes the place of a MCVersionInfo with a large tree of ancestors that consume memory in the image, but are almost never accessed. If they are, however, I will dynamically retrieve and become the Info from the original MC repository which includes the full ancestry tree.!
Item was added:
+ ----- Method: MCInfoProxy class>>info:child:repository: (in category 'create') -----
+ info: aMCVersionInfo child: childInfo repository: aMCRepository
+ ^ self new
+
+ setInfo: aMCVersionInfo
+ childInfo: childInfo
+ repository: aMCRepository!
Item was changed:
----- Method: MCInfoProxy>>materializeInfo (in category 'private') -----
materializeInfo
+ | persistentVersion |
+ [ (persistentVersion := repository versionWithInfo: childInfo) isNil ] whileTrue: [ Warning signal: 'Please copy ' , childInfo name , 'with id ' , childInfo id asString , ' back to ' , repository asString , ' and try again.' ].
+ persistentVersion info allAncestorsDo:
+ [ : each | each = info ifTrue: [ ^ each ] ].
+ nil error: 'Expected ' , info asString , ' to be an ancestor of ' , childInfo asString!
- ^ (repository versionWithInfo: info)
- ifNil:
- [ (MCRepositoryGroup default versionWithInfo: info)
- ifNil: [ nil error: 'Please copy ' , info name , 'with id ' , info id asString , ' to ' , repository asString , ' and try again.' ]
- ifNotNil:
- [ : foundVersion | repository storeVersion: foundVersion.
- foundVersion info ] ]
- ifNotNil:
- [ : version | version info ]!
Item was added:
+ ----- Method: MCInfoProxy>>setInfo:childInfo:repository: (in category 'initialize-release') -----
+ setInfo: aMCVersionInfo childInfo: childMCVersionInfo repository: aMCRepository
+ info := aMCVersionInfo.
+ childInfo := childMCVersionInfo.
+ repository := aMCRepository!
Item was removed:
- ----- Method: MCInfoProxy>>setInfo:repository: (in category 'initialize-release') -----
- setInfo: aMCVersionInfo repository: aMCRepository
- info := aMCVersionInfo.
- repository := aMCRepository!
Item was changed:
----- Method: MCWorkingCopy>>stubAncestry (in category 'operations') -----
stubAncestry
"Stub all but the most recent 10 of my ancestry tree to save memory with a proxy which can be transparently accessed later, if necessary."
+ self ancestors ifEmpty: [ ^ self ].
repositoryGroup ifNotNil:
[ | tenAgo count |
count := 0.
ancestry ancestorsDoWhileTrue:
[ : each | tenAgo := each.
(count := count + 1) < 10 ].
+ tenAgo
+ stubAncestryFor: self ancestors anyOne
+ using: repositoryGroup ]!
- tenAgo stubAncestryUsing: repositoryGroup ]!
More information about the Packages
mailing list