-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
78 changed files
with
313 additions
and
115 deletions.
There are no files selected for viewing
3 changes: 0 additions & 3 deletions
3
src/GitS-Core.package/GSBrowser.class/instance/actionRefreshRefList.st
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
src/GitS-Core.package/GSBrowser.class/instance/actionRefreshRefTree.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 @@ | ||
actions | ||
actionRefreshRefTree | ||
self changed: #refTreeRoots. |
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
accessing | ||
activeRef | ||
^ activeRef | ||
^ (self activeRefTreeMember ifNil: [^ nil]) isRef | ||
ifTrue: [self activeRefTreeMember ref] | ||
ifFalse: [nil] |
7 changes: 7 additions & 0 deletions
7
src/GitS-Core.package/GSBrowser.class/instance/activeRefTreeMember..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,7 @@ | ||
accessing | ||
activeRefTreeMember: aRefTreeMember | ||
self basicActiveRefTreeMember: aRefTreeMember. | ||
self activeRefCommit ifNotNil: [:commit | self activeCommit: commit]. | ||
self | ||
changed: #activeRefTreeMember; | ||
changed: #commitList. |
3 changes: 3 additions & 0 deletions
3
src/GitS-Core.package/GSBrowser.class/instance/activeRefTreeMember.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 @@ | ||
accessing | ||
activeRefTreeMember | ||
^ activeRefTreeMember |
3 changes: 3 additions & 0 deletions
3
src/GitS-Core.package/GSBrowser.class/instance/basicActiveRefTreeMember..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 @@ | ||
accessing | ||
basicActiveRefTreeMember: aRefTreeMember | ||
activeRefTreeMember := aRefTreeMember |
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
10 changes: 0 additions & 10 deletions
10
src/GitS-Core.package/GSBrowser.class/instance/buildRefList..st
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
src/GitS-Core.package/GSBrowser.class/instance/buildRefTree..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,10 @@ | ||
toolbuilder | ||
buildRefTree: builder | ||
^ builder pluggableTreeSpec new | ||
model: self; | ||
roots: #refTreeRoots; | ||
getSelected: #activeRefTreeMember; | ||
setSelected: #activeRefTreeMember:; | ||
nodeClass: GSRefTreeMemberWrapper; | ||
menu: #refListMenu:; | ||
yourself |
10 changes: 0 additions & 10 deletions
10
src/GitS-Core.package/GSBrowser.class/instance/ensureActiveRefIdentityIn..st
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
src/GitS-Core.package/GSBrowser.class/instance/ensureActiveRefTreeMemberIdentityIn..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,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]. |
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
This file was deleted.
Oops, something went wrong.
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
6 changes: 6 additions & 0 deletions
6
src/GitS-Core.package/GSBrowser.class/instance/refTreeRoots.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,6 @@ | ||
ui | ||
refTreeRoots | ||
| roots | | ||
roots := self activeWorkingCopy ifNotNil: #refTreeRoots ifNil: [^ {}]. | ||
self ensureActiveRefTreeMemberIdentityIn: roots. | ||
^ roots |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ updating | |
refsChanged | ||
self | ||
changed: #commitList; | ||
changed: #refList. | ||
changed: #refTreeRoots. |
4 changes: 0 additions & 4 deletions
4
src/GitS-Core.package/GSBrowser.class/instance/showGitRefs..st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
src/GitS-Core.package/GSBrowser.class/instance/showGitRefs.st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
src/GitS-Core.package/GSBrowser.class/instance/toggleShowGitRefs.st
This file was deleted.
Oops, something went wrong.
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
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
7 changes: 7 additions & 0 deletions
7
src/GitS-Core.package/GSGitWorkingCopy.class/instance/newRefTreeWithLabel.ref..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,7 @@ | ||
ref-tree | ||
newRefTreeWithLabel: labelString ref: refString | ||
^ GSRefTree new | ||
workingCopy: self; | ||
label: labelString; | ||
ref: refString; | ||
yourself |
21 changes: 21 additions & 0 deletions
21
src/GitS-Core.package/GSGitWorkingCopy.class/instance/refTreeRoots.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,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 |
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
Empty file.
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,5 @@ | ||
adding | ||
add: aString | ||
(aString includes: $/) | ||
ifTrue: [self addInTree: aString] | ||
ifFalse: [self addRef: aString]. |
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,6 @@ | ||
adding | ||
addInTree: aString | ||
| split | | ||
split := aString indexOf: $/. | ||
(self getTree: (aString first: split - 1)) | ||
add: (aString allButFirst: split). |
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 @@ | ||
adding | ||
addRef: aString | ||
^ self children add: (self createRef: aString) |
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 @@ | ||
adding | ||
addTree: aString | ||
^ self children add: (self createTree: aString) |
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 @@ | ||
accessing | ||
children: anObject | ||
children := anObject |
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 @@ | ||
accessing | ||
children | ||
^ children |
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,9 @@ | ||
compressing | ||
compress | ||
self compressChildren. | ||
self children ifEmpty: [^ nil]. | ||
self children size = 1 ifTrue: [ | ||
^ self children first | ||
prefixLabel: self label, $/; | ||
yourself]. | ||
^ self |
7 changes: 7 additions & 0 deletions
7
src/GitS-Core.package/GSRefTree.class/instance/compressChildren.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,7 @@ | ||
compressing | ||
compressChildren | ||
self children: | ||
((self children | ||
collect: [:each | each compress] | ||
thenSelect: #notNil) | ||
sorted: #label ascending). |
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,7 @@ | ||
adding | ||
createRef: aString | ||
^ GSRefWrapper new | ||
workingCopy: self workingCopy; | ||
label: aString; | ||
ref: self ref, aString; | ||
yourself |
7 changes: 7 additions & 0 deletions
7
src/GitS-Core.package/GSRefTree.class/instance/createTree..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,7 @@ | ||
adding | ||
createTree: aString | ||
^ GSRefTree new | ||
workingCopy: self workingCopy; | ||
label: aString; | ||
ref: self ref, aString, $/; | ||
yourself |
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,5 @@ | ||
adding | ||
getTree: aString | ||
^ self children | ||
detect: [:each | each isTree and: [each ref beginsWith: ('{1}/{2}/' format: {self ref. aString})]] | ||
ifNone: [self addTree: aString] |
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,4 @@ | ||
initialize-release | ||
initialize | ||
super initialize. | ||
self children: OrderedCollection new. |
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 @@ | ||
accessing | ||
isEmpty | ||
^ self children isEmpty |
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 @@ | ||
accessing | ||
isTree | ||
^ true |
Oops, something went wrong.