Status: Fixed Owner: stephane.ducasse Labels: Milestone-1.2 Difficulty-Easy Type-Squeak New issue 3229 by stephane.ducasse: More robust MCFileRepositoryInspector http://code.google.com/p/pharo/issues/detail?id=3229 Name: Monticello-ul.408 Author: ul Time: 8 November 2010, 3:18:30.762 am UUID: e00c2051-a20d-e145-a1d9-c7a67bc4e30d Ancestors: Monticello-ul.407 - fix for http://bugs.squeak.org/view.php?id=6439 =============== Diff against Monticello-ul.407 =============== Item was changed: ----- Method: MCFileRepositoryInspector>>refresh (in category 'as yet unclassified') ----- refresh | packageNames | packageNames := Set new. packageList := nil. versions := repository readableFileNames collect: [ :each | | name | name := (each copyUpToLast: $.) copyUpTo: $(. name last isDigit ifFalse: [Array with: name with: '' with: '' with: each] ifTrue: [Array with: (packageNames add: (name copyUpToLast: $-)) "pkg name" with: ((name copyAfterLast: $-) copyUpTo: $.) "user" + with: (((name copyAfterLast: $-) copyAfter: $.) asInteger ifNil: [ 0 ]) "version" - with: ((name copyAfterLast: $-) copyAfter: $.) asInteger "version" with: each]]. newer := Set new. inherited := Set new. loaded := Set new. (MCWorkingCopy allManagers " select: [ :each | packageNames includes: each packageName]") do: [:each | | latest | each ancestors do: [ :ancestor | loaded add: ancestor name. ancestor ancestorsDoWhileTrue: [:heir | (inherited includes: heir name) ifTrue: [false] ifFalse: [inherited add: heir name. true]]]. latest := (versions select: [:v | v first = each package name]) detectMax: [:v | v third]. (latest notNil and: [ each ancestors allSatisfy: [:ancestor | | av | av := ((ancestor name copyAfterLast: $-) copyAfter: $.) asInteger. av < latest third or: [ av = latest third and: [((ancestor name copyAfterLast: $-) copyUpTo: $.) ~= latest second]]]]) ifTrue: [newer add: each package name ]]. self changed: #packageList; changed: #versionList!