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

Eliot Miranda eliot.miranda at gmail.com
Wed Aug 8 21:42:23 UTC 2012


On Wed, Aug 8, 2012 at 12: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?
>

I'm out of my depth here.  Bert is the authority.  But I do know it is
absolutely necessary to take account of the branch name.  Here's why:

a) finding the head of a branch is extremely difficult if it is lumped in
with the trunk.  For example in VMMaker the head of VMMaker is 284 while
the head of VMMaker.oscog is 196.  So VMMaker.oscog is buried far down the
list.  This is sort-of sufferable by me, but not by newbies who likely
won't find it.

b) the "is the package modified" highlighting (emboldening and underlining)
is entirely misleading if branches and trunks are lumped together.

So please reconsider.  Monticello used to separate trunks and branches. The
change that lumped them together make the system difficult to use for some
packages (and I hope you agree VMMaker is kind of important).


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 ]!
> >
>

-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20120808/eadd115d/attachment.htm


More information about the Squeak-dev mailing list