diff --git a/src/GitS-Core.package/GSBrowser.class/instance/actionRefreshRefList.st b/src/GitS-Core.package/GSBrowser.class/instance/actionRefreshRefList.st deleted file mode 100644 index 1f3c25c98..000000000 --- a/src/GitS-Core.package/GSBrowser.class/instance/actionRefreshRefList.st +++ /dev/null @@ -1,3 +0,0 @@ -actions -actionRefreshRefList - self changed: #refList. \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/actionRefreshRefTree.st b/src/GitS-Core.package/GSBrowser.class/instance/actionRefreshRefTree.st new file mode 100644 index 000000000..1ccc2f955 --- /dev/null +++ b/src/GitS-Core.package/GSBrowser.class/instance/actionRefreshRefTree.st @@ -0,0 +1,3 @@ +actions +actionRefreshRefTree + self changed: #refTreeRoots. \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/activeRef..st b/src/GitS-Core.package/GSBrowser.class/instance/activeRef..st deleted file mode 100644 index 9acc0fb21..000000000 --- a/src/GitS-Core.package/GSBrowser.class/instance/activeRef..st +++ /dev/null @@ -1,7 +0,0 @@ -accessing -activeRef: aString - self basicActiveRef: aString. - self activeRefCommit ifNotNil: [:commit | self activeCommit: commit]. - self - changed: #activeRef; - changed: #commitList. \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/activeRef.st b/src/GitS-Core.package/GSBrowser.class/instance/activeRef.st index 0b6501237..9402f80e2 100644 --- a/src/GitS-Core.package/GSBrowser.class/instance/activeRef.st +++ b/src/GitS-Core.package/GSBrowser.class/instance/activeRef.st @@ -1,3 +1,5 @@ accessing activeRef - ^ activeRef \ No newline at end of file + ^ (self activeRefTreeMember ifNil: [^ nil]) isRef + ifTrue: [self activeRefTreeMember ref] + ifFalse: [nil] \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/activeRefTreeMember..st b/src/GitS-Core.package/GSBrowser.class/instance/activeRefTreeMember..st new file mode 100644 index 000000000..bb7125cd4 --- /dev/null +++ b/src/GitS-Core.package/GSBrowser.class/instance/activeRefTreeMember..st @@ -0,0 +1,7 @@ +accessing +activeRefTreeMember: aRefTreeMember + self basicActiveRefTreeMember: aRefTreeMember. + self activeRefCommit ifNotNil: [:commit | self activeCommit: commit]. + self + changed: #activeRefTreeMember; + changed: #commitList. \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/activeRefTreeMember.st b/src/GitS-Core.package/GSBrowser.class/instance/activeRefTreeMember.st new file mode 100644 index 000000000..a36ff08e4 --- /dev/null +++ b/src/GitS-Core.package/GSBrowser.class/instance/activeRefTreeMember.st @@ -0,0 +1,3 @@ +accessing +activeRefTreeMember + ^ activeRefTreeMember \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/basicActiveRefTreeMember..st b/src/GitS-Core.package/GSBrowser.class/instance/basicActiveRefTreeMember..st new file mode 100644 index 000000000..e9036b4cc --- /dev/null +++ b/src/GitS-Core.package/GSBrowser.class/instance/basicActiveRefTreeMember..st @@ -0,0 +1,3 @@ +accessing +basicActiveRefTreeMember: aRefTreeMember + activeRefTreeMember := aRefTreeMember \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/buildProjectsAndRefsPanel..st b/src/GitS-Core.package/GSBrowser.class/instance/buildProjectsAndRefsPanel..st index 2b67c6226..936e97c9e 100644 --- a/src/GitS-Core.package/GSBrowser.class/instance/buildProjectsAndRefsPanel..st +++ b/src/GitS-Core.package/GSBrowser.class/instance/buildProjectsAndRefsPanel..st @@ -2,5 +2,5 @@ toolbuilder buildProjectsAndRefsPanel: builder ^ GSGUIUtilities buildVerticalSplit: 0.5 of: (self buildProjectList: builder) - and: (self buildRefList: builder) + and: (self buildRefTree: builder) with: builder \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/buildRefList..st b/src/GitS-Core.package/GSBrowser.class/instance/buildRefList..st deleted file mode 100644 index ecf9f676e..000000000 --- a/src/GitS-Core.package/GSBrowser.class/instance/buildRefList..st +++ /dev/null @@ -1,10 +0,0 @@ -toolbuilder -buildRefList: builder - ^ builder pluggableTreeSpec new - model: self; - roots: #refList; - getSelected: #activeRef; - setSelected: #activeRef:; - nodeClass: GSRefWrapper; - menu: #refListMenu:; - yourself \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/buildRefTree..st b/src/GitS-Core.package/GSBrowser.class/instance/buildRefTree..st new file mode 100644 index 000000000..04f6941b1 --- /dev/null +++ b/src/GitS-Core.package/GSBrowser.class/instance/buildRefTree..st @@ -0,0 +1,10 @@ +toolbuilder +buildRefTree: builder + ^ builder pluggableTreeSpec new + model: self; + roots: #refTreeRoots; + getSelected: #activeRefTreeMember; + setSelected: #activeRefTreeMember:; + nodeClass: GSRefTreeMemberWrapper; + menu: #refListMenu:; + yourself \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/ensureActiveRefIdentityIn..st b/src/GitS-Core.package/GSBrowser.class/instance/ensureActiveRefIdentityIn..st deleted file mode 100644 index ed167e046..000000000 --- a/src/GitS-Core.package/GSBrowser.class/instance/ensureActiveRefIdentityIn..st +++ /dev/null @@ -1,10 +0,0 @@ -accessing -ensureActiveRefIdentityIn: aCollection - "PluggableTreeMorph uses == to find the morph corresponding to the activeRef. - since the refList might reload the refs sometimes (producing new object identities for the - same ref name strings), ensure that activeRef is (identity-)included in refList (given as aCollection)" - self activeRef ifNil: [^ self]. - aCollection - detect: [:each | each = self activeRef] - ifFound: [:ref | self basicActiveRef: ref] - ifNone: [self activeRef: nil]. \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/ensureActiveRefTreeMemberIdentityIn..st b/src/GitS-Core.package/GSBrowser.class/instance/ensureActiveRefTreeMemberIdentityIn..st new file mode 100644 index 000000000..d9547d21e --- /dev/null +++ b/src/GitS-Core.package/GSBrowser.class/instance/ensureActiveRefTreeMemberIdentityIn..st @@ -0,0 +1,11 @@ +accessing +ensureActiveRefTreeMemberIdentityIn: aCollection + "PluggableTreeMorph uses == to find the morph corresponding to the activeRef. + since the refList might reload the refs sometimes (producing new object identities for the + same ref name strings), ensure that activeRef is (identity-)included in refList (given as aCollection)" + self activeRefTreeMember ifNil: [^ self]. + self activeRefTreeMember isRef ifFalse: [^ self activeRefTreeMember: nil]. + aCollection + detect: [:each | each ref = self activeRefTreeMember ref] + ifFound: [:member | self basicActiveRefTreeMember: member] + ifNone: [self activeRefTreeMember: nil]. \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/everythingChanged.st b/src/GitS-Core.package/GSBrowser.class/instance/everythingChanged.st index fd912c900..ae860a702 100644 --- a/src/GitS-Core.package/GSBrowser.class/instance/everythingChanged.st +++ b/src/GitS-Core.package/GSBrowser.class/instance/everythingChanged.st @@ -2,7 +2,7 @@ updating everythingChanged self changed: #activeWorkingCopy; - changed: #refList; + changed: #refTreeRoots; changed: #commitList; - activeRef: nil; + activeRefTreeMember: nil; activeCommit: (self activeWorkingCopy ifNotNil: #headCommit). \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/refList.st b/src/GitS-Core.package/GSBrowser.class/instance/refList.st deleted file mode 100644 index ca32f9128..000000000 --- a/src/GitS-Core.package/GSBrowser.class/instance/refList.st +++ /dev/null @@ -1,10 +0,0 @@ -ui -refList - | refs | - refs := self activeWorkingCopy ifNotNil: #allReferences ifNil: [^ {}]. - self showGitRefs ifFalse: [ - refs := refs select: [:each | - (self activeWorkingCopy isSqueakRef: each) - or: [self activeWorkingCopy isRemoteRef: each]]]. - self ensureActiveRefIdentityIn: refs. - ^ refs sorted: [:a :b | self doesRef: a comeBeforeRef: b] \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/refListMenu..st b/src/GitS-Core.package/GSBrowser.class/instance/refListMenu..st index 4a303be3c..a02c8d4cc 100644 --- a/src/GitS-Core.package/GSBrowser.class/instance/refListMenu..st +++ b/src/GitS-Core.package/GSBrowser.class/instance/refListMenu..st @@ -6,9 +6,6 @@ refListMenu: aMenu addLine; add: 'Refresh refs' - action: #actionRefreshRefList; - - add: (self showGitRefs ifTrue: [''] ifFalse: ['']), 'Show git refs' - action: #toggleShowGitRefs. + action: #actionRefreshRefTree. ^ aMenu \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/refTreeRoots.st b/src/GitS-Core.package/GSBrowser.class/instance/refTreeRoots.st new file mode 100644 index 000000000..887f562fb --- /dev/null +++ b/src/GitS-Core.package/GSBrowser.class/instance/refTreeRoots.st @@ -0,0 +1,6 @@ +ui +refTreeRoots + | roots | + roots := self activeWorkingCopy ifNotNil: #refTreeRoots ifNil: [^ {}]. + self ensureActiveRefTreeMemberIdentityIn: roots. + ^ roots \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/refsChanged.st b/src/GitS-Core.package/GSBrowser.class/instance/refsChanged.st index 3cfed8095..7a8f47b0f 100644 --- a/src/GitS-Core.package/GSBrowser.class/instance/refsChanged.st +++ b/src/GitS-Core.package/GSBrowser.class/instance/refsChanged.st @@ -2,4 +2,4 @@ updating refsChanged self changed: #commitList; - changed: #refList. \ No newline at end of file + changed: #refTreeRoots. \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/showGitRefs..st b/src/GitS-Core.package/GSBrowser.class/instance/showGitRefs..st deleted file mode 100644 index 5b9276443..000000000 --- a/src/GitS-Core.package/GSBrowser.class/instance/showGitRefs..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -showGitRefs: aBoolean - showGitRefs := aBoolean. - self changed: #refList. \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/showGitRefs.st b/src/GitS-Core.package/GSBrowser.class/instance/showGitRefs.st deleted file mode 100644 index 8b0c078df..000000000 --- a/src/GitS-Core.package/GSBrowser.class/instance/showGitRefs.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -showGitRefs - ^ showGitRefs ifNil: [false] \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/instance/toggleShowGitRefs.st b/src/GitS-Core.package/GSBrowser.class/instance/toggleShowGitRefs.st deleted file mode 100644 index d72562400..000000000 --- a/src/GitS-Core.package/GSBrowser.class/instance/toggleShowGitRefs.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -toggleShowGitRefs - self showGitRefs: self showGitRefs not. \ No newline at end of file diff --git a/src/GitS-Core.package/GSBrowser.class/methodProperties.json b/src/GitS-Core.package/GSBrowser.class/methodProperties.json index 7abb86687..ccf9157da 100644 --- a/src/GitS-Core.package/GSBrowser.class/methodProperties.json +++ b/src/GitS-Core.package/GSBrowser.class/methodProperties.json @@ -53,7 +53,7 @@ "actionPush:force:" : "mad 5/18/2024 11:31", "actionRebaseOntoActiveCommit" : "mad 4/5/2024 19:33", "actionRebaseOntoCommit:" : "mad 10/9/2024 16:01", - "actionRefreshRefList" : "mad 10/24/2023 19:54", + "actionRefreshRefTree" : "mad 10/10/2024 00:22", "actionRemoveActiveProject" : "mad 9/21/2023 11:55", "actionRenameActiveProject" : "mad 12/8/2023 18:46", "actionResetToActiveCommit" : "mad 4/5/2024 19:34", @@ -77,16 +77,18 @@ "activeCommit:" : "mad 5/15/2024 21:42", "activeCommitIfNilInformAnd:" : "mad 4/5/2024 19:07", "activeCommitInfo" : "mad 9/14/2023 19:29", - "activeRef" : "mad 9/14/2023 19:19", - "activeRef:" : "mad 5/15/2024 21:40", + "activeRef" : "mad 10/10/2024 01:00", "activeRefCommit" : "mad 9/14/2023 19:24", "activeRefIfNilInformAnd:" : "mad 4/5/2024 19:37", + "activeRefTreeMember" : "mad 10/10/2024 01:00", + "activeRefTreeMember:" : "mad 10/10/2024 01:00", "activeWorkingCopy" : "mad 9/19/2023 12:38", "activeWorkingCopy:" : "mad 4/10/2024 19:17", "activeWorkingCopyIfNilInformAnd:" : "mad 4/5/2024 19:05", "addMappersProjectListMenu:" : "mad 10/9/2024 16:01", "basicActiveCommit:" : "mad 5/15/2024 21:42", "basicActiveRef:" : "mad 5/15/2024 21:40", + "basicActiveRefTreeMember:" : "mad 10/10/2024 01:01", "buildBranchButton:" : "mad 9/14/2023 19:42", "buildButtons:" : "mad 10/9/2024 16:01", "buildCommitButton:" : "mad 9/1/2023 14:07", @@ -98,10 +100,10 @@ "buildMainLayout:" : "mad 10/9/2024 16:01", "buildOtherButton:" : "mad 10/18/2023 15:38", "buildProjectList:" : "mad 10/9/2024 16:01", - "buildProjectsAndRefsPanel:" : "mad 10/9/2024 16:01", + "buildProjectsAndRefsPanel:" : "mad 10/10/2024 00:56", "buildPullButton:" : "mad 9/18/2023 16:19", "buildPushButton:" : "mad 9/18/2023 14:11", - "buildRefList:" : "mad 10/9/2024 16:01", + "buildRefTree:" : "mad 10/10/2024 01:20", "buildUpperLayout:" : "mad 10/9/2024 16:01", "buildWindow:" : "mad 10/9/2024 16:01", "buildWith:" : "mad 9/1/2023 14:44", @@ -114,9 +116,9 @@ "doesRef:comeBeforeRef:" : "mad 9/19/2023 14:45", "emptyCommit" : "mad 4/4/2024 23:07", "ensureActiveCommitIdentityIn:" : "mad 5/15/2024 21:55", - "ensureActiveRefIdentityIn:" : "mad 5/15/2024 21:54", + "ensureActiveRefTreeMemberIdentityIn:" : "mad 10/10/2024 01:03", "ensureHeadCommitMaterializedTo:" : "mad 10/9/2024 16:01", - "everythingChanged" : "mad 12/22/2023 17:59", + "everythingChanged" : "mad 10/10/2024 01:03", "ifRepositoryDoesNotExist:" : "mad 11/30/2023 17:08", "menu:forCommit:" : "mad 4/5/2024 20:19", "menu:forCommit:ref:" : "mad 8/13/2024 18:05", @@ -145,14 +147,11 @@ "parentForPick:" : "mad 4/5/2024 14:44", "projectListMenu:" : "mad 10/9/2024 16:01", "refChanged:" : "mad 5/15/2024 20:47", - "refList" : "mad 5/15/2024 21:43", - "refListMenu:" : "mad 4/5/2024 18:55", + "refListMenu:" : "mad 10/10/2024 00:22", + "refTreeRoots" : "mad 10/10/2024 00:21", "refTypeName:" : "mad 11/29/2023 15:59", - "refsChanged" : "mad 5/15/2024 20:47", + "refsChanged" : "mad 10/10/2024 00:22", "requestBranchNameFor:at:fromRef:" : "mad 4/5/2024 19:29", - "showGitRefs" : "mad 10/16/2023 21:39", - "showGitRefs:" : "mad 10/16/2023 21:50", - "toggleShowGitRefs" : "mad 10/16/2023 21:50", "unitOfWork" : "mad 9/19/2023 12:37", "update:" : "mad 5/15/2024 20:47", "validateDialogHasNoConflicts:before:" : "mad 9/27/2023 16:11", diff --git a/src/GitS-Core.package/GSBrowser.class/properties.json b/src/GitS-Core.package/GSBrowser.class/properties.json index aa6a04097..39ae66dfe 100644 --- a/src/GitS-Core.package/GSBrowser.class/properties.json +++ b/src/GitS-Core.package/GSBrowser.class/properties.json @@ -8,8 +8,7 @@ "instvars" : [ "activeWorkingCopy", "activeCommit", - "activeRef", - "showGitRefs" ], + "activeRefTreeMember" ], "name" : "GSBrowser", "pools" : [ ], diff --git a/src/GitS-Core.package/GSGitWorkingCopy.class/instance/newRefTreeWithLabel.ref..st b/src/GitS-Core.package/GSGitWorkingCopy.class/instance/newRefTreeWithLabel.ref..st new file mode 100644 index 000000000..b72738d5b --- /dev/null +++ b/src/GitS-Core.package/GSGitWorkingCopy.class/instance/newRefTreeWithLabel.ref..st @@ -0,0 +1,7 @@ +ref-tree +newRefTreeWithLabel: labelString ref: refString + ^ GSRefTree new + workingCopy: self; + label: labelString; + ref: refString; + yourself \ No newline at end of file diff --git a/src/GitS-Core.package/GSGitWorkingCopy.class/instance/refTreeRoots.st b/src/GitS-Core.package/GSGitWorkingCopy.class/instance/refTreeRoots.st new file mode 100644 index 000000000..0e6302669 --- /dev/null +++ b/src/GitS-Core.package/GSGitWorkingCopy.class/instance/refTreeRoots.st @@ -0,0 +1,21 @@ +ref-tree +refTreeRoots + | other roots | + roots := { + 'local branches' -> self branchesBaseName. + }, (self remoteNames collect: [:each | + ('remote branches on {1}' format: {each printString}) + -> (self remoteRefBaseName, each, $/)]), { + 'external branches' -> self gitBranchesBaseName. + 'tags' -> 'refs/tags/'. + } collect: [:each | self newRefTreeWithLabel: each key ref: each value]. + other := self newRefTreeWithLabel: 'other refs' ref: ''. + self allReferences do: [:ref | + self flag: #todo. "handle HEAD refs and refs from other squeak images" + roots + detect: [:each | ref beginsWith: each ref] + ifFound: [:root | root add: (ref allButFirst: root ref size)] + ifNone: [other add: ref]]. + roots := roots copyWith: other. + roots do: #compressChildren. + ^ roots reject: #isEmpty \ No newline at end of file diff --git a/src/GitS-Core.package/GSGitWorkingCopy.class/methodProperties.json b/src/GitS-Core.package/GSGitWorkingCopy.class/methodProperties.json index 6aa3386bd..e24ec7c58 100644 --- a/src/GitS-Core.package/GSGitWorkingCopy.class/methodProperties.json +++ b/src/GitS-Core.package/GSGitWorkingCopy.class/methodProperties.json @@ -97,9 +97,11 @@ "materializeCommit:" : "mad 9/6/2023 19:27", "materializeHead" : "mad 8/24/2023 23:49", "moveToNewRepositoryLocation:" : "mad 12/22/2023 17:50", + "newRefTreeWithLabel:ref:" : "mad 10/10/2024 00:55", "pushRef:force:" : "mad 5/18/2024 11:31", "refChanged:" : "mad 5/15/2024 21:20", "refName:" : "mad 6/3/2023 14:17", + "refTreeRoots" : "mad 10/10/2024 01:14", "refsBaseName" : "mad 11/28/2023 15:33", "refsBaseNameForHash:" : "mad 11/28/2023 15:32", "refsChanged" : "mad 5/15/2024 21:21", diff --git a/src/GitS-Core.package/GSRefTree.class/README.md b/src/GitS-Core.package/GSRefTree.class/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/src/GitS-Core.package/GSRefTree.class/instance/add..st b/src/GitS-Core.package/GSRefTree.class/instance/add..st new file mode 100644 index 000000000..01a665d0c --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/instance/add..st @@ -0,0 +1,5 @@ +adding +add: aString + (aString includes: $/) + ifTrue: [self addInTree: aString] + ifFalse: [self addRef: aString]. \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTree.class/instance/addInTree..st b/src/GitS-Core.package/GSRefTree.class/instance/addInTree..st new file mode 100644 index 000000000..8eda256a0 --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/instance/addInTree..st @@ -0,0 +1,6 @@ +adding +addInTree: aString + | split | + split := aString indexOf: $/. + (self getTree: (aString first: split - 1)) + add: (aString allButFirst: split). \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTree.class/instance/addRef..st b/src/GitS-Core.package/GSRefTree.class/instance/addRef..st new file mode 100644 index 000000000..cb9f60a7a --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/instance/addRef..st @@ -0,0 +1,3 @@ +adding +addRef: aString + ^ self children add: (self createRef: aString) \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTree.class/instance/addTree..st b/src/GitS-Core.package/GSRefTree.class/instance/addTree..st new file mode 100644 index 000000000..aa0f8a04a --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/instance/addTree..st @@ -0,0 +1,3 @@ +adding +addTree: aString + ^ self children add: (self createTree: aString) \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTree.class/instance/children..st b/src/GitS-Core.package/GSRefTree.class/instance/children..st new file mode 100644 index 000000000..eb55e7516 --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/instance/children..st @@ -0,0 +1,3 @@ +accessing +children: anObject + children := anObject \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTree.class/instance/children.st b/src/GitS-Core.package/GSRefTree.class/instance/children.st new file mode 100644 index 000000000..c0c773f02 --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/instance/children.st @@ -0,0 +1,3 @@ +accessing +children + ^ children \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTree.class/instance/compress.st b/src/GitS-Core.package/GSRefTree.class/instance/compress.st new file mode 100644 index 000000000..fd338c104 --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/instance/compress.st @@ -0,0 +1,9 @@ +compressing +compress + self compressChildren. + self children ifEmpty: [^ nil]. + self children size = 1 ifTrue: [ + ^ self children first + prefixLabel: self label, $/; + yourself]. + ^ self \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTree.class/instance/compressChildren.st b/src/GitS-Core.package/GSRefTree.class/instance/compressChildren.st new file mode 100644 index 000000000..502d6f322 --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/instance/compressChildren.st @@ -0,0 +1,7 @@ +compressing +compressChildren + self children: + ((self children + collect: [:each | each compress] + thenSelect: #notNil) + sorted: #label ascending). \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTree.class/instance/createRef..st b/src/GitS-Core.package/GSRefTree.class/instance/createRef..st new file mode 100644 index 000000000..634897bce --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/instance/createRef..st @@ -0,0 +1,7 @@ +adding +createRef: aString + ^ GSRefWrapper new + workingCopy: self workingCopy; + label: aString; + ref: self ref, aString; + yourself \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTree.class/instance/createTree..st b/src/GitS-Core.package/GSRefTree.class/instance/createTree..st new file mode 100644 index 000000000..bfc576a34 --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/instance/createTree..st @@ -0,0 +1,7 @@ +adding +createTree: aString + ^ GSRefTree new + workingCopy: self workingCopy; + label: aString; + ref: self ref, aString, $/; + yourself \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTree.class/instance/getTree..st b/src/GitS-Core.package/GSRefTree.class/instance/getTree..st new file mode 100644 index 000000000..ad032720b --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/instance/getTree..st @@ -0,0 +1,5 @@ +adding +getTree: aString + ^ self children + detect: [:each | each isTree and: [each ref beginsWith: ('{1}/{2}/' format: {self ref. aString})]] + ifNone: [self addTree: aString] \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTree.class/instance/initialize.st b/src/GitS-Core.package/GSRefTree.class/instance/initialize.st new file mode 100644 index 000000000..041c5b3da --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/instance/initialize.st @@ -0,0 +1,4 @@ +initialize-release +initialize + super initialize. + self children: OrderedCollection new. \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTree.class/instance/isEmpty.st b/src/GitS-Core.package/GSRefTree.class/instance/isEmpty.st new file mode 100644 index 000000000..59fc8ff59 --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/instance/isEmpty.st @@ -0,0 +1,3 @@ +accessing +isEmpty + ^ self children isEmpty \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTree.class/instance/isTree.st b/src/GitS-Core.package/GSRefTree.class/instance/isTree.st new file mode 100644 index 000000000..5d316fbc1 --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/instance/isTree.st @@ -0,0 +1,3 @@ +accessing +isTree + ^ true \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTree.class/methodProperties.json b/src/GitS-Core.package/GSRefTree.class/methodProperties.json new file mode 100644 index 000000000..ef3d005ab --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/methodProperties.json @@ -0,0 +1,18 @@ +{ + "class" : { + }, + "instance" : { + "add:" : "mad 10/10/2024 00:03", + "addInTree:" : "mad 10/10/2024 01:10", + "addRef:" : "mad 10/10/2024 00:03", + "addTree:" : "mad 10/10/2024 00:05", + "children" : "mad 10/9/2024 23:30", + "children:" : "mad 10/9/2024 23:30", + "compress" : "mad 10/10/2024 01:09", + "compressChildren" : "mad 10/10/2024 00:57", + "createRef:" : "mad 10/10/2024 01:12", + "createTree:" : "mad 10/10/2024 01:28", + "getTree:" : "mad 10/10/2024 00:05", + "initialize" : "mad 10/10/2024 00:06", + "isEmpty" : "mad 10/10/2024 00:13", + "isTree" : "mad 10/9/2024 23:33" } } diff --git a/src/GitS-Core.package/GSRefTree.class/properties.json b/src/GitS-Core.package/GSRefTree.class/properties.json new file mode 100644 index 000000000..ddfab03bf --- /dev/null +++ b/src/GitS-Core.package/GSRefTree.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "GitS-Core-Browser", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "children" ], + "name" : "GSRefTree", + "pools" : [ + ], + "super" : "GSRefTreeMember", + "type" : "normal" } diff --git a/src/GitS-Core.package/GSRefTreeMember.class/README.md b/src/GitS-Core.package/GSRefTreeMember.class/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/src/GitS-Core.package/GSRefWrapper.class/instance/balloonText.st b/src/GitS-Core.package/GSRefTreeMember.class/instance/balloonText.st similarity index 64% rename from src/GitS-Core.package/GSRefWrapper.class/instance/balloonText.st rename to src/GitS-Core.package/GSRefTreeMember.class/instance/balloonText.st index cb6cc421b..52fd10547 100644 --- a/src/GitS-Core.package/GSRefWrapper.class/instance/balloonText.st +++ b/src/GitS-Core.package/GSRefTreeMember.class/instance/balloonText.st @@ -1,3 +1,3 @@ accessing balloonText - ^ self item \ No newline at end of file + ^ self ref \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMember.class/instance/children.st b/src/GitS-Core.package/GSRefTreeMember.class/instance/children.st new file mode 100644 index 000000000..50882fd41 --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMember.class/instance/children.st @@ -0,0 +1,3 @@ +accessing +children + self subclassResponsibility. \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMember.class/instance/compress.st b/src/GitS-Core.package/GSRefTreeMember.class/instance/compress.st new file mode 100644 index 000000000..5249b44b3 --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMember.class/instance/compress.st @@ -0,0 +1,3 @@ +compressing +compress + self subclassResponsibility. \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMember.class/instance/isRef.st b/src/GitS-Core.package/GSRefTreeMember.class/instance/isRef.st new file mode 100644 index 000000000..76180d8d2 --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMember.class/instance/isRef.st @@ -0,0 +1,3 @@ +accessing +isRef + ^ false \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMember.class/instance/isTree.st b/src/GitS-Core.package/GSRefTreeMember.class/instance/isTree.st new file mode 100644 index 000000000..6ce2b94c6 --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMember.class/instance/isTree.st @@ -0,0 +1,3 @@ +accessing +isTree + ^ false \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMember.class/instance/label..st b/src/GitS-Core.package/GSRefTreeMember.class/instance/label..st new file mode 100644 index 000000000..c232d645a --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMember.class/instance/label..st @@ -0,0 +1,3 @@ +accessing +label: aString + label := aString \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMember.class/instance/label.st b/src/GitS-Core.package/GSRefTreeMember.class/instance/label.st new file mode 100644 index 000000000..b5564b222 --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMember.class/instance/label.st @@ -0,0 +1,3 @@ +accessing +label + ^ label \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMember.class/instance/prefixLabel..st b/src/GitS-Core.package/GSRefTreeMember.class/instance/prefixLabel..st new file mode 100644 index 000000000..a578829fe --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMember.class/instance/prefixLabel..st @@ -0,0 +1,3 @@ +accessing +prefixLabel: aString + self label: aString, self label. \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMember.class/instance/ref..st b/src/GitS-Core.package/GSRefTreeMember.class/instance/ref..st new file mode 100644 index 000000000..381755717 --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMember.class/instance/ref..st @@ -0,0 +1,3 @@ +accessing +ref: aString + ref := aString \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMember.class/instance/ref.st b/src/GitS-Core.package/GSRefTreeMember.class/instance/ref.st new file mode 100644 index 000000000..d29fbaefb --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMember.class/instance/ref.st @@ -0,0 +1,3 @@ +accessing +ref + ^ ref \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMember.class/instance/text.st b/src/GitS-Core.package/GSRefTreeMember.class/instance/text.st new file mode 100644 index 000000000..597f71741 --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMember.class/instance/text.st @@ -0,0 +1,3 @@ +accessing +text + ^ self label \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMember.class/instance/workingCopy..st b/src/GitS-Core.package/GSRefTreeMember.class/instance/workingCopy..st new file mode 100644 index 000000000..facb3a859 --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMember.class/instance/workingCopy..st @@ -0,0 +1,3 @@ +accessing +workingCopy: aWorkingCopy + workingCopy := aWorkingCopy \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMember.class/instance/workingCopy.st b/src/GitS-Core.package/GSRefTreeMember.class/instance/workingCopy.st new file mode 100644 index 000000000..685b55241 --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMember.class/instance/workingCopy.st @@ -0,0 +1,3 @@ +accessing +workingCopy + ^ workingCopy \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMember.class/methodProperties.json b/src/GitS-Core.package/GSRefTreeMember.class/methodProperties.json new file mode 100644 index 000000000..a62b247ca --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMember.class/methodProperties.json @@ -0,0 +1,17 @@ +{ + "class" : { + }, + "instance" : { + "balloonText" : "mad 10/9/2024 23:42", + "children" : "mad 10/9/2024 23:30", + "compress" : "mad 10/10/2024 00:08", + "isRef" : "mad 10/9/2024 23:33", + "isTree" : "mad 10/9/2024 23:33", + "label" : "mad 10/9/2024 23:31", + "label:" : "mad 10/9/2024 23:32", + "prefixLabel:" : "mad 10/10/2024 00:12", + "ref" : "mad 10/10/2024 01:04", + "ref:" : "mad 10/10/2024 01:04", + "text" : "mad 10/10/2024 01:29", + "workingCopy" : "mad 10/9/2024 23:31", + "workingCopy:" : "mad 10/9/2024 23:32" } } diff --git a/src/GitS-Core.package/GSRefTreeMember.class/properties.json b/src/GitS-Core.package/GSRefTreeMember.class/properties.json new file mode 100644 index 000000000..9baac1902 --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMember.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "GitS-Core-Browser", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "workingCopy", + "label", + "ref" ], + "name" : "GSRefTreeMember", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/src/GitS-Core.package/GSRefTreeMemberWrapper.class/README.md b/src/GitS-Core.package/GSRefTreeMemberWrapper.class/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/src/GitS-Core.package/GSRefTreeMemberWrapper.class/instance/asString.st b/src/GitS-Core.package/GSRefTreeMemberWrapper.class/instance/asString.st new file mode 100644 index 000000000..ebcb03668 --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMemberWrapper.class/instance/asString.st @@ -0,0 +1,3 @@ +accessing +asString + ^ self item text \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMemberWrapper.class/instance/balloonText.st b/src/GitS-Core.package/GSRefTreeMemberWrapper.class/instance/balloonText.st new file mode 100644 index 000000000..887ae1d71 --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMemberWrapper.class/instance/balloonText.st @@ -0,0 +1,3 @@ +accessing +balloonText + ^ self item balloonText \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMemberWrapper.class/instance/contents.st b/src/GitS-Core.package/GSRefTreeMemberWrapper.class/instance/contents.st new file mode 100644 index 000000000..dfda37f43 --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMemberWrapper.class/instance/contents.st @@ -0,0 +1,3 @@ +accessing +contents + ^ self item children collect: [:each | self class with: each model: self model] \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefTreeMemberWrapper.class/methodProperties.json b/src/GitS-Core.package/GSRefTreeMemberWrapper.class/methodProperties.json new file mode 100644 index 000000000..6b52b5d18 --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMemberWrapper.class/methodProperties.json @@ -0,0 +1,7 @@ +{ + "class" : { + }, + "instance" : { + "asString" : "mad 10/10/2024 01:30", + "balloonText" : "mad 10/10/2024 01:18", + "contents" : "mad 10/10/2024 01:25" } } diff --git a/src/GitS-Core.package/GSRefTreeMemberWrapper.class/properties.json b/src/GitS-Core.package/GSRefTreeMemberWrapper.class/properties.json new file mode 100644 index 000000000..2ec152d0b --- /dev/null +++ b/src/GitS-Core.package/GSRefTreeMemberWrapper.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "GitS-Core-Browser", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "GSRefTreeMemberWrapper", + "pools" : [ + ], + "super" : "GSListItemWrapper", + "type" : "normal" } diff --git a/src/GitS-Core.package/GSRefWrapper.class/instance/children.st b/src/GitS-Core.package/GSRefWrapper.class/instance/children.st new file mode 100644 index 000000000..dfbf93323 --- /dev/null +++ b/src/GitS-Core.package/GSRefWrapper.class/instance/children.st @@ -0,0 +1,3 @@ +accessing +children + ^ {} \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefWrapper.class/instance/compress.st b/src/GitS-Core.package/GSRefWrapper.class/instance/compress.st new file mode 100644 index 000000000..c7752ca3d --- /dev/null +++ b/src/GitS-Core.package/GSRefWrapper.class/instance/compress.st @@ -0,0 +1,3 @@ +compressing +compress + ^ self \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefWrapper.class/instance/icon.st b/src/GitS-Core.package/GSRefWrapper.class/instance/icon.st deleted file mode 100644 index b8ca9a768..000000000 --- a/src/GitS-Core.package/GSRefWrapper.class/instance/icon.st +++ /dev/null @@ -1,6 +0,0 @@ -accessing -icon - (self isActive or: [self isDetachedHead]) ifTrue: [^ ToolIcons testGreen]. - self isRemoteRef ifTrue: [^ ToolIcons arrowUp]. - self isSqueakRef ifFalse: [^ GSBrowser gitIcon scaledToSize: 24 @ 24]. - ^ ToolIcons blank \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefWrapper.class/instance/isActive.st b/src/GitS-Core.package/GSRefWrapper.class/instance/isActive.st index 1dc5aec3c..5b46a9100 100644 --- a/src/GitS-Core.package/GSRefWrapper.class/instance/isActive.st +++ b/src/GitS-Core.package/GSRefWrapper.class/instance/isActive.st @@ -1,3 +1,3 @@ accessing isActive - ^ self workingCopy currentHeadTarget = self item \ No newline at end of file + ^ self workingCopy currentHeadTarget = self ref \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefWrapper.class/instance/isDetachedHead.st b/src/GitS-Core.package/GSRefWrapper.class/instance/isDetachedHead.st deleted file mode 100644 index 48598ac91..000000000 --- a/src/GitS-Core.package/GSRefWrapper.class/instance/isDetachedHead.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -isDetachedHead - ^ self isHead and: [self workingCopy isHeadDetached] \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefWrapper.class/instance/isHead.st b/src/GitS-Core.package/GSRefWrapper.class/instance/isHead.st deleted file mode 100644 index 646d3abfa..000000000 --- a/src/GitS-Core.package/GSRefWrapper.class/instance/isHead.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -isHead - ^ self item = self workingCopy headRefName \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefWrapper.class/instance/isRef.st b/src/GitS-Core.package/GSRefWrapper.class/instance/isRef.st new file mode 100644 index 000000000..6918e8eab --- /dev/null +++ b/src/GitS-Core.package/GSRefWrapper.class/instance/isRef.st @@ -0,0 +1,3 @@ +accessing +isRef + ^ true \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefWrapper.class/instance/isRemoteRef.st b/src/GitS-Core.package/GSRefWrapper.class/instance/isRemoteRef.st deleted file mode 100644 index 525da4fcc..000000000 --- a/src/GitS-Core.package/GSRefWrapper.class/instance/isRemoteRef.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -isRemoteRef - ^ self workingCopy isRemoteRef: self item \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefWrapper.class/instance/isSqueakBranch.st b/src/GitS-Core.package/GSRefWrapper.class/instance/isSqueakBranch.st deleted file mode 100644 index e1d506456..000000000 --- a/src/GitS-Core.package/GSRefWrapper.class/instance/isSqueakBranch.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -isSqueakBranch - ^ self workingCopy isSqueakBranchRef: self item \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefWrapper.class/instance/isSqueakRef.st b/src/GitS-Core.package/GSRefWrapper.class/instance/isSqueakRef.st deleted file mode 100644 index 2371ba202..000000000 --- a/src/GitS-Core.package/GSRefWrapper.class/instance/isSqueakRef.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -isSqueakRef - ^ self workingCopy isSqueakRef: self item \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefWrapper.class/instance/setItem..st b/src/GitS-Core.package/GSRefWrapper.class/instance/setItem..st deleted file mode 100644 index 1414a3023..000000000 --- a/src/GitS-Core.package/GSRefWrapper.class/instance/setItem..st +++ /dev/null @@ -1,8 +0,0 @@ -initialization -setItem: aString - | name | - super setItem: aString. - name := GitReference shortName: aString. - self isSqueakBranch ifFalse: [ - name := GSTextUtilities colorText: name with: Color gray]. - self string: name. \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefWrapper.class/instance/text.st b/src/GitS-Core.package/GSRefWrapper.class/instance/text.st new file mode 100644 index 000000000..9e1b689ec --- /dev/null +++ b/src/GitS-Core.package/GSRefWrapper.class/instance/text.st @@ -0,0 +1,3 @@ +accessing +text + ^ self isActive ifFalse: [self label] ifTrue: [GSTextUtilities bold: self label] \ No newline at end of file diff --git a/src/GitS-Core.package/GSRefWrapper.class/methodProperties.json b/src/GitS-Core.package/GSRefWrapper.class/methodProperties.json index b3b18393d..9073dd179 100644 --- a/src/GitS-Core.package/GSRefWrapper.class/methodProperties.json +++ b/src/GitS-Core.package/GSRefWrapper.class/methodProperties.json @@ -2,12 +2,8 @@ "class" : { }, "instance" : { - "balloonText" : "mad 9/13/2023 21:49", - "icon" : "mad 10/9/2024 16:01", - "isActive" : "mad 11/29/2023 15:19", - "isDetachedHead" : "mad 10/24/2023 17:22", - "isHead" : "mad 10/24/2023 17:22", - "isRemoteRef" : "mad 9/19/2023 14:36", - "isSqueakBranch" : "mad 9/19/2023 14:49", - "isSqueakRef" : "mad 9/19/2023 14:11", - "setItem:" : "mad 10/9/2024 16:01" } } + "children" : "mad 10/10/2024 01:08", + "compress" : "mad 10/10/2024 01:05", + "isActive" : "mad 10/9/2024 23:41", + "isRef" : "mad 10/9/2024 23:33", + "text" : "mad 10/10/2024 01:30" } } diff --git a/src/GitS-Core.package/GSRefWrapper.class/properties.json b/src/GitS-Core.package/GSRefWrapper.class/properties.json index 5edbfbc60..e8020cfcb 100644 --- a/src/GitS-Core.package/GSRefWrapper.class/properties.json +++ b/src/GitS-Core.package/GSRefWrapper.class/properties.json @@ -10,5 +10,5 @@ "name" : "GSRefWrapper", "pools" : [ ], - "super" : "GSListItemWrapper", + "super" : "GSRefTreeMember", "type" : "normal" }