[Pkg] The Trunk: Monticello-eem.617.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Aug 28 00:09:22 UTC 2015
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!
More information about the Packages
mailing list