Marcel Taeumel uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-bf.532.mcz ==================== Summary ==================== Name: Monticello-bf.532 Author: bf Time: 24 January 2013, 4:05:51.496 pm UUID: 71bddd0f-d5ac-488b-a8e1-729f2a06474e Ancestors: Monticello-bf.531 Save dialog now shows a list of changes to be submitted. Clicking a list item shows a diff in the lower pane. Advanced users can also make this save ignore individual changes using the item's context menu. =============== Diff against Monticello-bf.531 =============== Item was added: + ----- Method: MCPatch>>ignoring: (in category 'accessing') ----- + ignoring: ignoredOperations + ^ MCPatch operations: (operations difference: ignoredOperations)! Item was changed: + MCPatchBrowser subclass: #MCSaveVersionDialog + instanceVariableNames: 'name message ignore' - MCTool subclass: #MCSaveVersionDialog - instanceVariableNames: 'name message' classVariableNames: '' poolDictionaries: '' category: 'Monticello-UI'! Item was changed: ----- Method: MCSaveVersionDialog>>accept (in category 'as yet unclassified') ----- accept self answer: (Array with: (self findTextMorph: #versionName) text asString + with: (self findTextMorph: #logMessage) text asString + with: ignore) + ! - with: (self findTextMorph: #logMessage) text asString) - ! Item was added: + ----- Method: MCSaveVersionDialog>>ignore (in category 'as yet unclassified') ----- + ignore + ^ ignore ifNil: [ignore := Set new]! Item was added: + ----- Method: MCSaveVersionDialog>>ignoreSelection (in category 'as yet unclassified') ----- + ignoreSelection + selection + ifNil: [ignore size = items size + ifFalse: [ignore addAll: items] + ifTrue: [ignore removeAll]] + ifNotNil: [ + ignore remove: selection ifAbsent: [ + ignore add: selection]]. + self changed: #list + ! Item was added: + ----- Method: MCSaveVersionDialog>>installSelection (in category 'as yet unclassified') ----- + installSelection + super installSelection. + selection ifNotNil: [ + ignore remove: selection ifAbsent: []. + self changed: #list]. + + ! Item was added: + ----- Method: MCSaveVersionDialog>>list (in category 'as yet unclassified') ----- + list + ^ self items collect: [:ea | + (self ignore includes: ea) + ifFalse: [ea summary] + ifTrue: [Text string: '( ', ea summary, ' )' attribute: TextEmphasis struckOut ]]! Item was added: + ----- Method: MCSaveVersionDialog>>methodListKey:from: (in category 'as yet unclassified') ----- + methodListKey: aKeystroke from: aListMorph + aKeystroke caseOf: { + [$I] -> [self ignoreSelection]. + } otherwise: [super methodListKey: aKeystroke from: aListMorph ]! Item was added: + ----- Method: MCSaveVersionDialog>>methodListMenu: (in category 'as yet unclassified') ----- + methodListMenu: aMenu + aMenu addList:#( + ('ignore (I)' ignoreSelection 'Do not include this change when saving') + -). + super methodListMenu: aMenu. + ^aMenu! Item was added: + ----- Method: MCSaveVersionDialog>>revertSelection (in category 'as yet unclassified') ----- + revertSelection + super revertSelection. + selection ifNotNil: [ + ignore add: selection. + self changed: #list]. + ! Item was changed: ----- Method: MCSaveVersionDialog>>widgetSpecs (in category 'as yet unclassified') ----- widgetSpecs ^ #( ((textMorph: versionName) (0 0 1 0) (0 0 0 30)) + ((textMorph: logMessage) (0 0 1 0.3) (0 30 0 -30)) + ((buttonRow) (0 0.3 1 0.3) (0 -40 0 0)) + ((listMorph:selection:menu:keystroke: list selection methodListMenu: methodListKey:from:) (0 0.3 1 0.6) (0 0 0 0)) + ((textMorph: text) (0 0.6 1 1) (0 0 0 0)) - ((textMorph: logMessage) (0 0 1 1) (0 30 0 -30)) - ((buttonRow) (0 1 1 1) (0 -40 0 0)) )! Item was changed: Notification subclass: #MCVersionNameAndMessageRequest + instanceVariableNames: 'suggestion initialMessage patch' - instanceVariableNames: 'suggestion initialMessage' classVariableNames: '' poolDictionaries: '' category: 'Monticello-Versioning'! Item was changed: ----- Method: MCVersionNameAndMessageRequest>>defaultAction (in category 'as yet unclassified') ----- defaultAction ^ MCSaveVersionDialog new versionName: suggestion; logMessage: initialMessage; + patch: patch; showModally! Item was added: + ----- Method: MCVersionNameAndMessageRequest>>patch (in category 'as yet unclassified') ----- + patch + ^ patch! Item was added: + ----- Method: MCVersionNameAndMessageRequest>>patch: (in category 'as yet unclassified') ----- + patch: aPatch + patch := aPatch + ! Item was changed: ----- Method: MCWorkingCopy>>newVersion (in category 'operations') ----- newVersion + | packageSnapshot parentSnapshot patch | + parentSnapshot := self parentSnapshot. + packageSnapshot := package snapshot. + patch := packageSnapshot patchRelativeToBase: parentSnapshot. ^ (self requestVersionNameAndMessageWithSuggestion: self uniqueVersionName + initialMessage: self patchMessageDefault + patch: patch) ifNotNil: + [:tuple | + self newVersionWithName: tuple first withBlanksTrimmed + message: (self patchMessageStripped: tuple second) + snapshot: (tuple third + ifEmpty: [packageSnapshot] + ifNotEmpty: [ + MCPatcher apply: (patch ignoring: tuple third) + to: parentSnapshot])] - initialMessage: self patchMessageSuggestion) ifNotNil: - [:pair | - self newVersionWithName: pair first withBlanksTrimmed - message: (self patchMessageStripped: pair last)]. ! Item was changed: ----- Method: MCWorkingCopy>>newVersionWithName:message: (in category 'operations') ----- newVersionWithName: nameString message: messageString + ^self newVersionWithName: nameString message: messageString snapshot: package snapshot! - | info deps | - info := ancestry infoWithName: nameString message: messageString. - ancestry := MCWorkingAncestry new addAncestor: info. - self modified: true; modified: false. - - deps := self requiredPackages collect: - [:ea | - MCVersionDependency - package: ea - info: ea workingCopy currentVersionInfo]. - - ^ MCVersion - package: package - info: info - snapshot: package snapshot - dependencies: deps! Item was added: + ----- Method: MCWorkingCopy>>newVersionWithName:message:snapshot: (in category 'operations') ----- + newVersionWithName: nameString message: messageString snapshot: aSnapshot + | info deps clean | + info := ancestry infoWithName: nameString message: messageString. + ancestry := MCWorkingAncestry new addAncestor: info. + clean := (package snapshot patchRelativeToBase: aSnapshot) isEmpty. + self modified: clean; modified: clean not. "hack to ensure label is updated" + + deps := self requiredPackages collect: + [:ea | + MCVersionDependency + package: ea + info: ea workingCopy currentVersionInfo]. + + ^ MCVersion + package: package + info: info + snapshot: aSnapshot + dependencies: deps! Item was added: + ----- Method: MCWorkingCopy>>parentSnapshot (in category 'private') ----- + parentSnapshot + ^ self findSnapshotWithVersionInfo: (self ancestors + ifEmpty: [nil] + ifNotEmpty: [self ancestors first])! Item was changed: ----- Method: MCWorkingCopy>>patchMessageChanges (in category 'operations') ----- patchMessageChanges + | changes | + changes := package snapshot patchRelativeToBase: self parentSnapshot. - | changes parentInfo parentSnapshot | - parentInfo := self ancestors - ifEmpty: [nil] - ifNotEmpty: [self ancestors first]. - parentSnapshot := self findSnapshotWithVersionInfo: parentInfo. - changes := package snapshot patchRelativeToBase: parentSnapshot. ^ (MCPatchMessage new patch: changes) message! Item was removed: - ----- Method: MCWorkingCopy>>requestVersionNameAndMessageWithSuggestion:initialMessage: (in category 'private') ----- - requestVersionNameAndMessageWithSuggestion: nameString initialMessage: msgString - ^ (MCVersionNameAndMessageRequest new - suggestedName: nameString; - initialMessage: msgString - ) signal! Item was added: + ----- Method: MCWorkingCopy>>requestVersionNameAndMessageWithSuggestion:initialMessage:patch: (in category 'private') ----- + requestVersionNameAndMessageWithSuggestion: nameString initialMessage: msgString patch: aPatch + ^ (MCVersionNameAndMessageRequest new + suggestedName: nameString; + initialMessage: msgString; + patch: aPatch + ) signal! |
Free forum by Nabble | Edit this page |