[squeak-dev] The Inbox: Monticello-nice.734.mcz
David T. Lewis
lewis at mail.msen.com
Wed Dec 30 16:52:38 UTC 2020
On Wed, Dec 30, 2020 at 02:57:23PM +0000, commits at source.squeak.org wrote:
> A new version of Monticello was added to project The Inbox:
> ==================== Summary ====================
> Name: Monticello-nice.734
> Author: nice
> Time: 30 December 2020, 3:57:21.60758 pm
> UUID: 863f642a-7795-4eb6-aa6b-76a5af3a8504
> Ancestors: Monticello-mt.733
> Workaround version history browser bug when 'working copy' is selected.
> The snapshot is searched in repositoryGroup, and logically, none is found.
> Note that the self selectedInfo isKindOf: MCWorkingCopyAncestry, which does not behave as a regular MCVersionInfo, it does not even answer to versionName...
> This somehow accelerate the failure thru an ifError:  handling, but at the end, the selectedSnapshot is still nil which makes the 'view changes from...' menu fail.
> The workaround is not very nice, it use implicit knowledge that 'working copy' will be at top of list (index = 1).
> If you can think of nicer fix, please raise voice.
Attached is another way to do it without relying on the list index. I have
not tested very much but it seems to be all right.
"Answer snapshot for aVersionInfo or for the working copy if not found"
^ (self repositoryGroup
ifNone: [ package ]) snapshot
Apologies for violating MC package standards by including a method comment ;-)
-------------- next part --------------
'From Squeak6.0alpha of 30 December 2020 [latest update: #20138] on 30 December 2020 at 11:42:15 am'!!MCVersionHistoryBrowser methodsFor: 'accessing' stamp: 'dtl 12/30/2020 11:34'!snapshotForInfo: aVersionInfo "Answer snapshot for aVersionInfo or for the working copy if not found" ^ (self repositoryGroup versionWithInfo: aVersionInfo ifNone: [ package ]) snapshot! !
More information about the Squeak-dev