A new version of MonticelloConfigurations was added to project The Inbox:
http://source.squeak.org/inbox/MonticelloConfigurations-dtl.154.mcz ==================== Summary ==================== Name: MonticelloConfigurations-dtl.154 Author: dtl Time: 6 November 2018, 12:48:49.134459 pm UUID: fa8994d2-a6ef-4d3a-a765-e74a3c1b659d Ancestors: MonticelloConfigurations-eem.153 Allow an updater to read its update maps from a local directory repository. Previously only HTTP repositories were supported. A local repository may be useful for testing an update stream prior to publishing update maps to a public location. =============== Diff against MonticelloConfigurations-eem.153 =============== Item was changed: ----- Method: MCMcmUpdater class>>repository:updateMap: (in category 'instance creation') ----- + repository: urlOrDirectoryPath updateMap: baseName - repository: url updateMap: baseName "Answer a new instance with empty last update map, not yet registered" + ^ self repository: urlOrDirectoryPath updateMap: baseName lastUpdateMap: Dictionary new! - ^ self repository: url updateMap: baseName lastUpdateMap: Dictionary new! Item was changed: ----- Method: MCMcmUpdater class>>repository:updateMap:lastUpdateMap: (in category 'instance creation') ----- + repository: urlOrDirectoryPath updateMap: baseName lastUpdateMap: dictionary - repository: url updateMap: baseName lastUpdateMap: dictionary "Answer a new instance, not yet registered" ^ self new + repository: urlOrDirectoryPath; - repository: url; updateMapName: baseName; lastUpdateMap: dictionary! Item was changed: ----- Method: MCMcmUpdater class>>updateMapNamed:repository: (in category 'instance creation') ----- + updateMapNamed: baseName repository: urlOrDirectoryPath - updateMapNamed: baseName repository: url "Answer an instance for the given repository URL with a base update name baseName, Register a new instance if not present in the registry." " | updater1 updater2 | updater1 := self updateMapNamed: 'BAR' repository: 'FOO'. updater2 := self updateMapNamed: 'BAZ' repository: 'FOO'. updater1 unregister. updater2 unregister. Registry" + ^(self forRepository: urlOrDirectoryPath updateMap: baseName) - ^(self forRepository: url updateMap: baseName) ifNil: [ "register a new updater" + (self repository: urlOrDirectoryPath updateMap: baseName) register]. - (self repository: url updateMap: baseName) register]. ! Item was changed: ----- Method: MCMcmUpdater>>getRepositoryFromRepositoryGroup (in category 'private') ----- getRepositoryFromRepositoryGroup "Answer the repository for this updater, ensuring that it is registered in the default MCRepositoryGroup" ^ MCRepositoryGroup default repositories detect: [:r | r description = repository] ifNone: [| r | + r := self repositoryAt: repository. - r := MCHttpRepository - location: repository - user: '' - password: ''. MCRepositoryGroup default addRepository: r. r] ! Item was changed: ----- Method: MCMcmUpdater>>repository: (in category 'accessing') ----- + repository: urlOrDirectoryPath - repository: repositoryURLString + repository := urlOrDirectoryPath! - repository := repositoryURLString! Item was added: + ----- Method: MCMcmUpdater>>repositoryAt: (in category 'private') ----- + repositoryAt: urlOrDirectoryPath + "Answer a repository, assuming that urlOrDirectoryPath represents + either an HTTP repository or a local directory repository. The common + case is an HTTP repository, but a local repository may be useful for + testing an update stream prior to posting the update maps to a public + location." + + (FileDirectory default directoryExists: urlOrDirectoryPath) + ifTrue: [^ MCDirectoryRepository path: urlOrDirectoryPath] + ifFalse: [^ MCHttpRepository + location: repository + user: '' + password: ''] + ! |
Explanation:
Suppose that you have an update stream called 'update.oscog' in the VMMaker repository. The updater for that stream is: MCMcmUpdater updateMapNamed: 'update.oscog' repository: 'http://source.squeak.org/VMMaker'. If you want to develop and test some update maps for that stream, it may be helpful to do the testing off line using update maps in a local directory repository. The updater in this case would be: MCMcmUpdater updateMapNamed: 'update.oscog' repository: '/path/to//local/repository'. This also may be useful to test update maps for trunk in cases where the updates seem dangerous, and may pose a risk of breaking the trunk. Dave On Tue, Nov 06, 2018 at 06:06:19PM +0000, [hidden email] wrote: > A new version of MonticelloConfigurations was added to project The Inbox: > http://source.squeak.org/inbox/MonticelloConfigurations-dtl.154.mcz > > ==================== Summary ==================== > > Name: MonticelloConfigurations-dtl.154 > Author: dtl > Time: 6 November 2018, 12:48:49.134459 pm > UUID: fa8994d2-a6ef-4d3a-a765-e74a3c1b659d > Ancestors: MonticelloConfigurations-eem.153 > > Allow an updater to read its update maps from a local directory repository. Previously only HTTP repositories were supported. A local repository may be useful for testing an update stream prior to publishing update maps to a public location. > > =============== Diff against MonticelloConfigurations-eem.153 =============== > > Item was changed: > ----- Method: MCMcmUpdater class>>repository:updateMap: (in category 'instance creation') ----- > + repository: urlOrDirectoryPath updateMap: baseName > - repository: url updateMap: baseName > "Answer a new instance with empty last update map, not yet registered" > > + ^ self repository: urlOrDirectoryPath updateMap: baseName lastUpdateMap: Dictionary new! > - ^ self repository: url updateMap: baseName lastUpdateMap: Dictionary new! > > Item was changed: > ----- Method: MCMcmUpdater class>>repository:updateMap:lastUpdateMap: (in category 'instance creation') ----- > + repository: urlOrDirectoryPath updateMap: baseName lastUpdateMap: dictionary > - repository: url updateMap: baseName lastUpdateMap: dictionary > "Answer a new instance, not yet registered" > > ^ self new > + repository: urlOrDirectoryPath; > - repository: url; > updateMapName: baseName; > lastUpdateMap: dictionary! > > Item was changed: > ----- Method: MCMcmUpdater class>>updateMapNamed:repository: (in category 'instance creation') ----- > + updateMapNamed: baseName repository: urlOrDirectoryPath > - updateMapNamed: baseName repository: url > "Answer an instance for the given repository URL with a base update name baseName, > Register a new instance if not present in the registry." > > " | updater1 updater2 | > updater1 := self updateMapNamed: 'BAR' repository: 'FOO'. > updater2 := self updateMapNamed: 'BAZ' repository: 'FOO'. > updater1 unregister. > updater2 unregister. > Registry" > > + ^(self forRepository: urlOrDirectoryPath updateMap: baseName) > - ^(self forRepository: url updateMap: baseName) > ifNil: [ "register a new updater" > + (self repository: urlOrDirectoryPath updateMap: baseName) register]. > - (self repository: url updateMap: baseName) register]. > > ! > > Item was changed: > ----- Method: MCMcmUpdater>>getRepositoryFromRepositoryGroup (in category 'private') ----- > getRepositoryFromRepositoryGroup > "Answer the repository for this updater, ensuring that it is registered in the default MCRepositoryGroup" > > ^ MCRepositoryGroup default repositories > detect: [:r | r description = repository] > ifNone: [| r | > + r := self repositoryAt: repository. > - r := MCHttpRepository > - location: repository > - user: '' > - password: ''. > MCRepositoryGroup default addRepository: r. > r] > ! > > Item was changed: > ----- Method: MCMcmUpdater>>repository: (in category 'accessing') ----- > + repository: urlOrDirectoryPath > - repository: repositoryURLString > > + repository := urlOrDirectoryPath! > - repository := repositoryURLString! > > Item was added: > + ----- Method: MCMcmUpdater>>repositoryAt: (in category 'private') ----- > + repositoryAt: urlOrDirectoryPath > + "Answer a repository, assuming that urlOrDirectoryPath represents > + either an HTTP repository or a local directory repository. The common > + case is an HTTP repository, but a local repository may be useful for > + testing an update stream prior to posting the update maps to a public > + location." > + > + (FileDirectory default directoryExists: urlOrDirectoryPath) > + ifTrue: [^ MCDirectoryRepository path: urlOrDirectoryPath] > + ifFalse: [^ MCHttpRepository > + location: repository > + user: '' > + password: ''] > + ! > > |
Free forum by Nabble | Edit this page |