[Pkg] The Trunk: MonticelloConfigurations-bf.128.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Oct 15 20:23:12 UTC 2014

Bert Freudenberg uploaded a new version of MonticelloConfigurations to project The Trunk:

==================== Summary ====================

Name: MonticelloConfigurations-bf.128
Author: bf
Time: 15 October 2014, 1:18:18.317 pm
UUID: dc6bd95c-a076-46e7-9b68-f89121087387
Ancestors: MonticelloConfigurations-eem.127

Make the name of the update config map configurable.

=============== Diff against MonticelloConfigurations-eem.127 ===============

Item was removed:
- ----- Method: MCConfigurationBrowser>>add (in category 'actions') -----
- add
- 	(self pickWorkingCopiesSatisfying: [:each | (self includesPackage: each package) not])
- 		do: [:wc |
- 			wc ancestors isEmpty
- 				ifTrue: [self inform: 'You must save ', wc packageName, ' first!!
- Skipping this package']
- 				ifFalse: [
- 					self dependencies add: (MCVersionDependency
- 						package: wc package
- 						info: wc ancestors first)]].
- 	self changed: #dependencyList; changed: #description!

Item was changed:
  ----- Method: MCConfigurationBrowser>>buttonSpecs (in category 'morphic ui') -----
+ 	^ #(('Add' addDependency 'Add a dependency')
- 	^ #(('Add' add 'Add a dependency')
  		('Update' updateMenu 'Update dependencies')
  		('Install' installMenu 'Load/Merge/Upgrade into image')
  		('Up' up 'Move item up in list' canMoveUp)
  		('Down' down 'Move item down in list' canMoveDown)
  		('Remove' remove 'Remove item' canRemove)
  		('Store' store 'store configuration')
  		('Post' post 'Post this configuration to an update stream')

Item was changed:
  Object subclass: #MCMcmUpdater
  	instanceVariableNames: ''
+ 	classVariableNames: 'DefaultUpdateURL LastUpdateMap SkipPackages UpdateFromServerAtStartup UpdateMapName UpdateMissingPackages'
- 	classVariableNames: 'DefaultUpdateURL LastUpdateMap SkipPackages UpdateFromServerAtStartup UpdateMissingPackages'
  	poolDictionaries: ''
  	category: 'MonticelloConfigurations'!
  !MCMcmUpdater commentStamp: 'cbc 8/26/2010 16:42' prior: 0!
  MCMcmUpdater provides utility methods for updating Monticello packages from Monticello configurations.
  When Monticello configurations are stored in a repository (or repositories), MCMcmUpdater acts as an update stream. It first ensures that each configuration map has been loaded in sequence, then updates the last configuration map to the most recent version for each specified package, and finally loads these versions to produce a fully updated configuration.
  Currently if a set of packages are unloaded from the image, using this class to reload them may cause problems, depending on what dependencies those classes have.  Success is not assured.  Removing packages via SmalltalkImage>>unloadAllKnownPackages will be successful, it flags the packages removed so that they are not loaded by this utility.
  If you wish to not have MCMcmUpdater update packages, there are two ways to handle this:
  1) To have MCMcmUpdater not update any packages not currently in the image set the UpdateMissingPackages preference to false:
  		MCMcmUpdater updateMissingPackages: false
  	Note that any new packages added to the repositories will not be picked up when this is turned off.
  2) To have MCMcmUpdater not update a specific package, evaluate
  		MCMcmUpdater disableUpdatesOfPackage: <packageName>
  Class Variables definitions:
  DefaultUpdateURL - String: the URL that will be checked by default for updates.  This would be set for a common standard location to check.
  LastUpdateMap - Dictionary of Integer: version number of the last loaded update map per repository.  Keeps track of the last configuration map, so that the utility will not have to run through the full history in the repositories each time you ask to update.
  SkipPackages - Set of Strings: names of packages to not update in MCMcmUpdater (empty by default).
  UpdateMissingPackages - Boolean: if true (default), new packages in the update config map will be loaded unless they are in SkipPackages.  If false, packages not currently loaded in the image will not be loaded by MCMcmUpdater.  (This can be dangerous if packages are split - use at your own risk).

Item was changed:
  ----- Method: MCMcmUpdater class>>updateListFor: (in category 'private') -----
  updateListFor: repo
  	| updateList allNames minVersion |
  	updateList := OrderedCollection new.
  	minVersion := LastUpdateMap at: repo description ifAbsent: [0].
+ 	"Find all the update-*.mcm files"
- 	"Find all the updates-author.version.mcm files"
  	allNames := 'Checking ', repo description
  		displayProgressFrom: 0 to: 1 during: [:bar| 
  			bar value: 0.
  			repo allFileNamesOrCache ].
+ 	allNames do: [:fileName | | version |
+ 		((fileName endsWith: '.mcm')
+ 			and: [fileName packageAndBranchName = self updateMapName
+ 				and: [(version := fileName versionNumber) >= minVersion]]) 
+ 					ifTrue: [updateList add: version -> fileName]].
- 	allNames do: [:versionedName | | version base parts author type |
- 		parts := versionedName findTokens: '.-'.
- 		parts size = 4 ifTrue: [
- 			base := parts at: 1.
- 			author := parts at: 2.
- 			version := [(parts at: 3) asNumber] on: Error do: [:ex | ex return: 0].
- 			type := parts at: 4.
- 		].
- 		(base = 'update' and: [version >= minVersion and: [type = 'mcm']]) 
- 			ifTrue: [updateList add: version -> versionedName]].
  	^updateList sort!

Item was added:
+ ----- Method: MCMcmUpdater class>>updateMapName (in category 'preferences') -----
+ updateMapName
+ 	"Name for update map, without version info"
+ 	<preference: 'Update map name'
+ 		category: 'updates'
+ 		description: 'Base name for the update maps'
+ 		type: #String>
+ 	^UpdateMapName ifNil: ['update']!

Item was added:
+ ----- Method: MCMcmUpdater class>>updateMapName: (in category 'preferences') -----
+ updateMapName: aString
+ 	"Name for update map, without version info"
+ 	UpdateMapName := aString!

More information about the Packages mailing list