From 60f28ec39b0a41d0fa25a19931e6227db3661429 Mon Sep 17 00:00:00 2001 From: Esteban Lorenzano Date: Thu, 14 Sep 2023 16:37:23 +0200 Subject: [PATCH 1/5] user libgit2 3.0.6.1 (support for libgit2 1.7 in Linux) --- BaselineOfIceberg/BaselineOfIceberg.class.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaselineOfIceberg/BaselineOfIceberg.class.st b/BaselineOfIceberg/BaselineOfIceberg.class.st index f69d9bdebe..7ef8592cfd 100644 --- a/BaselineOfIceberg/BaselineOfIceberg.class.st +++ b/BaselineOfIceberg/BaselineOfIceberg.class.st @@ -76,7 +76,7 @@ BaselineOfIceberg >> libgit: spec [ baseline: 'LibGit' with: [ spec - repository: 'github://pharo-vcs/libgit2-pharo-bindings:v3.0.6'; + repository: 'github://pharo-vcs/libgit2-pharo-bindings:v3.0.6.1'; loads: 'default' ]. spec project: 'LibGit-Tests' From 138f2a784fb4584aa5db7b04e24181859054da0e Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Tue, 24 Oct 2023 17:05:25 +0200 Subject: [PATCH 2/5] - Updating to Libgit 3.0.8 to have proxy for the fetch. - Adding proxy configuration from the NetworkSettings - Setting proxy in Clone, Fetch, and Pull - Adding Tests --- BaselineOfIceberg/BaselineOfIceberg.class.st | 2 +- Iceberg-Libgit/IceGitClone.class.st | 2 + Iceberg-Libgit/IceGitLocalBranch.class.st | 58 +++++++++----- Iceberg-Libgit/IceGitRemote.class.st | 50 +++++++------ Iceberg-Tests/IceProxySettingsTest.class.st | 79 ++++++++++++++++++++ Iceberg/Iceberg.class.st | 54 +++++++++++++ 6 files changed, 202 insertions(+), 43 deletions(-) create mode 100644 Iceberg-Tests/IceProxySettingsTest.class.st diff --git a/BaselineOfIceberg/BaselineOfIceberg.class.st b/BaselineOfIceberg/BaselineOfIceberg.class.st index 7ef8592cfd..67e3ef5e7e 100644 --- a/BaselineOfIceberg/BaselineOfIceberg.class.st +++ b/BaselineOfIceberg/BaselineOfIceberg.class.st @@ -76,7 +76,7 @@ BaselineOfIceberg >> libgit: spec [ baseline: 'LibGit' with: [ spec - repository: 'github://pharo-vcs/libgit2-pharo-bindings:v3.0.6.1'; + repository: 'github://pharo-vcs/libgit2-pharo-bindings:v3.0.8'; loads: 'default' ]. spec project: 'LibGit-Tests' diff --git a/Iceberg-Libgit/IceGitClone.class.st b/Iceberg-Libgit/IceGitClone.class.st index a0dfd41c31..916c796d51 100644 --- a/Iceberg-Libgit/IceGitClone.class.st +++ b/Iceberg-Libgit/IceGitClone.class.st @@ -34,6 +34,8 @@ IceGitClone >> execute [ repo := LGitRepository on: location. cloneOptions := repo cloneOptionsStructureClass withCredentialsProvider: (IceCredentialsProvider defaultForRemoteUrl: url). + Iceberg configureLGitProxyOpt: cloneOptions fetchOptions proxyOptions. + "Keeping references, because if not the GC take them." checkoutOptions := cloneOptions checkoutOptions. callbacks := cloneOptions fetchOptions callbacks. diff --git a/Iceberg-Libgit/IceGitLocalBranch.class.st b/Iceberg-Libgit/IceGitLocalBranch.class.st index 86c55a68c4..082e3d2c5e 100644 --- a/Iceberg-Libgit/IceGitLocalBranch.class.st +++ b/Iceberg-Libgit/IceGitLocalBranch.class.st @@ -104,32 +104,52 @@ IceGitLocalBranch >> name [ { #category : #'private - pushing' } IceGitLocalBranch >> pushBranchToRemote: aRemote gitRemote: gitRemote progress: pushProgress [ - - gitRemote + + | pushOptions | + pushOptions := gitRemote ffiLibrary uniqueInstance + pushOptionsStructureClass defaults + callbacks: + ((gitRemote ffiLibrary uniqueInstance + remoteCallbacksStructureClass withProvider: + (IceCredentialsProvider defaultForRemote: + aRemote)) + pushTransferProgress: pushProgress; + yourself); + yourself. + + Iceberg configureLGitProxyOpt: pushOptions proxyOptions. + + gitRemote pushWithRefSpec: (LGitRefSpec new - source: self fullname; - destination: self fullname; - yourself) - pushOptions: (gitRemote ffiLibrary uniqueInstance pushOptionsStructureClass defaults - callbacks: ((gitRemote ffiLibrary uniqueInstance remoteCallbacksStructureClass withProvider: (IceCredentialsProvider defaultForRemote: aRemote)) - pushTransferProgress: pushProgress; - yourself); - yourself) + source: self fullname; + destination: self fullname; + yourself) + pushOptions: pushOptions ] { #category : #'private - pushing' } IceGitLocalBranch >> pushTag: tag toRemote: aRemote gitRemote: gitRemote progress: pushProgress [ - gitRemote + | pushOptions | + pushOptions := gitRemote ffiLibrary uniqueInstance + pushOptionsStructureClass defaults + callbacks: + ((gitRemote ffiLibrary uniqueInstance + remoteCallbacksStructureClass withProvider: + (IceCredentialsProvider defaultForRemote: + aRemote)) + pushTransferProgress: pushProgress; + yourself); + yourself. + + Iceberg configureLGitProxyOpt: pushOptions proxyOptions. + + gitRemote pushWithRefSpec: (LGitRefSpec new - source: 'refs/tags/' , tag name; - destination: 'refs/tags/' , tag name; - yourself) - pushOptions: (gitRemote ffiLibrary uniqueInstance pushOptionsStructureClass defaults - callbacks: ((gitRemote ffiLibrary uniqueInstance remoteCallbacksStructureClass withProvider: (IceCredentialsProvider defaultForRemote: aRemote)) - pushTransferProgress: pushProgress; - yourself); - yourself) + source: 'refs/tags/' , tag name; + destination: 'refs/tags/' , tag name; + yourself) + pushOptions: pushOptions ] { #category : #'private - pushing' } diff --git a/Iceberg-Libgit/IceGitRemote.class.st b/Iceberg-Libgit/IceGitRemote.class.st index 06bffe6ca0..917d5162dc 100644 --- a/Iceberg-Libgit/IceGitRemote.class.st +++ b/Iceberg-Libgit/IceGitRemote.class.st @@ -49,36 +49,40 @@ IceGitRemote >> branches [ ] { #category : #fetching } -IceGitRemote >> fetch [ - +IceGitRemote >> doFetchWithRefSpec: refSpec [ + localRepository handleLibgitError: [ - [ (LGitRemote of: self repositoryHandle named: self name) + [ + (LGitRemote of: self repositoryHandle named: self name) lookup; - fetchWithCredentials: (IceCredentialsProvider defaultForRemote: self) - andProgressCallback: IceGitTransferProgress new ] + fetchWithCredentials: + (IceCredentialsProvider defaultForRemote: self) + andProgressCallback: IceGitTransferProgress new + refSpec: refSpec + proxyConfigurationBlock: [ :proxyOpt | Iceberg configureLGitProxyOpt: proxyOpt ] ] on: LGitAbstractError - do: [ :e | e acceptError: (IceLibgitErrorVisitor onContext: self) ]. - - "Call post fetch to fix unknown commits" - localRepository postFetch ] + do: [ :e | e acceptError: (IceLibgitErrorVisitor onContext: self) ] ] +] + +{ #category : #fetching } +IceGitRemote >> fetch [ + + self doFetchWithRefSpec: nil. + + "Call post fetch to fix unknown commits" + localRepository postFetch ] { #category : #fetching } IceGitRemote >> fetchBranch: aBranch [ - - localRepository handleLibgitError: [ - [ | refSpec remote | - refSpec := LGitRefSpec - fromString: - ('{2}:refs/remotes/{1}/{2}' - format: - {self name. - aBranch name}). - (remote := LGitRemote of: self repositoryHandle named: self name) - lookup; - fetchWithCredentials: (IceCredentialsProvider defaultForRemote: self) refSpec: refSpec ] - on: LGitAbstractError - do: [ :e | e acceptError: (IceLibgitErrorVisitor onContext: self) ] ] + + | refSpec | + refSpec := LGitRefSpec fromString: + ('{2}:refs/remotes/{1}/{2}' format: { + self name. + aBranch name }). + + self doFetchWithRefSpec: refSpec ] { #category : #branches } diff --git a/Iceberg-Tests/IceProxySettingsTest.class.st b/Iceberg-Tests/IceProxySettingsTest.class.st new file mode 100644 index 0000000000..b9a3ebda37 --- /dev/null +++ b/Iceberg-Tests/IceProxySettingsTest.class.st @@ -0,0 +1,79 @@ +Class { + #name : #IceProxySettingsTest, + #superclass : #TestCase, + #instVars : [ + 'oldNetworkSettingsHost', + 'oldNetworkSettingsPort' + ], + #category : #'Iceberg-Tests-Core-Remotes' +} + +{ #category : #asserting } +IceProxySettingsTest >> assertProxyURLExternalStringHasValue: aString [ + + | value | + value := Iceberg proxyURLExternalString. + + self assert: value isExternalAddress. + self deny: value isNull. + + self assert: value utf8StringFromCString equals: aString +] + +{ #category : #running } +IceProxySettingsTest >> setUp [ + + super setUp. + + oldNetworkSettingsHost := NetworkSystemSettings httpProxyServer. + oldNetworkSettingsPort := NetworkSystemSettings httpProxyPort. +] + +{ #category : #running } +IceProxySettingsTest >> tearDown [ + + NetworkSystemSettings httpProxyServer: oldNetworkSettingsHost. + NetworkSystemSettings httpProxyPort: oldNetworkSettingsPort. + + super tearDown +] + +{ #category : #tests } +IceProxySettingsTest >> testConfigureProxyOptWithCorrectProxyUrl [ + + | proxyOpt | + + NetworkSystemSettings httpProxyServer: 'myproxy.company.com'. + NetworkSystemSettings httpProxyPort: 8080. + + proxyOpt := LGitProxyOptions defaults. + Iceberg configureLGitProxyOpt: proxyOpt. + + self assert: proxyOpt prim_url value equals: Iceberg proxyURLExternalString value. + self assert: proxyOpt prim_url utf8StringFromCString equals: 'https://myproxy.company.com:8080'. +] + +{ #category : #tests } +IceProxySettingsTest >> testEmptyHostReturnsNullPointer [ + + NetworkSystemSettings httpProxyServer: ''. + + self assert: Iceberg proxyURLExternalString isNull. +] + +{ #category : #tests } +IceProxySettingsTest >> testHostAndDefaultPortHasCorrectAddress [ + + NetworkSystemSettings httpProxyServer: 'myproxy.company.com'. + + self assertProxyURLExternalStringHasValue: 'https://myproxy.company.com:80'. +] + +{ #category : #tests } +IceProxySettingsTest >> testHostAndPortHasCorrectAddress [ + + NetworkSystemSettings httpProxyServer: 'myproxy.company.com'. + NetworkSystemSettings httpProxyPort: 8080. + + self assertProxyURLExternalStringHasValue: 'https://myproxy.company.com:8080'. +] diff --git a/Iceberg/Iceberg.class.st b/Iceberg/Iceberg.class.st index 5b49bd6516..e496027868 100644 --- a/Iceberg/Iceberg.class.st +++ b/Iceberg/Iceberg.class.st @@ -19,6 +19,7 @@ Class { #superclass : #Object, #classVars : [ 'EnableMetacelloIntegration', + 'ProxyURLExternalString', 'RemoteTypeSelector', 'ShowSystemRepositories' ], @@ -64,6 +65,27 @@ Iceberg class >> bootstrapWithCommitId: commitId packageList: packageNameList [ repository register ] +{ #category : #proxy } +Iceberg class >> configureLGitProxyOpt: aLGitProxyOptions [ + + | proxyURL | + proxyURL := self proxyURLExternalString. + + "If there is not configured proxy, let's return" + proxyURL isNull ifTrue: [ ^ self ]. + + aLGitProxyOptions prim_url: proxyURL +] + +{ #category : #proxy } +Iceberg class >> createProxyURLExternalString [ + + NetworkSystemSettings httpProxyServer isEmpty + ifTrue: [ ^ ProxyURLExternalString := ExternalAddress null ]. + + ProxyURLExternalString := ExternalAddress fromString: self formatNetworkSettingsProxyServer. +] + { #category : #settings } Iceberg class >> enableMetacelloIntegration [ ^ EnableMetacelloIntegration ifNil: [ EnableMetacelloIntegration := true ] @@ -74,6 +96,31 @@ Iceberg class >> enableMetacelloIntegration: anObject [ EnableMetacelloIntegration := anObject ] +{ #category : #proxy } +Iceberg class >> ensureProxyURLExternalString [ + + + "If we have a valid string in the external memory, we check its value" + (ProxyURLExternalString isNotNil and: [ ProxyURLExternalString isNull not ]) ifTrue: [ + + "If it is the same that we want, let's just continue. If it is different, we need to free it so, we can allocate a new one" + ProxyURLExternalString utf8StringFromCString = self formatNetworkSettingsProxyServer + ifTrue: [ ^ self ] + ifFalse: [ ProxyURLExternalString free ] ]. + + ^ self createProxyURLExternalString +] + +{ #category : #proxy } +Iceberg class >> formatNetworkSettingsProxyServer [ + + ^ String streamContents: [ :s | + s nextPutAll: 'https://'. + s nextPutAll: NetworkSystemSettings httpProxyServer. + s nextPutAll: ':'. + s nextPutAll: NetworkSystemSettings httpProxyPort printString ] +] + { #category : #accessing } Iceberg class >> icebergRepositoriesURLs [ ^ { @@ -111,6 +158,13 @@ Iceberg class >> packageForCategoryNamed: categoryName [ ] +{ #category : #proxy } +Iceberg class >> proxyURLExternalString [ + + self ensureProxyURLExternalString. + ^ ProxyURLExternalString +] + { #category : #accessing } Iceberg class >> remoteTypeSelector [ "Should be #scpURL or #httpsURL" From e1fc8a618b8ec2c9662684a363ac485f40531988 Mon Sep 17 00:00:00 2001 From: bouraqadi <435343+bouraqadi@users.noreply.github.com> Date: Fri, 27 Oct 2023 16:18:08 +0200 Subject: [PATCH 3/5] Allow repair detached by "merging" into the current branch on disk. We simply display the current branch and mark it and "current" --- .../IceTipExistingBranchPanel.class.st | 14 +++++++--- .../IceTipMergeBranchDialog.class.st | 26 +++++++++---------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Iceberg-TipUI/IceTipExistingBranchPanel.class.st b/Iceberg-TipUI/IceTipExistingBranchPanel.class.st index eae8c778d0..14cb703a69 100644 --- a/Iceberg-TipUI/IceTipExistingBranchPanel.class.st +++ b/Iceberg-TipUI/IceTipExistingBranchPanel.class.st @@ -56,16 +56,16 @@ IceTipExistingBranchPanel >> initializeBranchesList [ branchesList hideColumnHeaders; - addColumn: (SpStringTableColumn evaluated: #shortDescription); + addColumn: (SpStringTableColumn evaluated: [: branch | self shortDescriptionFor: branch ]); items: self model branchModels. self model branchModels detect: #isHead ifFound: [ :head | branchesList selectItem: head ] - ifNone: [ self model hasBranches ifTrue: [ branchesList selectIndex: 1 ] ]. - - self flag: #pharoTodo. "Instead of detecting 'isHead', we would prefer to select 'self model defaultBranchSelection' but we have a bug with the caches. The reason is that #branchModels returns the same cache used by the list but not #defaultBranchSelection." + ifNone: [ + self model hasBranches ifTrue: [ branchesList selectIndex: 1 ] ]. + self flag: #pharoTodo "Instead of detecting 'isHead', we would prefer to select 'self model defaultBranchSelection' but we have a bug with the caches. The reason is that #branchModels returns the same cache used by the list but not #defaultBranchSelection." ] { #category : #initialization } @@ -81,6 +81,12 @@ IceTipExistingBranchPanel >> selectedBranch [ ^ self branchesList selection selectedItem ] +{ #category : #initialization } +IceTipExistingBranchPanel >> shortDescriptionFor: aBranch [ + aBranch isHead ifFalse: [ ^aBranch shortDescription ]. + ^aBranch shortDescription , ' (current)' +] + { #category : #initialization } IceTipExistingBranchPanel >> titleForWindow [ diff --git a/Iceberg-TipUI/IceTipMergeBranchDialog.class.st b/Iceberg-TipUI/IceTipMergeBranchDialog.class.st index 687c7de711..3aa46b995e 100644 --- a/Iceberg-TipUI/IceTipMergeBranchDialog.class.st +++ b/Iceberg-TipUI/IceTipMergeBranchDialog.class.st @@ -35,22 +35,20 @@ IceTipMergeBranchDialog >> beSwitchAndMerge [ IceTipMergeBranchDialog >> createMergeBranchTypes [ | allTypes | - "Collect types local+remotes" - allTypes := { - (IceTipMergeBranchPanel on: self model) - titleForWindow: 'Local'; - withoutHead; - icon: (self iconNamed: #branch); - yourself }, - (self model remoteModels collect: [ :each | - (IceTipMergeBranchPanel on: each) - titleForWindow: each name; - icon: (self iconNamed: #remote); - yourself ]). - + "Collect types local+remotes" + allTypes := { ((IceTipMergeBranchPanel on: self model) + titleForWindow: 'Local'; + icon: (self iconNamed: #branch); + yourself) } + , (self model remoteModels collect: [ :each | + (IceTipMergeBranchPanel on: each) + titleForWindow: each name; + icon: (self iconNamed: #remote); + yourself ]). + "Doing this because I can trigger the accept inside the panels." allTypes do: [ :each | each onAccept: [ self closeWindow ] ]. - + ^ allTypes ] From a2cb544a51fca5774d89ce9da84dc1fa1bb154ba Mon Sep 17 00:00:00 2001 From: Guille Polito Date: Thu, 18 Jan 2024 18:22:19 +0100 Subject: [PATCH 4/5] Revert "Make repair detached display the current branch" --- .../IceTipExistingBranchPanel.class.st | 14 +++------- .../IceTipMergeBranchDialog.class.st | 26 ++++++++++--------- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/Iceberg-TipUI/IceTipExistingBranchPanel.class.st b/Iceberg-TipUI/IceTipExistingBranchPanel.class.st index 14cb703a69..eae8c778d0 100644 --- a/Iceberg-TipUI/IceTipExistingBranchPanel.class.st +++ b/Iceberg-TipUI/IceTipExistingBranchPanel.class.st @@ -56,16 +56,16 @@ IceTipExistingBranchPanel >> initializeBranchesList [ branchesList hideColumnHeaders; - addColumn: (SpStringTableColumn evaluated: [: branch | self shortDescriptionFor: branch ]); + addColumn: (SpStringTableColumn evaluated: #shortDescription); items: self model branchModels. self model branchModels detect: #isHead ifFound: [ :head | branchesList selectItem: head ] - ifNone: [ - self model hasBranches ifTrue: [ branchesList selectIndex: 1 ] ]. + ifNone: [ self model hasBranches ifTrue: [ branchesList selectIndex: 1 ] ]. + + self flag: #pharoTodo. "Instead of detecting 'isHead', we would prefer to select 'self model defaultBranchSelection' but we have a bug with the caches. The reason is that #branchModels returns the same cache used by the list but not #defaultBranchSelection." - self flag: #pharoTodo "Instead of detecting 'isHead', we would prefer to select 'self model defaultBranchSelection' but we have a bug with the caches. The reason is that #branchModels returns the same cache used by the list but not #defaultBranchSelection." ] { #category : #initialization } @@ -81,12 +81,6 @@ IceTipExistingBranchPanel >> selectedBranch [ ^ self branchesList selection selectedItem ] -{ #category : #initialization } -IceTipExistingBranchPanel >> shortDescriptionFor: aBranch [ - aBranch isHead ifFalse: [ ^aBranch shortDescription ]. - ^aBranch shortDescription , ' (current)' -] - { #category : #initialization } IceTipExistingBranchPanel >> titleForWindow [ diff --git a/Iceberg-TipUI/IceTipMergeBranchDialog.class.st b/Iceberg-TipUI/IceTipMergeBranchDialog.class.st index 3aa46b995e..687c7de711 100644 --- a/Iceberg-TipUI/IceTipMergeBranchDialog.class.st +++ b/Iceberg-TipUI/IceTipMergeBranchDialog.class.st @@ -35,20 +35,22 @@ IceTipMergeBranchDialog >> beSwitchAndMerge [ IceTipMergeBranchDialog >> createMergeBranchTypes [ | allTypes | - "Collect types local+remotes" - allTypes := { ((IceTipMergeBranchPanel on: self model) - titleForWindow: 'Local'; - icon: (self iconNamed: #branch); - yourself) } - , (self model remoteModels collect: [ :each | - (IceTipMergeBranchPanel on: each) - titleForWindow: each name; - icon: (self iconNamed: #remote); - yourself ]). - + "Collect types local+remotes" + allTypes := { + (IceTipMergeBranchPanel on: self model) + titleForWindow: 'Local'; + withoutHead; + icon: (self iconNamed: #branch); + yourself }, + (self model remoteModels collect: [ :each | + (IceTipMergeBranchPanel on: each) + titleForWindow: each name; + icon: (self iconNamed: #remote); + yourself ]). + "Doing this because I can trigger the accept inside the panels." allTypes do: [ :each | each onAccept: [ self closeWindow ] ]. - + ^ allTypes ] From e0f320f312ec7ea8bc866cdad4e84aff95fc3d74 Mon Sep 17 00:00:00 2001 From: Guille Polito Date: Thu, 18 Jan 2024 18:22:40 +0100 Subject: [PATCH 5/5] Revert "Revert "Make repair detached display the current branch"" --- .../IceTipExistingBranchPanel.class.st | 14 +++++++--- .../IceTipMergeBranchDialog.class.st | 26 +++++++++---------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Iceberg-TipUI/IceTipExistingBranchPanel.class.st b/Iceberg-TipUI/IceTipExistingBranchPanel.class.st index eae8c778d0..14cb703a69 100644 --- a/Iceberg-TipUI/IceTipExistingBranchPanel.class.st +++ b/Iceberg-TipUI/IceTipExistingBranchPanel.class.st @@ -56,16 +56,16 @@ IceTipExistingBranchPanel >> initializeBranchesList [ branchesList hideColumnHeaders; - addColumn: (SpStringTableColumn evaluated: #shortDescription); + addColumn: (SpStringTableColumn evaluated: [: branch | self shortDescriptionFor: branch ]); items: self model branchModels. self model branchModels detect: #isHead ifFound: [ :head | branchesList selectItem: head ] - ifNone: [ self model hasBranches ifTrue: [ branchesList selectIndex: 1 ] ]. - - self flag: #pharoTodo. "Instead of detecting 'isHead', we would prefer to select 'self model defaultBranchSelection' but we have a bug with the caches. The reason is that #branchModels returns the same cache used by the list but not #defaultBranchSelection." + ifNone: [ + self model hasBranches ifTrue: [ branchesList selectIndex: 1 ] ]. + self flag: #pharoTodo "Instead of detecting 'isHead', we would prefer to select 'self model defaultBranchSelection' but we have a bug with the caches. The reason is that #branchModels returns the same cache used by the list but not #defaultBranchSelection." ] { #category : #initialization } @@ -81,6 +81,12 @@ IceTipExistingBranchPanel >> selectedBranch [ ^ self branchesList selection selectedItem ] +{ #category : #initialization } +IceTipExistingBranchPanel >> shortDescriptionFor: aBranch [ + aBranch isHead ifFalse: [ ^aBranch shortDescription ]. + ^aBranch shortDescription , ' (current)' +] + { #category : #initialization } IceTipExistingBranchPanel >> titleForWindow [ diff --git a/Iceberg-TipUI/IceTipMergeBranchDialog.class.st b/Iceberg-TipUI/IceTipMergeBranchDialog.class.st index 687c7de711..3aa46b995e 100644 --- a/Iceberg-TipUI/IceTipMergeBranchDialog.class.st +++ b/Iceberg-TipUI/IceTipMergeBranchDialog.class.st @@ -35,22 +35,20 @@ IceTipMergeBranchDialog >> beSwitchAndMerge [ IceTipMergeBranchDialog >> createMergeBranchTypes [ | allTypes | - "Collect types local+remotes" - allTypes := { - (IceTipMergeBranchPanel on: self model) - titleForWindow: 'Local'; - withoutHead; - icon: (self iconNamed: #branch); - yourself }, - (self model remoteModels collect: [ :each | - (IceTipMergeBranchPanel on: each) - titleForWindow: each name; - icon: (self iconNamed: #remote); - yourself ]). - + "Collect types local+remotes" + allTypes := { ((IceTipMergeBranchPanel on: self model) + titleForWindow: 'Local'; + icon: (self iconNamed: #branch); + yourself) } + , (self model remoteModels collect: [ :each | + (IceTipMergeBranchPanel on: each) + titleForWindow: each name; + icon: (self iconNamed: #remote); + yourself ]). + "Doing this because I can trigger the accept inside the panels." allTypes do: [ :each | each onAccept: [ self closeWindow ] ]. - + ^ allTypes ]