[squeak-dev] The Trunk: Monticello-fbs.537.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Apr 22 10:29:20 UTC 2013


Frank Shearar uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-fbs.537.mcz

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

Name: Monticello-fbs.537
Author: fbs
Time: 22 April 2013, 9:47:02.188 am
UUID: 155c942d-c757-4e64-b0a5-774da5c7e085
Ancestors: Monticello-cmm.536

If you asking a repository for its versions throws an error (like a NetworkError), treat that as "no, it doesn't have the version".

(We will want to have a specific MCError at some point soon.)

=============== Diff against Monticello-bf.535 ===============

Item was changed:
  ----- Method: MCFileBasedRepository>>versionNamed: (in category 'versions') -----
+ versionNamed: aMCVersionName 
- versionNamed: aMCVersionName
  	"For FileBased repositories, aMCVersionName must have the appropriate extension!!  :-("
+ 	| version |
+ 	version := self cache
+ 		at: aMCVersionName
+ 		ifAbsent:
+ 			[ [ self loadVersionFromFileNamed: aMCVersionName ]
+ 				on: FileDoesNotExistException
+ 				do: [ : err | nil ] ].
- 	| v |
- 	v := self cache at: aMCVersionName ifAbsent: [self loadVersionFromFileNamed: aMCVersionName].
  	self resizeCache: cache.
+ 	(version notNil and: [ version isCacheable ]) ifTrue:
+ 		[ cache
+ 			at: aMCVersionName asMCVersionName
+ 			put: version ].
+ 	^ version!
- 	(v notNil and: [v isCacheable]) ifTrue: [cache at: aMCVersionName asMCVersionName put: v].
- 	^ v!

Item was added:
+ ----- Method: MCRepository>>normalized (in category 'accessing') -----
+ normalized
+ 	^ (MCRepositoryGroup default repositories includes: self)
+ 		ifTrue: [ self ]
+ 		ifFalse: [ self copy ]!

Item was added:
+ ----- Method: MCRepository>>normalizedRepositories (in category 'private') -----
+ normalizedRepositories
+ 	^ Array with: self normalized!

Item was added:
+ ----- Method: MCRepository>>repositories (in category 'accessing') -----
+ repositories
+ 	^ Array with: self!

Item was added:
+ ----- Method: MCRepositoryGroup>>allPackageNames (in category 'repository-api') -----
+ allPackageNames
+ 	^ repositories
+ 		inject: Set new
+ 		into:
+ 			[ : set : each | set
+ 				 addAll: each allPackageNames ;
+ 				 yourself ]!

Item was added:
+ ----- Method: MCRepositoryGroup>>basicStoreVersion: (in category 'repository-api') -----
+ basicStoreVersion: aVersion
+ 	"RepositoryGroup is used for reading, not writing."
+ 	self shouldNotImplement!

Item was added:
+ ----- Method: MCRepositoryGroup>>description (in category 'repository-api') -----
+ description
+ 	^ String streamContents:
+ 		[ : stream | stream nextPutAll: '{ '.
+ 		repositories
+ 			do: [ : each | stream nextPut: $';  nextPutAll: each description; nextPut: $' ]
+ 			separatedBy: [ stream nextPutAll: '. ' ].
+ 		stream nextPutAll: ' }' ]!

Item was changed:
+ ----- Method: MCRepositoryGroup>>includesVersionNamed: (in category 'repository-api') -----
- ----- Method: MCRepositoryGroup>>includesVersionNamed: (in category 'testing') -----
  includesVersionNamed: aString 
+ 	^ repositories anySatisfy: [ : each | [each includesVersionNamed: aString] on: Error do: [false]]!
- 	| versionName |
- 	versionName := aString asMCVersionName.
- 	self repositoriesDo:
- 		[ : ea | (ea includesVersionNamed: versionName) ifTrue: [ ^ true ] ].
- 	^ false!

Item was changed:
  ----- Method: MCRepositoryGroup>>initialize (in category 'initialize-release') -----
  initialize
+ 	super initialize.
  	repositories := OrderedCollection new!

Item was changed:
+ ----- Method: MCRepositoryGroup>>morphicOpen: (in category 'ui') -----
- ----- Method: MCRepositoryGroup>>morphicOpen: (in category 'as yet unclassified') -----
  morphicOpen: aWorkingCopy 
  	^ self repositories do: [:repo | repo morphicOpen: aWorkingCopy].!

Item was added:
+ ----- Method: MCRepositoryGroup>>normalizedRepositories (in category 'accessing') -----
+ normalizedRepositories
+ 	"Find an existing instance of any active repository so that we use whatever name and password the user usually uses. If not found, answer a copy"
+ 	^ repositories collect: [ : each | each normalized ]!

Item was changed:
+ ----- Method: MCRepositoryGroup>>versionNamed: (in category 'repository-api') -----
+ versionNamed: aMCVersionName 
+ 	repositories do:
+ 		[ : each | (each versionNamed: aMCVersionName) ifNotNil: [ : ver | ^ ver ] ].
+ 	^ nil!
- ----- Method: MCRepositoryGroup>>versionNamed: (in category 'versions') -----
- versionNamed: aString
- 	self repositories do: [:repo | | version |
- 		version := [repo versionNamed: aString] on: Error do: [nil].
- 		version ifNotNil: [:v | ^ v]].
- 	self error: 'No repositories contain version ', aString.!

Item was changed:
+ ----- Method: MCRepositoryGroup>>versionNamesForPackageNamed: (in category 'repository-api') -----
+ versionNamesForPackageNamed: aString 
+ 	^ repositories
+ 		inject: Set new
+ 		into:
+ 			[ : set : each | set
+ 				 addAll: (each versionNamesForPackageNamed: aString) ;
+ 				 yourself ]!
- ----- Method: MCRepositoryGroup>>versionNamesForPackageNamed: (in category 'versions') -----
- versionNamesForPackageNamed: aString
- 	^ self repositories gather: [:repo |
- 		[repo versionNamesForPackageNamed: aString] on: Error do: [#()]]!

Item was added:
+ ----- Method: MCRepositoryGroup>>versionWithInfo:ifAbsent: (in category 'repository-api') -----
+ versionWithInfo: aVersionInfo ifAbsent: aBlock 
+ 	repositories do:
+ 		[ : each | (each
+ 			versionWithInfo: aVersionInfo
+ 			ifAbsent: [  ]) ifNotNil:
+ 			[ : ver | ^ ver ] ].
+ 	^ aBlock value!



More information about the Squeak-dev mailing list