A new version of Monticello was added to project The Inbox:
http://source.squeak.org/inbox/Monticello-mva.662.mcz ==================== Summary ==================== Name: Monticello-mva.662 Author: mva Time: 9 February 2017, 9:32:09.809941 pm UUID: a5886414-f70f-9a42-82aa-99bc3158ef95 Ancestors: Monticello-mva.661 fix filtering for Repository browser's versionList =============== Diff against Monticello-mva.661 =============== Item was changed: MCVersionInspector subclass: #MCRepositoryInspector + instanceVariableNames: 'repository packageNames versionNames selectedPackage selectedVersion order versionInfo loaded newer inherited versionList versionSelection' - instanceVariableNames: 'repository packageNames versionNames selectedPackage selectedVersion order versionInfo loaded newer inherited' classVariableNames: 'BrowseBranchedVersionsSeparately Order' poolDictionaries: '' category: 'Monticello-UI'! Item was changed: ----- Method: MCRepositoryInspector>>order: (in category 'morphic ui') ----- order: anInteger self class order: (order := anInteger). + self versionList: nil. self changed: #versionList.! Item was changed: ----- Method: MCRepositoryInspector>>packageSelection: (in category 'morphic ui') ----- packageSelection: aNumber selectedPackage := (aNumber between: 1 and: self packageList size) ifTrue: [ (self packageList at: aNumber) asString ]. self versionSelection: 0. versionNames := nil. + self versionList: nil. self changed: #packageSelection; changed: #versionList! Item was changed: ----- Method: MCRepositoryInspector>>refresh (in category 'actions') ----- refresh packageNames := versionNames := newer := nil. repository refresh. + self versionList: nil. self changed: #packageList ; changed: #versionList.! Item was changed: ----- Method: MCRepositoryInspector>>versionList (in category 'morphic ui') ----- versionList | result | + versionList ifNotNil: [ ^ versionList ]. + result := selectedPackage ifNil: [ self versionNamesForNoPackageSelection ] ifNotNil: [ self versionNamesForSelectedPackage ]. (self orderSpecs at: order) value ifNotNil: [ : sortBlock | result sort: [ : a : b | sortBlock value: a value: b ] ]. + ^ versionList := result collect: - ^ result collect: [ : each | self versionHighlight: each ]! Item was added: + ----- Method: MCRepositoryInspector>>versionList: (in category 'morphic ui') ----- + versionList: aValue + versionList := aValue! Item was changed: ----- Method: MCRepositoryInspector>>versionSelection (in category 'morphic ui') ----- versionSelection + ^ versionSelection ifNil: [ 0 ]! - ^self versionList indexOf: selectedVersion! Item was changed: ----- Method: MCRepositoryInspector>>versionSelection: (in category 'morphic ui') ----- versionSelection: aNumber + versionSelection := aNumber. selectedVersion := version := nil. aNumber isZero ifFalse: [ selectedVersion := (self versionList at: aNumber) asString ]. self changed: #versionSelection ; changed: #summary ; changed: #hasVersion! |
I was excited to test this, it is something that's bugged me for some time.
Hm, it seems like its a *little* better, but still not really able to filter the repository list.. It still wants to download a new mcz on every keystroke. I was thinking that the filtering feature, maybe for this pane only (based on some new boolean switch in the Model), could wait a half-second before initiating the filter. Every keystroke would reset the half-second timer.. On Thu, Feb 9, 2017 at 3:01 PM, <[hidden email]> wrote: > A new version of Monticello was added to project The Inbox: > http://source.squeak.org/inbox/Monticello-mva.662.mcz > > ==================== Summary ==================== > > Name: Monticello-mva.662 > Author: mva > Time: 9 February 2017, 9:32:09.809941 pm > UUID: a5886414-f70f-9a42-82aa-99bc3158ef95 > Ancestors: Monticello-mva.661 > > fix filtering for Repository browser's versionList > > =============== Diff against Monticello-mva.661 =============== > > Item was changed: > MCVersionInspector subclass: #MCRepositoryInspector > + instanceVariableNames: 'repository packageNames versionNames selectedPackage selectedVersion order versionInfo loaded newer inherited versionList versionSelection' > - instanceVariableNames: 'repository packageNames versionNames selectedPackage selectedVersion order versionInfo loaded newer inherited' > classVariableNames: 'BrowseBranchedVersionsSeparately Order' > poolDictionaries: '' > category: 'Monticello-UI'! > > Item was changed: > ----- Method: MCRepositoryInspector>>order: (in category 'morphic ui') ----- > order: anInteger > self class order: (order := anInteger). > + self versionList: nil. > self changed: #versionList.! > > Item was changed: > ----- Method: MCRepositoryInspector>>packageSelection: (in category 'morphic ui') ----- > packageSelection: aNumber > selectedPackage := (aNumber between: 1 and: self packageList size) > ifTrue: [ (self packageList at: aNumber) asString ]. > self versionSelection: 0. > versionNames := nil. > + self versionList: nil. > self changed: #packageSelection; changed: #versionList! > > Item was changed: > ----- Method: MCRepositoryInspector>>refresh (in category 'actions') ----- > refresh > packageNames := versionNames := newer := nil. > repository refresh. > + self versionList: nil. > self > changed: #packageList ; > changed: #versionList.! > > Item was changed: > ----- Method: MCRepositoryInspector>>versionList (in category 'morphic ui') ----- > versionList > | result | > + versionList ifNotNil: [ ^ versionList ]. > + > result := selectedPackage > ifNil: [ self versionNamesForNoPackageSelection ] > ifNotNil: [ self versionNamesForSelectedPackage ]. > (self orderSpecs at: order) value ifNotNil: > [ : sortBlock | result sort: > [ : a : b | sortBlock > value: a > value: b ] ]. > + ^ versionList := result collect: > - ^ result collect: > [ : each | self versionHighlight: each ]! > > Item was added: > + ----- Method: MCRepositoryInspector>>versionList: (in category 'morphic ui') ----- > + versionList: aValue > + versionList := aValue! > > Item was changed: > ----- Method: MCRepositoryInspector>>versionSelection (in category 'morphic ui') ----- > versionSelection > + ^ versionSelection ifNil: [ 0 ]! > - ^self versionList indexOf: selectedVersion! > > Item was changed: > ----- Method: MCRepositoryInspector>>versionSelection: (in category 'morphic ui') ----- > versionSelection: aNumber > + versionSelection := aNumber. > selectedVersion := version := nil. > aNumber isZero ifFalse: [ selectedVersion := (self versionList at: aNumber) asString ]. > self > changed: #versionSelection ; > changed: #summary ; > changed: #hasVersion! > > |
Hi Chris,
It is not the downloading that is the problem. It is the sheer number of files that the current Monticello Repository browser implementation can not handle gracefully. There are 9646 filenames in the trunk repository. And that is the problem. And that is exactly what this commit fixes. Let me demonstrate. You can do a test with a local file repository that contains 9646 files. You can create those as empty files, just the filenames really. The filenames have to be what Monticello expects, namely Monticello-test.1.mcz to Monticello-test.9646.mcz And you have to make Monticello stop displaying the summaries which will stop it from reading the files. This is how you create the directory. d1 := FileDirectory forFileName: 'C:\'. d1 createDirectory: 'repo1'. This is how you create the files. d := FileDirectory forFileName: 'C:\repo1\'. 1 to: 9646 do: [:i | | f | fn := 'Monticello-test.', i asString, '.mcz'. [ f := d fileNamed: fn] ensure: [ f close ] ]. This is how you disable the displaying of summary information for packages not in the cache. !MCFileRepositoryInspector methodsFor: 'private' stamp: 'mva 2/11/2017 17:56'! summary ^(self hasVersion and: [ (repository cache at: selectedVersion ifAbsent: []) notNil ] ) ifTrue: [ self versionSummary ] ifFalse: [ String new ] ! ! Now add C:\repo1 as a directory repository to Monticello browser. Now you can open a Repository browser on the repository and try using filtering. It won't work even though there is no downloading involved. Now load this commit. And voila! You can filter all you want. Local and remote. Directory and HTTP. Best Regards, Milan |
In reply to this post by Chris Muller-3
> I was excited to test this, it is something that's bugged me for some time.
Glad to hear that. > Hm, it seems like its a *little* better, but still not really able to > filter the repository list.. It still wants to download a new mcz on > every keystroke. It got me a *little* disappointed to hear you think it is a *little* better. I wonder what made you think that. Yes it did not fix the downloading but that is a separate issue. Since the downloading does get in the way you would have to placate it by playing along. Say you wanted to see all versions by author cmm. You would have to type c, then wait for the downloading to finish. Then type cm and wait for the downloading to finish. Then cmm and wait for the downloading to finish. But after it did the list would be filtered. So it were quite able to filter the list. With caveats. > > I was thinking that the filtering feature, maybe for this pane only > (based on some new boolean switch in the Model), could wait a > half-second before initiating the filter. Every keystroke would reset > the half-second timer.. Thanks for the idea of delaying the download of the selected version in the remote repository browser. It got me thinking. I do not currently know how to fix the downloading issue but I'll see if I can figure out some way of doing that. Best Regards, Milan Vavra |
Free forum by Nabble | Edit this page |