Eliot Miranda uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-eem.617.mcz
==================== Summary ====================
Name: Monticello-eem.617
Author: eem
Time: 27 August 2015, 5:09:02.395 pm
UUID: 4330481f-87ae-4d7b-b2aa-0969f0611256
Ancestors: Monticello-cmm.616
Add a menu item to nuke Monticello load change sets. This is more involved than it should be but we're getting there. Needs Morphic-eem.1002
=============== Diff against Monticello-cmm.616 ===============
Item was added:
+ ----- Method: ChangeSet>>isForPackageLoad (in category '*Monticello-testing') -----
+ isForPackageLoad
+ | packageName |
+ ^(name includes: $-)
+ and: [name last isDigit
+ and: [packageName := name first: ((name indexOf: $. ifAbsent: [name size])
+ min: (name lastIndexOf: $-)) - 1.
+ MCWorkingCopy allManagers anySatisfy: [:wc| wc packageName = packageName]]]!
Item was added:
+ ----- Method: ChangeSorter>>deleteMonticelloChangeSets (in category '*Monticello-changeSet menu') -----
+ deleteMonticelloChangeSets
+ "Destroy all change sets from Monticello loads, provided the currently selected change set is not one of those, and the user really wants to do this."
+
+ myChangeSet isForPackageLoad ifTrue: "forms current changes for current project"
+ [^self inform: 'current change set is a Monticello load change set.\Please select some other change set before deleting Monticello load change sets.' withCRs].
+ (self confirm: 'Are you sure you want to delete all change sets due to Monticello package loads?') ifFalse:
+ [^self].
+
+ (ChangesOrganizer allChangeSets select: [:cs| cs isForPackageLoad]) do:
+ [:cs| ChangesOrganizer removeChangeSet: cs].
+
+ self changed: #changeSetList.
+ self showChangeSet: ChangeSet current!
Item was added:
+ ----- Method: ChangeSorter>>monticelloChangeSetMenu: (in category '*Monticello-changeSet menu') -----
+ monticelloChangeSetMenu: aMenu
+ <changeSetMenuShifted: false>
+ <menuPriority: 600>
+ "Sigh, when implementing menu pragmas this is not what I had in mind..."
+ aMenu add: 'delete Monticello load change sets' action: #deleteMonticelloChangeSets.
+ (aMenu submorphs
+ detect: [:m| m isMenuItemMorph and: [m contents beginsWith: 'destroy change set']]
+ ifNone: []) ifNotNil:
+ [:destroyItem| | item |
+ aMenu removeMorph: (item := aMenu submorphs last).
+ aMenu addMorph: item after: destroyItem].
+ ^aMenu!
Eliot Miranda uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-eem.617.mcz
==================== Summary ====================
Name: Monticello-eem.617
Author: eem
Time: 27 August 2015, 5:09:02.395 pm
UUID: 4330481f-87ae-4d7b-b2aa-0969f0611256
Ancestors: Monticello-cmm.616
Add a menu item to nuke Monticello load change sets. This is more involved than it should be but we're getting there. Needs Morphic-eem.1002
=============== Diff against Monticello-cmm.616 ===============
Item was added:
+ ----- Method: ChangeSet>>isForPackageLoad (in category '*Monticello-testing') -----
+ isForPackageLoad
+ | packageName |
+ ^(name includes: $-)
+ and: [name last isDigit
+ and: [packageName := name first: ((name indexOf: $. ifAbsent: [name size])
+ min: (name lastIndexOf: $-)) - 1.
+ MCWorkingCopy allManagers anySatisfy: [:wc| wc packageName = packageName]]]!
Item was added:
+ ----- Method: ChangeSorter>>deleteMonticelloChangeSets (in category '*Monticello-changeSet menu') -----
+ deleteMonticelloChangeSets
+ "Destroy all change sets from Monticello loads, provided the currently selected change set is not one of those, and the user really wants to do this."
+
+ myChangeSet isForPackageLoad ifTrue: "forms current changes for current project"
+ [^self inform: 'current change set is a Monticello load change set.\Please select some other change set before deleting Monticello load change sets.' withCRs].
+ (self confirm: 'Are you sure you want to delete all change sets due to Monticello package loads?') ifFalse:
+ [^self].
+
+ (ChangesOrganizer allChangeSets select: [:cs| cs isForPackageLoad]) do:
+ [:cs| ChangesOrganizer removeChangeSet: cs].
+
+ self changed: #changeSetList.
+ self showChangeSet: ChangeSet current!
Item was added:
+ ----- Method: ChangeSorter>>monticelloChangeSetMenu: (in category '*Monticello-changeSet menu') -----
+ monticelloChangeSetMenu: aMenu
+ <changeSetMenuShifted: false>
+ <menuPriority: 600>
+ "Sigh, when implementing menu pragmas this is not what I had in mind..."
+ aMenu add: 'delete Monticello load change sets' action: #deleteMonticelloChangeSets.
+ (aMenu submorphs
+ detect: [:m| m isMenuItemMorph and: [m contents beginsWith: 'destroy change set']]
+ ifNone: []) ifNotNil:
+ [:destroyItem| | item |
+ aMenu removeMorph: (item := aMenu submorphs last).
+ aMenu addMorph: item after: destroyItem].
+ ^aMenu!
Eliot Miranda uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-eem.1002.mcz
==================== Summary ====================
Name: Morphic-eem.1002
Author: eem
Time: 27 August 2015, 5:03:26.429 pm
UUID: d94fff6d-5fef-4500-9144-4dc8bfa1510e
Ancestors: Morphic-mt.1001
It's really convenient to be able to identify MenuItemMorphs easily.
=============== Diff against Morphic-mt.1001 ===============
Item was added:
+ ----- Method: MenuItemMorph>>isMenuItemMorph (in category 'testing') -----
+ isMenuItemMorph
+ ^true!
Item was added:
+ ----- Method: Morph>>isMenuItemMorph (in category 'testing') -----
+ isMenuItemMorph
+ ^false!
Eliot Miranda uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-eem.1002.mcz
==================== Summary ====================
Name: Morphic-eem.1002
Author: eem
Time: 27 August 2015, 5:03:26.429 pm
UUID: d94fff6d-5fef-4500-9144-4dc8bfa1510e
Ancestors: Morphic-mt.1001
It's really convenient to be able to identify MenuItemMorphs easily.
=============== Diff against Morphic-mt.1001 ===============
Item was added:
+ ----- Method: MenuItemMorph>>isMenuItemMorph (in category 'testing') -----
+ isMenuItemMorph
+ ^true!
Item was added:
+ ----- Method: Morph>>isMenuItemMorph (in category 'testing') -----
+ isMenuItemMorph
+ ^false!
Eliot Miranda uploaded a new version of Traits to project The Trunk:
http://source.squeak.org/trunk/Traits-eem.306.mcz
==================== Summary ====================
Name: Traits-eem.306
Author: eem
Time: 27 August 2015, 3:56:23.871 pm
UUID: 17370ed0-0211-4deb-a99b-4678a8eddea1
Ancestors: Traits-ul.305
Save a version of Traits that resets the format of existing traits if they were wrong. The Spur bootstrap failed to reset Trait formats so they were left at the V3 value for a zero inst sized pointer class, or 2.
=============== Diff against Traits-ul.305 ===============
Item was added:
+ (PackageInfo named: 'Traits') preamble: '"Update traits to have zero inst size. the Spur bootstrap failed to reset Trait formats so they were left at the V3 value for a zero inst sized pointer class, or 2"
+ Smalltalk allTraits do:
+ [:t|
+ t instSize > 0 ifTrue:
+ [t setFormat: 0]]'!
Eliot Miranda uploaded a new version of Traits to project The Trunk:
http://source.squeak.org/trunk/Traits-eem.306.mcz
==================== Summary ====================
Name: Traits-eem.306
Author: eem
Time: 27 August 2015, 3:56:23.871 pm
UUID: 17370ed0-0211-4deb-a99b-4678a8eddea1
Ancestors: Traits-ul.305
Save a version of Traits that resets the format of existing traits if they were wrong. The Spur bootstrap failed to reset Trait formats so they were left at the V3 value for a zero inst sized pointer class, or 2.
=============== Diff against Traits-ul.305 ===============
Item was added:
+ (PackageInfo named: 'Traits') preamble: '"Update traits to have zero inst size. the Spur bootstrap failed to reset Trait formats so they were left at the V3 value for a zero inst sized pointer class, or 2"
+ Smalltalk allTraits do:
+ [:t|
+ t instSize > 0 ifTrue:
+ [t setFormat: 0]]'!
Tobias Pape uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-topa.764.mcz
==================== Summary ====================
Name: System-topa.764
Author: topa
Time: 27 August 2015, 11:47:04.664 pm
UUID: c205a736-8aff-48c5-8b3b-24ec808d19fd
Ancestors: System-topa.763
Do not return nil for unknown preferences in dNU magic but rather bail.
=============== Diff against System-topa.763 ===============
Item was changed:
----- Method: Preferences class>>doesNotUnderstand: (in category 'get/set') -----
doesNotUnderstand: aMessage
"Interpret unary message selectors as preference id."
^ aMessage arguments size > 0
ifTrue: [super doesNotUnderstand: aMessage]
+ ifFalse: [
+ self
+ valueOfPreference: aMessage selector
+ ifAbsent: [super doesNotUnderstand: aMessage]]!
- ifFalse: [self valueOfPreference: aMessage selector]!
Tobias Pape uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-topa.764.mcz
==================== Summary ====================
Name: System-topa.764
Author: topa
Time: 27 August 2015, 11:47:04.664 pm
UUID: c205a736-8aff-48c5-8b3b-24ec808d19fd
Ancestors: System-topa.763
Do not return nil for unknown preferences in dNU magic but rather bail.
=============== Diff against System-topa.763 ===============
Item was changed:
----- Method: Preferences class>>doesNotUnderstand: (in category 'get/set') -----
doesNotUnderstand: aMessage
"Interpret unary message selectors as preference id."
^ aMessage arguments size > 0
ifTrue: [super doesNotUnderstand: aMessage]
+ ifFalse: [
+ self
+ valueOfPreference: aMessage selector
+ ifAbsent: [super doesNotUnderstand: aMessage]]!
- ifFalse: [self valueOfPreference: aMessage selector]!
Tobias Pape uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-topa.763.mcz
==================== Summary ====================
Name: System-topa.763
Author: topa
Time: 27 August 2015, 11:39:32.305 pm
UUID: 8731d6a1-ac9a-4cb9-90cf-92400d1289d2
Ancestors: System-mt.762
since any system event fires #prefEvent:, any addition of a class side method with some pragma will fire #addPragmaPreference. So instead of bailing, just do nothing when the method is in fact no pref.
=============== Diff against System-mt.762 ===============
Item was changed:
----- Method: Preferences class>>addPragmaPreference: (in category 'add/remove') -----
addPragmaPreference: pragma
"Note that there will be no accessor method generated because the pragma's method does already govern that."
| preference |
- self assert: pragma methodClass isMeta.
((pragma keyword beginsWith: #preference:) and: [self respondsTo: pragma keyword])
+ ifFalse: [
+ "no pragma pref to be defined. do nothing"
+ ^ self].
+ self assert: pragma methodClass isMeta.
- ifFalse: [Error signal: 'Cannot create pragma preference object.'. ^ self].
preference := self
perform: pragma keyword
withArguments: pragma arguments.
preference
provider: pragma methodClass theNonMetaClass
getter: pragma method selector
setter: pragma method selector asMutator.
self atomicUpdatePreferences: [ :copyOfDictionaryOfPreferences |
copyOfDictionaryOfPreferences
at: preference id
put: preference].
^ preference!
Tobias Pape uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-topa.763.mcz
==================== Summary ====================
Name: System-topa.763
Author: topa
Time: 27 August 2015, 11:39:32.305 pm
UUID: 8731d6a1-ac9a-4cb9-90cf-92400d1289d2
Ancestors: System-mt.762
since any system event fires #prefEvent:, any addition of a class side method with some pragma will fire #addPragmaPreference. So instead of bailing, just do nothing when the method is in fact no pref.
=============== Diff against System-mt.762 ===============
Item was changed:
----- Method: Preferences class>>addPragmaPreference: (in category 'add/remove') -----
addPragmaPreference: pragma
"Note that there will be no accessor method generated because the pragma's method does already govern that."
| preference |
- self assert: pragma methodClass isMeta.
((pragma keyword beginsWith: #preference:) and: [self respondsTo: pragma keyword])
+ ifFalse: [
+ "no pragma pref to be defined. do nothing"
+ ^ self].
+ self assert: pragma methodClass isMeta.
- ifFalse: [Error signal: 'Cannot create pragma preference object.'. ^ self].
preference := self
perform: pragma keyword
withArguments: pragma arguments.
preference
provider: pragma methodClass theNonMetaClass
getter: pragma method selector
setter: pragma method selector asMutator.
self atomicUpdatePreferences: [ :copyOfDictionaryOfPreferences |
copyOfDictionaryOfPreferences
at: preference id
put: preference].
^ preference!