The Trunk: MonticelloConfigurations-bf.152.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-bf.152.mcz

commits-2
Bert Freudenberg uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-bf.152.mcz

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

Name: MonticelloConfigurations-bf.152
Author: bf
Time: 31 January 2018, 2:51:11.26074 pm
UUID: a2b8f171-9992-4bbf-b246-7e4542d3b4ac
Ancestors: MonticelloConfigurations-nice.151

Properly fix the modified check when updating.

=============== Diff against MonticelloConfigurations-nice.151 ===============

Item was changed:
  ----- Method: MCConfiguration>>depsSatisfying:versionDo:displayingProgress: (in category 'private') -----
  depsSatisfying: selectBlock versionDo: verBlock displayingProgress: progressString
  | count selectedVersions cleanWorkingCopies |
  self cacheAllFileNamesDuring: [
  self repositories do: [ :eachRepository |
  MCRepositoryGroup default addRepository: eachRepository ].
  "First, download selected versions"
  count := 0.
  selectedVersions := OrderedCollection new.
  self withProgress: progressString in: self dependencies do: [ :dep | | verName repo |
  verName := dep versionInfo name.
  self class extraProgressInfo ifTrue:
  [ ProgressNotification signal: '' extra: 'Downloading ' , verName ].
  repo := self repositories
  detect: [ :eachRepository | eachRepository includesVersionNamed: verName ]
  ifNone: [ self logError: 'Version ' , verName , ' not found in any repository'.
  self logError: 'Aborting'.
  ^ count ].
  (selectBlock value: dep) ifTrue: [ | version |
  version := self versionNamed: verName for: dep from: repo.
  version ifNil: [ self logError: 'Could not download version ' , verName , ' from ' , repo description.
  self logError: 'Aborting'.
  ^ count ].
  dep package workingCopy newRepositoryGroupIfDefault. "fix old working copies"
  dep package workingCopy repositoryGroup addRepository: repo.
  selectedVersions add: version]].
  "Then, process only those definitions that moved from one package to another, to avoid order dependence"
+ cleanWorkingCopies := MCWorkingCopy allManagers select:
+ [ :wc | wc modified not and:
+ [ selectedVersions anySatisfy: [ :v | wc package = v package ] ] ].
- cleanWorkingCopies := MCWorkingCopy allManagers reject: [ :wc | wc modified ].
  MCReorganizationPreloader preloadMovesBetween: selectedVersions.
  "Finally, load/merge selected versions"
  self withProgress: progressString in: selectedVersions do: [ :version |
  self logUpdate: version package with: version.
  self class extraProgressInfo ifTrue:
  [ ProgressNotification signal: '' extra: 'Installing ' , version info name ].
  verBlock value: version.
  count := count + 1 ].
  "Clean up packages made dirty by MCReorganizationPreloader"
+ cleanWorkingCopies
+ select: [ :wc | wc modified ]
+ thenDo: [ :wc | wc checkModified ].
- cleanWorkingCopies do: [ :wc | wc modified ifTrue: [[wc checkModified] on: Error do: [:ex | self logWarning: ex description] ]].
  ].
  ^ count!