The Trunk: MonticelloConfigurations-ar.71.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-ar.71.mcz

commits-2
Andreas Raab uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-ar.71.mcz

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

Name: MonticelloConfigurations-ar.71
Author: ar
Time: 30 December 2009, 5:35:52 am
UUID: 908da779-6dd4-c34b-8be4-757825367db3
Ancestors: MonticelloConfigurations-ar.70

With the additional progress info from MC, configs are a bit noisy when updating. Suppress a good chunk of progress depending (for now) on a preference. The result are smoother and less noisy progress notifications during updates.

=============== Diff against MonticelloConfigurations-ar.70 ===============

Item was changed:
  ----- Method: MCConfiguration>>versionNamed:for:from: (in category 'private') -----
  versionNamed: verName for: aDependency from: repo
 
  | baseName fileName ver |
  (repo filterFileNames: repo cachedFileNames forVersionNamed: verName) ifNotEmptyDo: [:cachedNames |
  fileName := cachedNames anyOne.
+ self class extraProgressInfo
+ ifTrue:[ProgressNotification signal: '' extra: 'Using cached ', fileName].
- ProgressNotification signal: '' extra: 'Using cached ', fileName.
  ver := repo versionFromFileNamed: fileName].
  ver ifNil: [
  baseName := self diffBaseFor: aDependency.
  (baseName notNil and: [baseName ~= verName and: [repo includesVersionNamed: baseName]]) ifTrue: [
  fileName := (MCDiffyVersion nameForVer: verName base: baseName), '.mcd'.
+ self class extraProgressInfo
+ ifTrue:[ProgressNotification signal: '' extra: 'Downloading ', fileName].
- ProgressNotification signal: '' extra: 'Downloading ', fileName.
  ver := repo versionFromFileNamed: fileName]].
  ver ifNil: [
  fileName := verName, '.mcz'.
+ self class extraProgressInfo
+ ifTrue:[ProgressNotification signal: '' extra: 'Downloading ', fileName].
- ProgressNotification signal: '' extra: 'Downloading ', fileName.
  ver := repo versionFromFileNamed: fileName].
  ^ver!

Item was added:
+ ----- Method: MCConfiguration class>>extraProgressInfo: (in category 'preferences') -----
+ extraProgressInfo: aBool
+ "Whether to display for additional progress info during load."
+ ExtraProgressInfo := aBool.
+ !

Item was changed:
  ----- Method: MCConfiguration>>depsSatisfying:versionDo:displayingProgress: (in category 'private') -----
  depsSatisfying: selectBlock versionDo: verBlock displayingProgress: progressString
+ | repoMap count action |
- | repoMap count |
  repoMap := Dictionary new.
  self repositories do: [:repo |
  MCRepositoryGroup default addRepository: repo.
  repo allVersionNames
  ifEmpty: [self logWarning: 'cannot read from ', repo description]
  ifNotEmptyDo: [:all | all do: [:ver | repoMap at: ver put: repo]]].
 
  count := 0.
+ action := [:dep |
- self dependencies do: [:dep |
  | ver repo |
  ver := dep versionInfo name.
  repo := repoMap at: ver ifAbsent: [
  self logError: 'Version ', ver, ' not found in any repository'.
  self logError: 'Aborting'.
  ^count].
  (selectBlock value: dep) ifTrue: [
  | new |
  new := self versionNamed: ver for: dep from: repo.
  new ifNil: [
  self logError: 'Could not download version ', ver, ' from ', repo description.
  self logError: 'Aborting'.
  ^count]
  ifNotNil: [
  self logUpdate: dep package with: new.
+ self class extraProgressInfo
+ ifTrue:[ProgressNotification signal: '' extra: 'Installing ', ver].
- ProgressNotification signal: '' extra: 'Installing ', ver.
  verBlock value: new.
  count := count + 1.
  ]
  ].
  dep package workingCopy repositoryGroup addRepository: repo.
+ ].
+ self class extraProgressInfo
+ ifTrue:[self dependencies do: action displayingProgress: progressString]
+ ifFalse:[self dependencies do: action].
- ] displayingProgress: progressString.
-
  ^count!

Item was changed:
  Object subclass: #MCConfiguration
  instanceVariableNames: 'name dependencies repositories log'
+ classVariableNames: 'DefaultLog ExtraProgressInfo LogToFile'
- classVariableNames: 'DefaultLog LogToFile'
  poolDictionaries: ''
  category: 'MonticelloConfigurations'!

Item was added:
+ ----- Method: MCConfiguration class>>extraProgressInfo (in category 'preferences') -----
+ extraProgressInfo
+ "Answer true for additional progress info during load.
+ With the newly added MC down/upload operations this seems unnecessary
+ but some people might disagree, so let's leave it as a preference right now"
+ <preference: 'Extra Progress Info'
+ category: 'Monticello'
+ description: 'If true, additional progress information is displayed when loading MC configurations (i.e., during updates)'
+ type: #Boolean>
+ ^ExtraProgressInfo ifNil:[false]!