[squeak-dev] The Trunk: Monticello-eem.512.mcz

Chris Muller asqueaker at gmail.com
Wed Aug 8 19:43:24 UTC 2012


I understand you like the branch-name for the good sort-separation in
the package list so you can scroll to one part of the list or another
to see different branches.  Would a separate repository (directory)
work as well?  IOW, rather than embedding the branch name into
version-name, what if the branch-name could be simply further up in
the fully-qualified name -- due to being in a separate directory.

       MyPackage
           MyPackage-Branch1
                MyPackage-abc.1.mcz
                MyPackage-abc.2.mcz
           MyPackage-Branch2
                MyPackage-abc.3.mcz
                MyPackage-xyz.3.mcz

?



On Wed, Aug 8, 2012 at 2:27 PM, Chris Muller <asqueaker at gmail.com> wrote:
> This change is unsustainable and has broken the API contract with
> other respository types.  The only required MCRepository API that
> should be used by outside clients such as MCRepositoryInspector is:
>
>   #allPackageNames - answer a list of package names in this repository.
>   #basicStoreVersion: - add a Version to this repository.
>   #includesVersionNamed: - does a version with this name exist in this
> repository?
>   #versionNamed: - answer the first Version object with the given name.
>   #versionNamesForPackageNamed: - answer the version names for the
> given package name.
>   #versionWithInfo:ifAbsent: - answer the Version object with the
> given unique VersionInfo
>
> A detailed explanation is here:
>
>   http://lists.squeak.org/pipermail/squeak-dev/2011-March/157825.html
>
> I use other repository types besides FileBased which are now broken by this.
>
> Eliot, is there some way to solve your issue without enumerating all
> filenames of a repository?
>
>
>
>
> On Thu, Jun 7, 2012 at 12:19 PM,  <commits at source.squeak.org> wrote:
>> Eliot Miranda uploaded a new version of Monticello to project The Trunk:
>> http://source.squeak.org/trunk/Monticello-eem.512.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Monticello-eem.512
>> Author: eem
>> Time: 7 June 2012, 10:17:48.386 am
>> UUID: a2addfac-e45d-4770-8f36-250da0d46b0b
>> Ancestors: Monticello-cmm.511
>>
>> Provide a preference (Browse branched package versions separately)
>> that makes the repository inspector show branches as
>> separate groups.  e.g. makes it easier to find the newest
>> VMMaker.oscog amongst the trunk versions.
>>
>> =============== Diff against Monticello-cmm.511 ===============
>>
>> Item was added:
>> + ----- Method: MCFileBasedRepository>>allPackageAndBranchNames (in category 'overriding') -----
>> + allPackageAndBranchNames
>> +       | answer |
>> +       answer := Set new.
>> +       self allFileNamesOrCache do:
>> +               [ : each | | versionName |
>> +               versionName := each asMCVersionName.
>> +               versionName isValid ifTrue: [ answer add: versionName packageAndBranchName ] ].
>> +       ^ answer!
>>
>> Item was changed:
>>   ----- Method: MCFileRepositoryInspector>>versionNamesForSelectedPackage (in category 'private') -----
>>   versionNamesForSelectedPackage
>>         ^ self allVersionNames select:
>> +               (self class browseBranchedVersionsSeparately
>> +                       ifTrue: [[:each| each packageAndBranchName = selectedPackage]]
>> +                       ifFalse: [[:each| each packageName = selectedPackage]])!
>> -               [ : each | each packageName = selectedPackage ]!
>>
>> Item was changed:
>> + ----- Method: MCGOODSRepository>>allPackageNames (in category 'packages') -----
>> - ----- Method: MCGOODSRepository>>allPackageNames (in category 'as yet unclassified') -----
>>   allPackageNames
>>         ^ self root collect:
>>                 [ : ea | ea package name ]!
>>
>> Item was changed:
>>   MCVersionInspector subclass: #MCRepositoryInspector
>>         instanceVariableNames: 'repository packageNames versionNames selectedPackage selectedVersion order versionInfo loaded newer inherited'
>> +       classVariableNames: 'BrowseBranchedVersionsSeparately Order'
>> -       classVariableNames: 'Order'
>>         poolDictionaries: ''
>>         category: 'Monticello-UI'!
>>
>> Item was added:
>> + ----- Method: MCRepositoryInspector class>>browseBranchedVersionsSeparately (in category 'class initialization') -----
>> + browseBranchedVersionsSeparately
>> +
>> +       <preference: 'Browse branched package versions separately'
>> +       category: 'Monticello'
>> +       description: 'If true, versions of packages on branches will be shown in a separate section from trunk package versions'
>> +       type: #Boolean>
>> +       ^BrowseBranchedVersionsSeparately ifNil: [false]!
>>
>> Item was added:
>> + ----- Method: MCRepositoryInspector class>>browseBranchedVersionsSeparately: (in category 'class initialization') -----
>> + browseBranchedVersionsSeparately: aBoolean
>> +       BrowseBranchedVersionsSeparately := aBoolean!
>>
>> Item was changed:
>> + ----- Method: MCRepositoryInspector class>>order (in category 'class initialization') -----
>> - ----- Method: MCRepositoryInspector class>>order (in category 'as yet unclassified') -----
>>   order
>>         Order isNil
>>                 ifTrue: [ Order := 5 ].
>>         ^Order!
>>
>> Item was changed:
>> + ----- Method: MCRepositoryInspector class>>order: (in category 'class initialization') -----
>> - ----- Method: MCRepositoryInspector class>>order: (in category 'as yet unclassified') -----
>>   order: anInteger
>>         Order := anInteger!
>>
>> Item was changed:
>> + ----- Method: MCRepositoryInspector class>>repository:workingCopy: (in category 'instance creation') -----
>> - ----- Method: MCRepositoryInspector class>>repository:workingCopy: (in category 'as yet unclassified') -----
>>   repository: aFileBasedRepository workingCopy: aWorkingCopy
>>         ^self new
>>                 setRepository: aFileBasedRepository workingCopy: aWorkingCopy;
>>                 yourself!
>>
>> Item was changed:
>>   ----- Method: MCRepositoryInspector>>packageList (in category 'morphic ui') -----
>>   packageList
>>         | result loadedPackages |
>>         packageNames ifNotNil: [ ^ packageNames ].
>>         repository cacheAllFileNamesDuring:
>>                 [ "Enjoy emphasis side-effects of populating my versionNames."
>>                 self versionNames.
>> +               result := self class browseBranchedVersionsSeparately
>> +                                       ifTrue: [ repository allPackageAndBranchNames ]
>> +                                       ifFalse: [ repository allPackageNames ] ].
>> -               result := repository allPackageNames ].
>>         "sort loaded packages first, then alphabetically"
>>         loadedPackages := Set new: loaded size.
>>         loaded do:
>>                 [ : each | loadedPackages add: each packageName ].
>>         result := result asArray sort:
>>                 [ : a : b | | loadedA loadedB |
>>                 loadedA := loadedPackages includes: a.
>>                 loadedB := loadedPackages includes: b.
>>                 loadedA = loadedB
>>                         ifTrue: [ a < b ]
>>                         ifFalse: [ loadedA ] ].
>>         ^ packageNames := result collect:
>>                 [ : each | self packageHighlight: each ]!
>>
>>


More information about the Squeak-dev mailing list