Skip to content

Commit

Permalink
Merge fixes from 'develop' into latest-release
Browse files Browse the repository at this point in the history
  • Loading branch information
j4yk committed Jul 9, 2022
2 parents b15cb4f + f198597 commit 9d51bdd
Show file tree
Hide file tree
Showing 43 changed files with 143 additions and 49 deletions.
2 changes: 1 addition & 1 deletion src/Squit.package/.squot-contents
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SquotTrackedObjectMetadata {
#objectClassName : #PackageInfo,
#id : UUID [ '207bca0df934e041b1e79b9ff315b588' ],
#objectsReplacedByNames : true,
#slotOverrides : { },
#objectsReplacedByNames : true,
#serializer : #SquotCypressCodeSerializer
}
13 changes: 10 additions & 3 deletions src/Squit.package/SquitBrowser.class/instance/loadCommitList.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ loadCommitList
commitListBuildProcess ifNotNil: [commitListBuildProcess terminate].
^ self changed: #commitList].
self withUnitOfWork:
[self updateHistorianDecorationsMap.
[| oldHistoriansVersions rebuild |
rebuild := false.
oldHistoriansVersions := historiansForDecoration.
self updateHistorianDecorationsMap.
selectedHistorian version ~= (cachedCommitList at: 1 ifAbsent: [])
ifTrue: [self rebuildCommitList].
self changed: #commitList "At least the decorations could have changed."].
ifTrue:
[self rebuildCommitList.
rebuild := true].
"Must send `changed: #commitList` if the list has actually changed, but when sending it, the view will scroll back to the selected commit. If users are scrolling through the list, this will upset them. So avoid sending it unless it is really warranted."
(rebuild or: [oldHistoriansVersions ~= historiansForDecoration])
ifTrue: [self changed: #commitList]].
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ projectIndex: anIndex
projectIndex := anIndex.
repositoryExists := self projectSelection repository exists.
selectedHistorian := self projectSelection loadedHistorian.
self changed: #branchSelection.
commitSelection := nil.
commitToDiffAgainst := nil.
cachedCommitList := #().
Expand Down
4 changes: 2 additions & 2 deletions src/Squit.package/SquitBrowser.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"initialize" : "jr 4/27/2017 17:36",
"labelString" : "jr 12/20/2021 14:56",
"loadBranchList" : "jr 12/22/2021 23:46",
"loadCommitList" : "jr 7/2/2022 22:16",
"loadCommitList" : "jr 7/9/2022 09:29",
"loadedSelectedObject" : "jr 5/13/2017 19:40",
"menuBranchListHook:" : "jr 12/20/2021 14:28",
"menuCommitListHook:" : "jr 1/22/2022 21:35",
Expand All @@ -172,7 +172,7 @@
"offerToAddFirstProject" : "fn 4/26/2017 16:04",
"packageFormatMenuSpec" : "jr 8/31/2020 22:27",
"projectIndex" : "jr 8/10/2020 00:19",
"projectIndex:" : "jr 8/8/2020 15:15",
"projectIndex:" : "jr 7/9/2022 09:37",
"projectList" : "fn 4/11/2017 11:48",
"projectListMenu:" : "fn 4/11/2017 15:38",
"projectSelection" : "fn 4/11/2017 17:12",
Expand Down
2 changes: 1 addition & 1 deletion src/Squot.package/.squot-contents
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SquotTrackedObjectMetadata {
#objectClassName : #PackageInfo,
#id : UUID [ '7e0624d4d6eca84f879c365f65ae74be' ],
#objectsReplacedByNames : true,
#slotOverrides : { },
#objectsReplacedByNames : true,
#serializer : #SquotCypressCodeSerializer
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*Squot-Tools
browseFromSquotWorkingCopyArtifact: aSquotWorkingCopyArtifact
aSquotWorkingCopyArtifact isLoaded ifFalse: [^ self browse].
^ (self actualClassIn: (PackageInfo squotEnvironmentOf: aSquotWorkingCopyArtifact))
ifNotNil: [:class | class browse]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"instance" : {
"actualClassInSquotWorkingCopy:" : "jr 5/17/2020 21:43",
"browse" : "jr 6/6/2020 03:05",
"browseFromSquotWorkingCopyArtifact:" : "jr 12/22/2019 20:39",
"browseFromSquotWorkingCopyArtifact:" : "jr 7/9/2022 11:12",
"squotAddToChangeSet:" : "jr 4/14/2020 15:34",
"squotBelongsToClass" : "jr 9/8/2020 22:00",
"squotGroup" : "jr 9/8/2020 20:56",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*Squot-Tools
browseFromSquotWorkingCopyArtifact: aSquotWorkingCopyArtifact
| trait |
aSquotWorkingCopyArtifact isLoaded ifFalse: [^ self browse].
trait := (PackageInfo squotEnvironmentOf: aSquotWorkingCopyArtifact)
classOrTraitNamed: self baseTrait.
^ trait ifNotNil: [trait theMetaClass browse]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"actualClassIn:" : "jr 9/8/2020 22:57",
"actualClassInSquotWorkingCopy:" : "jr 5/17/2020 21:47",
"browse" : "jr 6/6/2020 03:03",
"browseFromSquotWorkingCopyArtifact:" : "jr 12/22/2019 20:13",
"browseFromSquotWorkingCopyArtifact:" : "jr 7/9/2022 11:12",
"squotAddToChangeSet:" : "jr 9/8/2020 23:02",
"squotBelongsToClass" : "jr 9/8/2020 22:00",
"squotGroup" : "jr 9/8/2020 21:00",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*Squot-Tools
browseFromSquotWorkingCopyArtifact: aSquotWorkingCopyArtifact
aSquotWorkingCopyArtifact isLoaded ifFalse: [^ self browse].
^ self definition browseFromSquotWorkingCopyArtifact: aSquotWorkingCopyArtifact
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
},
"instance" : {
"actualClassInSquotWorkingCopy:" : "jr 5/17/2020 21:50",
"browseFromSquotWorkingCopyArtifact:" : "jr 12/22/2019 20:11",
"browseFromSquotWorkingCopyArtifact:" : "jr 7/9/2022 11:12",
"incoming" : "jr 6/6/2020 02:32",
"squotChangeAsStringOrText" : "jr 5/17/2020 22:31",
"squotToolsDiffNodeContent" : "jr 11/3/2019 12:09" } }
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*Squot-Tools
browseFromSquotWorkingCopyArtifact: aSquotWorkingCopyArtifact
aSquotWorkingCopyArtifact isLoaded ifFalse: [^ self browse].
^ (self actualClassIn: (PackageInfo squotEnvironmentOf: aSquotWorkingCopyArtifact))
ifNotNil: [:class | ToolSet browse: class selector: selector]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"instance" : {
"actualClassInSquotWorkingCopy:" : "jr 5/17/2020 21:47",
"browse" : "jr 12/21/2020 00:05",
"browseFromSquotWorkingCopyArtifact:" : "jr 12/22/2019 20:39",
"browseFromSquotWorkingCopyArtifact:" : "jr 7/9/2022 11:13",
"squotAddToChangeSet:" : "jr 4/14/2020 14:46",
"squotBelongsToClass" : "jr 9/8/2020 22:00",
"squotDiffNodeSummary" : "jr 4/17/2017 01:42",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*Squot-Tools
browseFromSquotWorkingCopyArtifact: aSquotWorkingCopyArtifact
categories ifEmpty: [^ self].
aSquotWorkingCopyArtifact isLoaded ifFalse: [^ self browse].
^ (PackageInfo squotEnvironmentOf: aSquotWorkingCopyArtifact) beCurrentDuring:
[ToolSet browseCategory: categories anyOne]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
},
"instance" : {
"browse" : "jr 6/6/2020 03:06",
"browseFromSquotWorkingCopyArtifact:" : "jr 12/22/2019 20:43",
"browseFromSquotWorkingCopyArtifact:" : "jr 7/9/2022 11:13",
"squotAddToChangeSet:" : "jr 4/14/2020 17:02",
"squotIsInChangeSet:" : "jr 4/14/2020 17:02",
"squotRemoveFromChangeSet:" : "jr 4/14/2020 17:02" } }
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*Squot-Tools
browseFromSquotWorkingCopyArtifact: aSquotWorkingCopyArtifact
aSquotWorkingCopyArtifact isLoaded ifFalse: [^ self browse].
^ (PackageInfo squotEnvironmentOf: aSquotWorkingCopyArtifact) packageOrganizer
packageNamed: self packageName
ifPresent:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"class" : {
},
"instance" : {
"browseFromSquotWorkingCopyArtifact:" : "jr 12/22/2019 22:56",
"browseFromSquotWorkingCopyArtifact:" : "jr 7/9/2022 11:13",
"squotGroup" : "jr 9/9/2020 18:51" } }
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Smalltalk tools
environment
| workingCopyArtifact |
self selectedNode ifNil: [^ super environment].
^ PackageInfo squotEnvironmentOf:
(self workingCopy artifactAt: self selectedNode artifactDiff path
ifAbsent: [^ super environment])
workingCopyArtifact := self workingCopy artifactAt: self selectedNode artifactDiff path ifAbsent: [^ super environment].
workingCopyArtifact isLoaded ifFalse: [^ super environment].
^ PackageInfo squotEnvironmentOf: workingCopyArtifact
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Smalltalk tools
selectedClass
| workingCopyArtifact |
self selectedNode ifNil: [^ super selectedClass].
workingCopyArtifact := self workingCopy artifactAt: self selectedNode artifactDiff path ifAbsent: [^ super selectedClass].
workingCopyArtifact isLoaded ifFalse: [^ super selectedClass].
(self selectedNode content respondsTo: #actualClassInSquotWorkingCopy:)
ifFalse: [^ super selectedClass].
^ self selectedNode content actualClassInSquotWorkingCopy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"diffNodeMenu:shifted:" : "jr 9/25/2020 18:27",
"diffNodeMenuHook:" : "jr 11/18/2020 15:26",
"diffText" : "jr 6/6/2022 19:12",
"environment" : "jr 11/1/2020 20:13",
"environment" : "jr 7/9/2022 12:12",
"excludeMethodsWithOnlyTimestampChanges:" : "jr 3/8/2022 20:28",
"excludePackagesWithoutActiveChanges:" : "jr 3/8/2022 20:28",
"hasChildren:" : "jr 9/25/2020 18:27",
Expand All @@ -65,7 +65,7 @@
"rootNodes" : "jr 3/8/2022 22:51",
"selectNode:" : "ct 2/3/2022 21:09",
"selectedChangesWithTitle:" : "jr 9/25/2020 19:36",
"selectedClass" : "jr 9/25/2020 18:28",
"selectedClass" : "jr 7/9/2022 12:13",
"selectedDiffNodeIsIncluded" : "jr 9/25/2020 18:28",
"selectedNode" : "jr 9/25/2020 18:28",
"selectedNodePath:" : "jr 9/26/2020 14:03",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
actions
inspectChangedArtifactOfSelectedNode
self selectedNode content isRemoval ifTrue: [^ SquotGUI inform: 'Object was removed'].
self selectedNode content right explore.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
actions
inspectOriginalArtifactOfSelectedNode
self selectedNode content isAddition ifTrue: [^ SquotGUI inform: 'Object did not exist yet'].
self selectedNode content left explore.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"from:to:" : "jr 10/31/2017 18:16",
"fromPatch:" : "jr 10/3/2018 00:27",
"hasChildren:" : "jr 4/26/2017 15:59",
"inspectChangedArtifactOfSelectedNode" : "jr 12/23/2019 00:02",
"inspectOriginalArtifactOfSelectedNode" : "jr 12/23/2019 00:02",
"inspectChangedArtifactOfSelectedNode" : "jr 7/9/2022 11:39",
"inspectOriginalArtifactOfSelectedNode" : "jr 7/9/2022 11:40",
"inspectSelectedDiffContent" : "jr 4/26/2017 17:56",
"nodeLabelOf:" : "jr 11/18/2020 15:19",
"open" : "jr 10/31/2017 18:24",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
browsing
browseIncomingEdition: aWorkingCopy
self browse: self content right.
browseIncomingEdition: aWorkingCopy
self browse:
((((self content respondsTo: #isMerge) and: [self content isMerge])
or: [(self content respondsTo: #isConflict) and: [self content isConflict]])
ifTrue: [self content incoming]
ifFalse: [self content right])
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
browsing
browseOriginalEdition: aWorkingCopy
self browse: self content left.
self browse:
((((self content respondsTo: #isMerge) and: [self content isMerge])
or: [(self content respondsTo: #isConflict) and: [self content isConflict]])
ifTrue: [self content base]
ifFalse: [self content left]).
4 changes: 1 addition & 3 deletions src/Squot.package/SquotDiffNode.class/instance/ignore.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ accessing
ignore
content ifNil: [^ self].
self flag: #todo. "Environment access is specific to packages"
(PackageInfo squotEnvironmentOf: (workingCopy artifactAt: artifactDiff path))
beCurrentDuring:
[content ignoreInSquot].
self withPackageEnvironmentDo: [content ignoreInSquot].
4 changes: 1 addition & 3 deletions src/Squot.package/SquotDiffNode.class/instance/unignore.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ accessing
unignore
content ifNil: [^ self].
self flag: #todo. "Environment access is specific to packages"
(PackageInfo squotEnvironmentOf: (workingCopy artifactAt: artifactDiff path))
beCurrentDuring:
[content unignoreInSquot].
self withPackageEnvironmentDo: [content unignoreInSquot].
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
as yet unclassified
withPackageEnvironmentDo: aBlock
| workingCopyArtifact |
workingCopyArtifact := workingCopy artifactAt: artifactDiff path ifAbsent: [].
^ (workingCopyArtifact isNil or: [workingCopyArtifact isLoaded not])
ifTrue: [aBlock value]
ifFalse: [(PackageInfo squotEnvironmentOf: workingCopyArtifact) beCurrentDuring: aBlock]
9 changes: 5 additions & 4 deletions src/Squot.package/SquotDiffNode.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"balloonText" : "jr 4/17/2017 01:20",
"browse:" : "jr 6/6/2020 02:53",
"browseInWorkingCopy" : "jr 6/6/2022 19:17",
"browseIncomingEdition:" : "jr 6/6/2020 02:53",
"browseOriginalEdition:" : "jr 6/6/2020 02:53",
"browseIncomingEdition:" : "jr 7/9/2022 11:48",
"browseOriginalEdition:" : "jr 7/9/2022 11:48",
"children" : "jr 4/17/2017 01:01",
"children:" : "jr 11/18/2017 22:31",
"concatenatedChildrenTexts" : "jr 5/23/2017 14:09",
Expand All @@ -24,7 +24,7 @@
"excludeBlock:" : "jr 11/18/2018 02:11",
"hasActiveChildren" : "jr 3/3/2020 22:41",
"hasChildren" : "jr 4/17/2017 00:58",
"ignore" : "jr 4/14/2020 16:07",
"ignore" : "jr 7/9/2022 12:57",
"include" : "jr 11/21/2018 22:08",
"includeBlock" : "jr 11/18/2018 02:11",
"includeBlock:" : "jr 11/18/2018 02:11",
Expand All @@ -38,7 +38,8 @@
"setTitle:content:children:" : "jr 11/1/2020 21:42",
"title" : "jr 11/17/2020 17:47",
"title:" : "jr 11/18/2017 22:30",
"unignore" : "jr 4/14/2020 17:14",
"unignore" : "jr 7/9/2022 12:57",
"withAllChildren" : "jr 11/19/2017 19:25",
"withPackageEnvironmentDo:" : "jr 7/9/2022 12:57",
"workingCopy" : "jr 12/22/2019 18:36",
"workingCopy:" : "jr 12/22/2019 18:36" } }
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
actions
inspectOriginalArtifactOfSelectedNode
(self selectedNode content respondsTo: #isModification)
ifTrue: [self selectedNode content left explore]
ifFalse: [self selectedNode content working explore].
(((self selectedNode content respondsTo: #isMerge) and: [self selectedNode content isMerge])
or: [(self selectedNode content respondsTo: #isConflict) and: [self selectedNode content isConflict]])
ifTrue: [self selectedNode content working explore]
ifFalse: [^ super inspectOriginalArtifactOfSelectedNode]
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
actions
inspectProposedArtifactOfSelectedNode
(self selectedNode content respondsTo: #isModification)
ifTrue:
[self selectedNode content isRemoval
ifTrue: [self inform: 'Object has been removed.']
ifFalse: [self selectedNode content right explore]]
ifFalse:
[self selectedNode content incoming explore].
(((self selectedNode content respondsTo: #isMerge) and: [self selectedNode content isMerge])
or: [(self selectedNode content respondsTo: #isConflict) and: [self selectedNode content isConflict]])
ifTrue: [self selectedNode content incoming explore]
ifFalse: [^ super inspectProposedArtifactOfSelectedNode]
4 changes: 2 additions & 2 deletions src/Squot.package/SquotMergeTool.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
},
"instance" : {
"autoProcessNodes:" : "jr 3/8/2022 22:53",
"inspectOriginalArtifactOfSelectedNode" : "jr 11/1/2020 21:11",
"inspectProposedArtifactOfSelectedNode" : "jr 11/1/2020 21:12",
"inspectOriginalArtifactOfSelectedNode" : "jr 7/9/2022 11:45",
"inspectProposedArtifactOfSelectedNode" : "jr 7/9/2022 11:45",
"on:" : "jr 8/14/2019 23:04",
"rootNodes" : "jr 3/8/2022 22:55",
"selectedPatch" : "jr 8/14/2019 23:24" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
tests
testArtifactMergeWithoutConflicts
| left right base path artifact merge contentMerge mergeNode acceptReturned |
path := 'common-artifact'.
artifact := SquotArtifact new path: path; content: (left := SquotArtifactContentMock new).
left whenMergedReturn: (contentMerge := SquotMergeMock new);
whenComparedReturnMock.
contentMerge hasConflicts: false.
right := SquotArtifactContentMock new.
base := SquotArtifactContentMock new.
base whenComparedReturnMock.
merge := SquotMerge
into: (SquotSnapshot builder
add: artifact;
buildSnapshot)
merge: (SquotSnapshot builder
add: (artifact copy content: right);
buildSnapshot)
basedOn: (SquotSnapshot builder
add: (artifact copy content: base);
buildSnapshot).
self openToolAndTestOn: merge.
mergeNode := tool rootNodes detect: [:each | ((tool nodeLabelOf: each) asString includesSubstring: 'common-artifact') and: [(tool nodeLabelOf: each) asString includesSubstring: 'merge']] ifNone: [self fail: 'Merge node not found'].
self deny: mergeNode anyChildNeedsChoice.
tool selectNode: mergeNode; deactivateSelectedNode.
self closeDialogPossiblyOpenedDuring: [tool accept. acceptReturned := true]
timeoutMsecs: 5.
self assert: acceptReturned == true.
self deny: (self resultIncludesDiffAt: path) "nothing changes in working copy".
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"resolveArtifactConflict:" : "jr 10/26/2019 22:39",
"resultDiffAt:" : "jr 8/15/2019 03:02",
"resultLoadOrder" : "jr 8/15/2019 01:06",
"testArtifactMergeWithoutConflicts" : "jr 7/9/2022 10:54",
"testLoadOrderConflicts" : "jr 11/18/2020 16:01",
"testMetadataConflict" : "jr 7/3/2022 12:24",
"testMethodsGetExcludedIfOnlyTheirStampsChanged" : "jr 5/14/2021 16:18",
Expand Down
Loading

0 comments on commit 9d51bdd

Please sign in to comment.