<br><br><div class="gmail_quote">On Wed, Aug 8, 2012 at 12:27 PM, Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This change is unsustainable and has broken the API contract with<br>
other respository types.  The only required MCRepository API that<br>
should be used by outside clients such as MCRepositoryInspector is:<br>
<br>
  #allPackageNames - answer a list of package names in this repository.<br>
  #basicStoreVersion: - add a Version to this repository.<br>
  #includesVersionNamed: - does a version with this name exist in this<br>
repository?<br>
  #versionNamed: - answer the first Version object with the given name.<br>
  #versionNamesForPackageNamed: - answer the version names for the<br>
given package name.<br>
  #versionWithInfo:ifAbsent: - answer the Version object with the<br>
given unique VersionInfo<br>
<br>
A detailed explanation is here:<br>
<br>
  <a href="http://lists.squeak.org/pipermail/squeak-dev/2011-March/157825.html" target="_blank">http://lists.squeak.org/pipermail/squeak-dev/2011-March/157825.html</a><br>
<br>
I use other repository types besides FileBased which are now broken by this.<br>
<br>
Eliot, is there some way to solve your issue without enumerating all<br>
filenames of a repository?<br></blockquote><div><br></div><div>I&#39;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&#39;s why:</div><div>
<br></div><div>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&#39;t find it.</div>
<div><br></div><div>b) the &quot;is the package modified&quot; highlighting (emboldening and underlining) is entirely misleading if branches and trunks are lumped together.</div><div><br></div><div>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).<br>
</div><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Jun 7, 2012 at 12:19 PM,  &lt;<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>&gt; wrote:<br>

&gt; Eliot Miranda uploaded a new version of Monticello to project The Trunk:<br>
&gt; <a href="http://source.squeak.org/trunk/Monticello-eem.512.mcz" target="_blank">http://source.squeak.org/trunk/Monticello-eem.512.mcz</a><br>
&gt;<br>
&gt; ==================== Summary ====================<br>
&gt;<br>
&gt; Name: Monticello-eem.512<br>
&gt; Author: eem<br>
&gt; Time: 7 June 2012, 10:17:48.386 am<br>
&gt; UUID: a2addfac-e45d-4770-8f36-250da0d46b0b<br>
&gt; Ancestors: Monticello-cmm.511<br>
&gt;<br>
&gt; Provide a preference (Browse branched package versions separately)<br>
&gt; that makes the repository inspector show branches as<br>
&gt; separate groups.  e.g. makes it easier to find the newest<br>
&gt; VMMaker.oscog amongst the trunk versions.<br>
&gt;<br>
&gt; =============== Diff against Monticello-cmm.511 ===============<br>
&gt;<br>
&gt; Item was added:<br>
&gt; + ----- Method: MCFileBasedRepository&gt;&gt;allPackageAndBranchNames (in category &#39;overriding&#39;) -----<br>
&gt; + allPackageAndBranchNames<br>
&gt; +       | answer |<br>
&gt; +       answer := Set new.<br>
&gt; +       self allFileNamesOrCache do:<br>
&gt; +               [ : each | | versionName |<br>
&gt; +               versionName := each asMCVersionName.<br>
&gt; +               versionName isValid ifTrue: [ answer add: versionName packageAndBranchName ] ].<br>
&gt; +       ^ answer!<br>
&gt;<br>
&gt; Item was changed:<br>
&gt;   ----- Method: MCFileRepositoryInspector&gt;&gt;versionNamesForSelectedPackage (in category &#39;private&#39;) -----<br>
&gt;   versionNamesForSelectedPackage<br>
&gt;         ^ self allVersionNames select:<br>
&gt; +               (self class browseBranchedVersionsSeparately<br>
&gt; +                       ifTrue: [[:each| each packageAndBranchName = selectedPackage]]<br>
&gt; +                       ifFalse: [[:each| each packageName = selectedPackage]])!<br>
&gt; -               [ : each | each packageName = selectedPackage ]!<br>
&gt;<br>
&gt; Item was changed:<br>
&gt; + ----- Method: MCGOODSRepository&gt;&gt;allPackageNames (in category &#39;packages&#39;) -----<br>
&gt; - ----- Method: MCGOODSRepository&gt;&gt;allPackageNames (in category &#39;as yet unclassified&#39;) -----<br>
&gt;   allPackageNames<br>
&gt;         ^ self root collect:<br>
&gt;                 [ : ea | ea package name ]!<br>
&gt;<br>
&gt; Item was changed:<br>
&gt;   MCVersionInspector subclass: #MCRepositoryInspector<br>
&gt;         instanceVariableNames: &#39;repository packageNames versionNames selectedPackage selectedVersion order versionInfo loaded newer inherited&#39;<br>
&gt; +       classVariableNames: &#39;BrowseBranchedVersionsSeparately Order&#39;<br>
&gt; -       classVariableNames: &#39;Order&#39;<br>
&gt;         poolDictionaries: &#39;&#39;<br>
&gt;         category: &#39;Monticello-UI&#39;!<br>
&gt;<br>
&gt; Item was added:<br>
&gt; + ----- Method: MCRepositoryInspector class&gt;&gt;browseBranchedVersionsSeparately (in category &#39;class initialization&#39;) -----<br>
&gt; + browseBranchedVersionsSeparately<br>
&gt; +<br>
&gt; +       &lt;preference: &#39;Browse branched package versions separately&#39;<br>
&gt; +       category: &#39;Monticello&#39;<br>
&gt; +       description: &#39;If true, versions of packages on branches will be shown in a separate section from trunk package versions&#39;<br>
&gt; +       type: #Boolean&gt;<br>
&gt; +       ^BrowseBranchedVersionsSeparately ifNil: [false]!<br>
&gt;<br>
&gt; Item was added:<br>
&gt; + ----- Method: MCRepositoryInspector class&gt;&gt;browseBranchedVersionsSeparately: (in category &#39;class initialization&#39;) -----<br>
&gt; + browseBranchedVersionsSeparately: aBoolean<br>
&gt; +       BrowseBranchedVersionsSeparately := aBoolean!<br>
&gt;<br>
&gt; Item was changed:<br>
&gt; + ----- Method: MCRepositoryInspector class&gt;&gt;order (in category &#39;class initialization&#39;) -----<br>
&gt; - ----- Method: MCRepositoryInspector class&gt;&gt;order (in category &#39;as yet unclassified&#39;) -----<br>
&gt;   order<br>
&gt;         Order isNil<br>
&gt;                 ifTrue: [ Order := 5 ].<br>
&gt;         ^Order!<br>
&gt;<br>
&gt; Item was changed:<br>
&gt; + ----- Method: MCRepositoryInspector class&gt;&gt;order: (in category &#39;class initialization&#39;) -----<br>
&gt; - ----- Method: MCRepositoryInspector class&gt;&gt;order: (in category &#39;as yet unclassified&#39;) -----<br>
&gt;   order: anInteger<br>
&gt;         Order := anInteger!<br>
&gt;<br>
&gt; Item was changed:<br>
&gt; + ----- Method: MCRepositoryInspector class&gt;&gt;repository:workingCopy: (in category &#39;instance creation&#39;) -----<br>
&gt; - ----- Method: MCRepositoryInspector class&gt;&gt;repository:workingCopy: (in category &#39;as yet unclassified&#39;) -----<br>
&gt;   repository: aFileBasedRepository workingCopy: aWorkingCopy<br>
&gt;         ^self new<br>
&gt;                 setRepository: aFileBasedRepository workingCopy: aWorkingCopy;<br>
&gt;                 yourself!<br>
&gt;<br>
&gt; Item was changed:<br>
&gt;   ----- Method: MCRepositoryInspector&gt;&gt;packageList (in category &#39;morphic ui&#39;) -----<br>
&gt;   packageList<br>
&gt;         | result loadedPackages |<br>
&gt;         packageNames ifNotNil: [ ^ packageNames ].<br>
&gt;         repository cacheAllFileNamesDuring:<br>
&gt;                 [ &quot;Enjoy emphasis side-effects of populating my versionNames.&quot;<br>
&gt;                 self versionNames.<br>
&gt; +               result := self class browseBranchedVersionsSeparately<br>
&gt; +                                       ifTrue: [ repository allPackageAndBranchNames ]<br>
&gt; +                                       ifFalse: [ repository allPackageNames ] ].<br>
&gt; -               result := repository allPackageNames ].<br>
&gt;         &quot;sort loaded packages first, then alphabetically&quot;<br>
&gt;         loadedPackages := Set new: loaded size.<br>
&gt;         loaded do:<br>
&gt;                 [ : each | loadedPackages add: each packageName ].<br>
&gt;         result := result asArray sort:<br>
&gt;                 [ : a : b | | loadedA loadedB |<br>
&gt;                 loadedA := loadedPackages includes: a.<br>
&gt;                 loadedB := loadedPackages includes: b.<br>
&gt;                 loadedA = loadedB<br>
&gt;                         ifTrue: [ a &lt; b ]<br>
&gt;                         ifFalse: [ loadedA ] ].<br>
&gt;         ^ packageNames := result collect:<br>
&gt;                 [ : each | self packageHighlight: each ]!<br>
&gt;<br></blockquote></div><div><br></div>-- <br>best,<div>Eliot</div><br>