[squeak-dev] The Trunk: Monticello-cmm.478.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Aug 16 02:51:17 UTC 2011
Chris Muller uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-cmm.478.mcz
==================== Summary ====================
Name: Monticello-cmm.478
Author: cmm
Time: 13 August 2011, 7:34:49.185 pm
UUID: b61eb822-f974-419b-91c9-2c3fa9ff341b
Ancestors: Monticello-ul.477
- For #copyAllFrom:, only copy those that don't exist in the receiver.
- Added MCRepository>>#copyImageVersions. For each package contained in the receiver, copy the version of that package which is currently loaded in this image. If no version of a package is loaded in the image, nothing is copied for that package.
- Added String>>#withLoadedPackageVersions so that load scripts specifying Monticello package names can be easily upgraded.
=============== Diff against Monticello-ul.477 ===============
Item was changed:
----- Method: MCRepository>>copyAllFrom: (in category 'versions') -----
copyAllFrom: aMCRepository
"Copy all MCVersions from aMCRepository to the receiver."
+ self cacheAllFileNamesDuring:
+ [ aMCRepository allVersionsDo:
+ [ : eachVersion | (self includesVersionNamed: eachVersion versionName) ifFalse: [ self storeVersion: eachVersion ] ] ]!
- aMCRepository allVersionsDo:
- [ : eachVersion | self storeVersion: eachVersion ]!
Item was added:
+ ----- Method: MCRepository>>copyImageVersions (in category 'versions') -----
+ copyImageVersions
+ "For each package contained in the receiver, copy the version of that package which is currently loaded in this image. If no version of a package is loaded in the image, nothing is copied for that package."
+ self cacheAllFileNamesDuring:
+ [ self allPackageNames do:
+ [ : eachPkgName | MCWorkingCopy allManagers
+ detect: [ : each | each packageName = eachPkgName ]
+ ifFound:
+ [ : loaded | loaded ancestors do:
+ [ : infoToCopy | (self includesVersionNamed: infoToCopy versionName) ifFalse:
+ [ (MCRepositoryGroup default versionWithInfo: infoToCopy)
+ ifNil: [ Warning signal: infoToCopy name , ' not found in RepositoryGroup default.' ]
+ ifNotNilDo:
+ [ : ver | self storeVersion: ver ] ] ] ]
+ ifNone: [ "Image specifies no version to copy." ] ] ]!
Item was added:
+ ----- Method: String>>withLoadedPackageVersions (in category '*monticello') -----
+ withLoadedPackageVersions
+ "Everywhere the receiver contains a package version in the format: PackageName-author.123 for which a version of that package is loaded in the image, answer a new String with each of those package versions changed to reflect the currently loaded version."
+ | string |
+ string := self.
+ MCWorkingCopy allManagers do:
+ [ : eachWorkingCopy | | start packageName |
+ start := 1.
+ packageName := eachWorkingCopy packageName.
+ [ start := string
+ findString: packageName
+ startingAt: start.
+ start > 0 and: [ string size > (start + packageName size + 4) ] ] whileTrue:
+ [ | dot end versionName |
+ dot := string
+ indexOf: $.
+ startingAt: (end := start + packageName size)
+ ifAbsent: [ 0 ].
+ dot > 0 ifTrue:
+ [ end := string
+ indexSatisfying:
+ [ : each | each isDigit not ]
+ startingAt: dot + 1.
+ (end > (dot + 1) and:
+ [ (dot + 1 to: end - 1) allSatisfy:
+ [ : n | (string at: n) isDigit ] ])
+ ifTrue:
+ [ versionName := string
+ copyFrom: start
+ to: end - 1.
+ versionName asMCVersionName packageName = packageName ifTrue:
+ [ string := string
+ copyReplaceTokens: versionName
+ with: eachWorkingCopy ancestors first name ] ]
+ ifFalse: [ end := start + packageName size ] ].
+ start := end ] ].
+ ^ string!
More information about the Squeak-dev
mailing list
|