The Trunk: Monticello-tpr.823.mcz

[email protected]
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
Marcel Taeumel uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-tpr.823.mcz

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

Name: Monticello-tpr.823
Author: tpr
Time: 6 August 2026, 11:50:10.405799 am
UUID: 0ad88fab-3a8a-4435-b57f-899c4fe524cf
Ancestors: Monticello-ct.822

When updating from the update stream we got a dNU: because during the processing of System-mt.1530 the conflict browser opened - not surprising since I had made changes relating to the SpaceTally bug.
Selecting the first item - SpaceTally class>#initialize & accepting it was no problem.

Selecting 'all newer' raised a dNU: because MCConflict>>#isLocalNewer claims the 'self localDefinition' returns nil. Since the operation involved is an MCAddition, and they always return nil to #baseDefinition, this seems like a problem.

I'm reasonably sure the test for isLocal/RemoteNewer really ought to be delegated to the actual operation. Currently it is written unpleasantly like Python code.

The real issue is what change caused this? It surely must be recent.

Code herein appears to solve the proximate issue and refactors the test to delegate to the actual MCPatchOperation which already has the information.

=============== Diff against Monticello-ct.822 ===============

Item was added:
+ ----- Method: MCAddition>>isLocalNewer (in category 'testing') -----
+ isLocalNewer
+ 	"if we are adding a method, the local version is never newer"
+ 
+ 	^false!

Item was added:
+ ----- Method: MCAddition>>isRemoteNewer (in category 'testing') -----
+ isRemoteNewer
+ 	"if we are adding a method, the remote version is always newer"
+ 
+ 	^true!

Item was changed:
  ----- Method: MCConflict>>isLocalNewer (in category 'testing') -----
  isLocalNewer
+ 
+ 	^operation isLocalNewer!
- 	operation isRemoval ifTrue:
- 		[^false].
- 	^ (self localDefinition fullTimeStamp ifNil: [^ false]) > self remoteDefinition fullTimeStamp!

Item was changed:
  ----- Method: MCConflict>>isRemoteNewer (in category 'testing') -----
  isRemoteNewer
+ 
+ 	^operation isRemoteNewer!
- 	operation isRemoval ifTrue:
- 		[^true].
- 	^ (self localDefinition fullTimeStamp ifNil: [^ false]) < self remoteDefinition fullTimeStamp!

Item was added:
+ ----- Method: MCPatchOperation>>isLocalNewer (in category 'testing') -----
+ isLocalNewer
+ 	"is the local version is newer than the remote?"
+ 
+ 	^ (self baseDefinition fullTimeStamp ifNil: [^ false]) > self targetDefinition fullTimeStamp!

Item was added:
+ ----- Method: MCPatchOperation>>isRemoteNewer (in category 'testing') -----
+ isRemoteNewer
+ 	"is the remote version newer than the local one?"
+ 
+ 	^ (self baseDefinition fullTimeStamp ifNil: [^ false]) < self targetDefinition fullTimeStamp!

Item was added:
+ ----- Method: MCRemoval>>isLocalNewer (in category 'testing') -----
+ isLocalNewer
+ 	"if we are removing a method, the local version is never newer"
+ 
+ 	^false!

Item was added:
+ ----- Method: MCRemoval>>isRemoteNewer (in category 'testing') -----
+ isRemoteNewer
+ 	"if we are removing a method, the remote version is always newer"
+ 
+ 	^true!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.