The Trunk: MonticelloConfigurations-dtl.154.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: MonticelloConfigurations-dtl.154.mcz

commits-2
David T. Lewis uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/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: '']
+ !