[squeak-dev] The Inbox: Monticello-nice.399.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Sep 6 21:16:35 UTC 2010


A new version of Monticello was added to project The Inbox:
http://source.squeak.org/inbox/Monticello-nice.399.mcz

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

Name: Monticello-nice.399
Author: nice
Time: 6 September 2010, 11:16:24.627 pm
UUID: d0ada69a-e513-4b38-9b6b-f332b31f61fb
Ancestors: Monticello-ar.398

Feature 1: let Keep and Reject buttons select the next unresolved conflict in the list.

Feature 2: if there is no more conflict in the list, let Keep and Reject select the next non conflict in the list.

The first feature is powerfull for deciding fast without many keyboard/mouse motions.
It should be complemented by a shortcut key.

The second feature is questionnable... That's why this version made a visit to the inbox afterall...

=============== Diff against Monticello-ar.398 ===============

Item was added:
+ ----- Method: MCMergeBrowser>>selectNextUnresolvedConflict (in category 'as yet unclassified') -----
+ selectNextUnresolvedConflict
+ 	"Try and select the next unresolved conflict starting at current selection in the list, wrapping at beginning.
+ 	If there is no more unresolved conflict, then simply move to next non conflict item in the list.
+ 	This method makes assumption that conflicts are always sorted before non conflicts items."
+ 	(self findListMorph: #list)
+ 		ifNotNil:
+ 			[:aMorph |
+ 			| currentIndex nextUnresolvedIndex |
+ 			currentIndex := aMorph getCurrentSelectionIndex min: conflicts size.
+ 			nextUnresolvedIndex := (currentIndex + 1 to: currentIndex + conflicts size - 1)
+ 				detect:
+ 					[:i |
+ 					| nextItem |
+ 					((nextItem := conflicts atWrap: i) isKindOf: MCConflict)
+ 						and: [nextItem isResolved not]]
+ 				ifNone: [0].
+ 			nextUnresolvedIndex = 0
+ 				ifTrue: [items size > 1 ifTrue: [self selection: (aMorph getCurrentSelectionIndex max: conflicts size)  - conflicts size \\ items size + conflicts size + 1]]
+ 				ifFalse: [self selection: nextUnresolvedIndex - 1 \\ conflicts size + 1].].!

Item was changed:
  ----- Method: MCMergeBrowser>>conflictSelectionDo: (in category 'as yet unclassified') -----
  conflictSelectionDo: aBlock
  	self selectionIsConflicted
+ 		ifTrue: aBlock!
- 		ifTrue: aBlock
- 		ifFalse: [self inform: 'You must have a conflict selected']!

Item was changed:
  ----- Method: MCMergeBrowser>>innerButtonRow (in category 'as yet unclassified') -----
  innerButtonRow
  	^ self buttonRow:
+ 		#((Keep chooseRemote 'keep the selected change' )
+ 		  (Reject chooseLocal 'reject the selected change' ))!
- 		#((Keep chooseRemote 'keep the selected change' selectionIsConflicted)
- 		  (Reject chooseLocal 'reject the selected change' selectionIsConflicted))!

Item was changed:
  ----- Method: MCMergeBrowser>>chooseRemote (in category 'as yet unclassified') -----
  chooseRemote
  	self conflictSelectionDo:
  		[selection chooseRemote.
+ 		self changed: #text; changed: #list].
+ 	self selectNextUnresolvedConflict!
- 		self changed: #text; changed: #list]!

Item was changed:
  ----- Method: MCMergeBrowser>>chooseLocal (in category 'as yet unclassified') -----
  chooseLocal
  	self conflictSelectionDo:
  		[selection chooseLocal.
+ 		self changed: #text; changed: #list].
+ 	self selectNextUnresolvedConflict!
- 		self changed: #text; changed: #list]!




More information about the Squeak-dev mailing list