Skip to content

Commit

Permalink
Fix wrong handling of nil merge result in SquotPlaintextMapper
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusDoe committed Jul 10, 2024
1 parent d548ca5 commit 4d6c1b6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
merging
mergeVersion: right into: left withBase: base
| merged |
merged := self toPlaintext:
((SquotMergeUtilities
merged := self transformVersion:
(SquotMergeUtilities
stringOrNilMergeLeft: left
right: right
base: base
ifConflict: [^ SquotPlaintextConflictChangeSet
withMapper: self
conflict: (SquotMergeConflict left: left right: right base: base)])
ifNil: [^ nil]).
conflict: (SquotMergeConflict left: left right: right base: base)]).
^ (merged squotEqual: left)
ifTrue: [SquotEmptyChangeSet withMapper: self]
ifFalse: [SquotPlaintextNormalChangeSet withMapper: self from: left to: merged]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ui
transformVersion: aStringOrNil
^ self toPlaintext: (aStringOrNil ifNil: [^ nil])
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ui
transformVersion: aString ifFail: aBlock
^ self toPlaintext: (aString ifNil: [^ nil])
transformVersion: aStringOrNil ifFail: aBlock
^ self transformVersion: aStringOrNil
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
"importPriority" : "mad 4/22/2024 16:43",
"isSourceAt:timeStampOf:" : "mad 11/7/2023 14:42",
"isValidVersion:" : "mad 11/6/2023 13:22",
"mergeVersion:into:withBase:" : "mad 7/10/2024 17:08",
"mergeVersion:into:withBase:" : "mad 7/10/2024 20:08",
"pathFor:" : "mad 11/7/2023 14:42",
"printOn:" : "mad 11/7/2023 12:47",
"printWithoutPathOn:" : "mad 11/7/2023 12:47",
"readVersionFrom:" : "mad 11/7/2023 14:40",
"sourcesSizeOf:" : "mad 11/7/2023 14:41",
"stylerClassFor:at:" : "mad 11/7/2023 14:41",
"toPlaintext:" : "mad 11/7/2023 14:40",
"transformVersion:ifFail:" : "mad 12/20/2023 15:03",
"transformVersion:" : "mad 7/10/2024 20:08",
"transformVersion:ifFail:" : "mad 7/10/2024 20:08",
"versionAsMorph:" : "mad 11/7/2023 14:49",
"versionAsSources:" : "mad 11/7/2023 14:41",
"versionTypeName" : "mad 11/7/2023 12:53",
Expand Down

0 comments on commit 4d6c1b6

Please sign in to comment.