The Trunk: Monticello-nice.741.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Monticello-nice.741.mcz

commits-2
Nicolas Cellier uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-nice.741.mcz

==================== Summary ====================

Name: Monticello-nice.741
Author: nice
Time: 12 April 2021, 11:55:44.241641 pm
UUID: ed3f3912-0b93-4673-acfe-b79c9e69886a
Ancestors: Monticello-eem.737, Monticello-ct.740, Monticello-jr.726, Monticello-ct.731, Monticello-ct.709

Merge commit:

Monticello-eem.737:
        Eliminate shadowed variable warning(s).

Monticello-ct.740:
        Introduces MCPackageNotFound exception and usees it in MCRepository versions lookup. I would like to catch this error in [1, 2, 3].

Monticello-jr.726:
        Fix wrong traitCompositions in packages loaded from source.st

Monticello-ct.731:
        Make sure to reset the modified flag for working copies that have become empty after merging a version.

Monticello-ct.709:
        Implement #doItReceiver and #doItContext on MCCodeTool. Allows, for example, for inspecting a class variable from a save version dialog.
       
- and its ancestor: -
Monticello-ct.708:
Fix MCSaveVersionDialog refreshing: Update text if the currently selected item changed

=============== Diff against Monticello-eem.737 ===============

Item was added:
+ ----- Method: MCCodeTool>>doItContext (in category 'accessing') -----
+ doItContext
+ ^ nil!

Item was added:
+ ----- Method: MCCodeTool>>doItReceiver (in category 'accessing') -----
+ doItReceiver
+ ^ self selectedClass!

Item was added:
+ Error subclass: #MCPackageNotFound
+ instanceVariableNames: 'repository packageName'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Monticello-Repositories'!

Item was added:
+ ----- Method: MCPackageNotFound class>>signalForRepository:packageName: (in category 'signaling') -----
+ signalForRepository: aRepository packageName: aString
+
+ ^ self new
+ repository: aRepository packageName: aString;
+ signal!

Item was added:
+ ----- Method: MCPackageNotFound>>messageText (in category 'printing') -----
+ messageText
+
+ ^ messageText ifNil: ['{1} not found in {2}' translated format: {self packageName. self repository}]!

Item was added:
+ ----- Method: MCPackageNotFound>>packageName (in category 'accessing') -----
+ packageName
+
+ ^ packageName!

Item was added:
+ ----- Method: MCPackageNotFound>>repository (in category 'accessing') -----
+ repository
+
+ ^ repository!

Item was added:
+ ----- Method: MCPackageNotFound>>repository:packageName: (in category 'accessing') -----
+ repository: aRepository packageName: aString
+
+ repository := aRepository.
+ packageName := aString.!

Item was changed:
  ----- Method: MCRepository>>highestNumberedVersionNameForPackageNamed: (in category 'versions') -----
  highestNumberedVersionNameForPackageNamed: aString
  ^ (self versionNamesForPackageNamed: aString)
+ ifEmpty: [MCPackageNotFound signalForRepository: self packageName: aString]
- ifEmpty: [ self error: aString , ' not found in ' , self asString ]
  ifNotEmptyDo:
  [ : versionNames | versionNames detectMax:
  [ : each | each versionNumber ] ]!

Item was changed:
  ----- Method: MCSaveVersionDialog>>refresh (in category 'actions') -----
  refresh
+ | latestSelection |
+ latestSelection := self selection.
+ self updateItems.
  self
+ selection: latestSelection;
+ changed: #list;
+ changed: #text.!
- updateItems ;
- changed: #list!

Item was changed:
  ----- Method: MCStReader>>classDefinitionFrom: (in category 'converting') -----
  classDefinitionFrom: aPseudoClass
+ | tokens definitionStream hasTraitComposition traitCompositionString lastIndex hasClassTraitComposition classTraitCompositionString typeOfSubclass className |
- | tokens traitCompositionString lastIndex classTraitCompositionString typeOfSubclass className |
  tokens := Scanner new scanTokens: aPseudoClass definition.
+ definitionStream := ReadStream on: aPseudoClass definition.
+ hasTraitComposition := definitionStream match: 'uses:'.
+ traitCompositionString := hasTraitComposition ifTrue: [(definitionStream upToAll: 'instanceVariableNames:') withBlanksTrimmed] ifFalse: ['{}'].
+ definitionStream := ReadStream on: aPseudoClass metaClass definition asString.
+ hasClassTraitComposition := definitionStream match: 'uses:'.
+ classTraitCompositionString := hasClassTraitComposition ifTrue: [(definitionStream upToAll: 'instanceVariableNames:') withBlanksTrimmed] ifFalse: ['{}'].
- traitCompositionString := ((ReadStream on: aPseudoClass definition)
- match: 'uses:';
- upToAll: 'instanceVariableNames:') withBlanksTrimmed.
- classTraitCompositionString := ((ReadStream on: aPseudoClass metaClass definition asString)
- match: 'uses:';
- upToAll: 'instanceVariableNames:') withBlanksTrimmed.
- traitCompositionString isEmpty ifTrue: [traitCompositionString := '{}'].
- classTraitCompositionString isEmpty ifTrue: [classTraitCompositionString := '{}'].
  lastIndex := tokens size.
 
  className := tokens at: 3.
  typeOfSubclass := self typeOfSubclass: (tokens at: 2).
  "Compiled code classes are special cases of the #bytes class type"
  (#bytes == typeOfSubclass and: [self compiledCodeClassNames includes: className])
  ifTrue: [typeOfSubclass := #compiledMethod].
 
  ^ MCClassDefinition
  name: className
  superclassName: (tokens at: 1)
  traitComposition: traitCompositionString
  classTraitComposition: classTraitCompositionString
  category: (tokens at: lastIndex)
  instVarNames: ((tokens at: lastIndex - 6) findTokens: ' ')
  classVarNames: ((tokens at: lastIndex - 4) findTokens: ' ')
  poolDictionaryNames: ((tokens at: lastIndex - 2) findTokens: ' ')
  classInstVarNames: (self classInstVarNamesFor: aPseudoClass)
  type: typeOfSubclass
  comment: (self commentFor: aPseudoClass)
  commentStamp: (self commentStampFor: aPseudoClass)!

Item was changed:
  ----- Method: MCWorkingCopy>>merged: (in category 'operations') -----
  merged: aVersion
  ancestry addAncestor: aVersion info.
+ self changed.
+ self checkModified.!
- self changed!