The Trunk: Monticello-cmm.565.mcz

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

The Trunk: Monticello-cmm.565.mcz

commits-2
Chris Muller uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-cmm.565.mcz

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

Name: Monticello-cmm.565
Author: cmm
Time: 10 September 2013, 8:21:03.997 pm
UUID: 0c96ee58-52f7-4f90-896b-e14d847be54e
Ancestors: Monticello-bf.564

- Utility method for removing oldest files from a package-cache directory.
- stubAllAncestry as part of Smalltalk cleanUp.
- Minor clean ups.

=============== Diff against Monticello-bf.564 ===============

Item was changed:
+ ----- Method: MCCacheRepository class>>cacheDirectory (in category 'accessing') -----
- ----- Method: MCCacheRepository class>>cacheDirectory (in category 'as yet unclassified') -----
  cacheDirectory
  ^ (FileDirectory default directoryNamed: 'package-cache')
  assureExistence;
  yourself!

Item was removed:
- ----- Method: MCCacheRepository class>>checkCacheDirectory (in category 'as yet unclassified') -----
- checkCacheDirectory
- default notNil and: [default directory exists ifFalse: [default := nil]]!

Item was changed:
+ ----- Method: MCCacheRepository class>>default (in category 'accessing') -----
- ----- Method: MCCacheRepository class>>default (in category 'as yet unclassified') -----
  default
+ (default isNil or: [ default directory exists not ]) ifTrue: [ default := self new directory: self cacheDirectory ].
+ ^ default!
- self checkCacheDirectory.
- ^ default ifNil: [default := self new directory: self cacheDirectory]!

Item was changed:
+ ----- Method: MCCacheRepository class>>description (in category 'accessing') -----
- ----- Method: MCCacheRepository class>>description (in category 'as yet unclassified') -----
  description
  ^ nil!

Item was removed:
- ----- Method: MCCacheRepository class>>initialize (in category 'as yet unclassified') -----
- initialize
- self checkCacheDirectory!

Item was added:
+ ----- Method: MCCacheRepository class>>reduceTo: (in category 'utilities') -----
+ reduceTo: numberOfBytesToKeepOnDisk
+ | newestToOldest |
+ newestToOldest := self default directory entries sort:
+ [ : a : b | a modificationDateAndTime > b modificationDateAndTime ].
+ newestToOldest
+ inject: 0
+ into:
+ [ : sum : each | each isDirectory ifFalse:
+ [ sum > numberOfBytesToKeepOnDisk ifTrue: [ each delete ].
+ sum + each fileSize ] ]!

Item was changed:
  ----- Method: MCWorkingCopy class>>cleanUp: (in category 'class initialization') -----
+ cleanUp: aggressive
- cleanUp: aggressive
  "Remove all PackageInfos that are not associated with an MCWorkingCopy when aggressively cleaning up"
+ self stubAllAncestry.
+ aggressive ifTrue: [ self flushObsoletePackageInfos ]!
-
- aggressive ifTrue: [self flushObsoletePackageInfos]!