-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wrong handling of nil merge result in SquotPlaintextMapper
- Loading branch information
Showing
4 changed files
with
11 additions
and
8 deletions.
There are no files selected for viewing
7 changes: 3 additions & 4 deletions
7
src/Squot.package/SquotPlaintextMapper.class/instance/mergeVersion.into.withBase..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotPlaintextMapper.class/instance/transformVersion..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ui | ||
transformVersion: aStringOrNil | ||
^ self toPlaintext: (aStringOrNil ifNil: [^ nil]) |
4 changes: 2 additions & 2 deletions
4
src/Squot.package/SquotPlaintextMapper.class/instance/transformVersion.ifFail..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters