From 7927248233f6d40e925b4a9f7b4f13358e5a4920 Mon Sep 17 00:00:00 2001 From: Guille Polito Date: Fri, 10 Aug 2018 13:58:59 +0200 Subject: [PATCH 1/2] Fix #964 - more explicit title and progress bar for importing local repositories --- .../IceTipLocalRepositoryPanel.class/class/title.st | 2 +- .../IceTipLocalRepositoryPanel.class/instance/newRepository.st | 2 +- Iceberg-TipUI.package/monticello.meta/categories.st | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Iceberg-TipUI.package/IceTipLocalRepositoryPanel.class/class/title.st b/Iceberg-TipUI.package/IceTipLocalRepositoryPanel.class/class/title.st index adc84a2126..e60154157b 100644 --- a/Iceberg-TipUI.package/IceTipLocalRepositoryPanel.class/class/title.st +++ b/Iceberg-TipUI.package/IceTipLocalRepositoryPanel.class/class/title.st @@ -1,3 +1,3 @@ specs title - ^ 'Add local repository' \ No newline at end of file + ^ 'Import from existing clone' \ No newline at end of file diff --git a/Iceberg-TipUI.package/IceTipLocalRepositoryPanel.class/instance/newRepository.st b/Iceberg-TipUI.package/IceTipLocalRepositoryPanel.class/instance/newRepository.st index 4f36f0d728..04cb413bbb 100644 --- a/Iceberg-TipUI.package/IceTipLocalRepositoryPanel.class/instance/newRepository.st +++ b/Iceberg-TipUI.package/IceTipLocalRepositoryPanel.class/instance/newRepository.st @@ -1,7 +1,7 @@ accessing newRepository UIManager default - informUser: ('Adding repository {1}' format: { self location fullName }) + informUser: ('Importing repository from {1}' format: { self location fullName }) during: [ ^ IceRepositoryCreator new repository: repository; diff --git a/Iceberg-TipUI.package/monticello.meta/categories.st b/Iceberg-TipUI.package/monticello.meta/categories.st index 0fe15440a1..b9187bd9e3 100644 --- a/Iceberg-TipUI.package/monticello.meta/categories.st +++ b/Iceberg-TipUI.package/monticello.meta/categories.st @@ -13,4 +13,3 @@ SystemOrganization addCategory: #'Iceberg-TipUI-View-Branch'! SystemOrganization addCategory: #'Iceberg-TipUI-View-DataSource'! SystemOrganization addCategory: #'Iceberg-TipUI-View-RepositoryType'! SystemOrganization addCategory: #'Iceberg-TipUI-View-Versions'! -ystemOrganization addCategory: #'Iceberg-TipUI-View-Versions'! From 2d16997177f4e52638bb1a7320b1406ea4ee42ee Mon Sep 17 00:00:00 2001 From: Guille Polito Date: Fri, 10 Aug 2018 15:02:49 +0200 Subject: [PATCH 2/2] Fix #961 - configure remotes with the same protocol than the clone - remove useless retry --- .../class/githubRequestUrlKey.st | 4 ++++ .../IceHttpsProtocol.extension/properties.json | 3 +++ .../class/githubRequestUrlKey.st | 4 ++++ .../IceSSHProtocol.extension/properties.json | 3 +++ .../instance/getGitHubRepository.st | 13 +++++-------- .../instance/newRepository.st | 2 +- .../class/githubRequestUrlKey.st | 4 ++++ .../IceUrlProtocol.extension/properties.json | 3 +++ 8 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 Iceberg-Plugin-GitHub.package/IceHttpsProtocol.extension/class/githubRequestUrlKey.st create mode 100644 Iceberg-Plugin-GitHub.package/IceHttpsProtocol.extension/properties.json create mode 100644 Iceberg-Plugin-GitHub.package/IceSSHProtocol.extension/class/githubRequestUrlKey.st create mode 100644 Iceberg-Plugin-GitHub.package/IceSSHProtocol.extension/properties.json create mode 100644 Iceberg-Plugin-GitHub.package/IceUrlProtocol.extension/class/githubRequestUrlKey.st create mode 100644 Iceberg-Plugin-GitHub.package/IceUrlProtocol.extension/properties.json diff --git a/Iceberg-Plugin-GitHub.package/IceHttpsProtocol.extension/class/githubRequestUrlKey.st b/Iceberg-Plugin-GitHub.package/IceHttpsProtocol.extension/class/githubRequestUrlKey.st new file mode 100644 index 0000000000..891e43ec96 --- /dev/null +++ b/Iceberg-Plugin-GitHub.package/IceHttpsProtocol.extension/class/githubRequestUrlKey.st @@ -0,0 +1,4 @@ +*Iceberg-Plugin-GitHub +githubRequestUrlKey + + ^ #'clone_url' \ No newline at end of file diff --git a/Iceberg-Plugin-GitHub.package/IceHttpsProtocol.extension/properties.json b/Iceberg-Plugin-GitHub.package/IceHttpsProtocol.extension/properties.json new file mode 100644 index 0000000000..7276e0977e --- /dev/null +++ b/Iceberg-Plugin-GitHub.package/IceHttpsProtocol.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "IceHttpsProtocol" +} \ No newline at end of file diff --git a/Iceberg-Plugin-GitHub.package/IceSSHProtocol.extension/class/githubRequestUrlKey.st b/Iceberg-Plugin-GitHub.package/IceSSHProtocol.extension/class/githubRequestUrlKey.st new file mode 100644 index 0000000000..665bbc277c --- /dev/null +++ b/Iceberg-Plugin-GitHub.package/IceSSHProtocol.extension/class/githubRequestUrlKey.st @@ -0,0 +1,4 @@ +*Iceberg-Plugin-GitHub +githubRequestUrlKey + + ^ #'ssh_url' \ No newline at end of file diff --git a/Iceberg-Plugin-GitHub.package/IceSSHProtocol.extension/properties.json b/Iceberg-Plugin-GitHub.package/IceSSHProtocol.extension/properties.json new file mode 100644 index 0000000000..77ea33e850 --- /dev/null +++ b/Iceberg-Plugin-GitHub.package/IceSSHProtocol.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "IceSSHProtocol" +} \ No newline at end of file diff --git a/Iceberg-Plugin-GitHub.package/IceTipGitHubRepositoryPanel.class/instance/getGitHubRepository.st b/Iceberg-Plugin-GitHub.package/IceTipGitHubRepositoryPanel.class/instance/getGitHubRepository.st index 1a7c744586..d19d3524b9 100644 --- a/Iceberg-Plugin-GitHub.package/IceTipGitHubRepositoryPanel.class/instance/getGitHubRepository.st +++ b/Iceberg-Plugin-GitHub.package/IceTipGitHubRepositoryPanel.class/instance/getGitHubRepository.st @@ -1,10 +1,7 @@ querying-github getGitHubRepository - "It will retry 3 times" - 1 to: 3 do: [ :attempt | - [ [ ^ IceGitHubAPI new - beAnonymous; - getRepository: self userName project: self projectName ] - on: IceAuthenticationError do: [ "I will retry." ] ] - on: LGitNoCredentialsProvided do: [ ^ nil ] ]. - ^ nil \ No newline at end of file + [ ^ IceGitHubAPI new + beAnonymous; + getRepository: self userName project: self projectName ] + on: LGitNoCredentialsProvided + do: [ ^ nil ] \ No newline at end of file diff --git a/Iceberg-Plugin-GitHub.package/IceTipGitHubRepositoryPanel.class/instance/newRepository.st b/Iceberg-Plugin-GitHub.package/IceTipGitHubRepositoryPanel.class/instance/newRepository.st index 2dc3fa49f1..c21e642306 100644 --- a/Iceberg-Plugin-GitHub.package/IceTipGitHubRepositoryPanel.class/instance/newRepository.st +++ b/Iceberg-Plugin-GitHub.package/IceTipGitHubRepositoryPanel.class/instance/newRepository.st @@ -11,7 +11,7 @@ newRepository (githubRepository at: #fork) ifTrue: [ | parent remote | parent := githubRepository at: #parent. - remote := IceGitRemote name: ((parent at: #owner) at: #login) url: (parent at: #'ssh_url'). + remote := IceGitRemote name: ((parent at: #owner) at: #login) url: (parent at: self selectedProtocol githubRequestUrlKey). newRepository addRemote: remote. remote fetch. ] ]. ^ newRepository \ No newline at end of file diff --git a/Iceberg-Plugin-GitHub.package/IceUrlProtocol.extension/class/githubRequestUrlKey.st b/Iceberg-Plugin-GitHub.package/IceUrlProtocol.extension/class/githubRequestUrlKey.st new file mode 100644 index 0000000000..ce82e97741 --- /dev/null +++ b/Iceberg-Plugin-GitHub.package/IceUrlProtocol.extension/class/githubRequestUrlKey.st @@ -0,0 +1,4 @@ +*Iceberg-Plugin-GitHub +githubRequestUrlKey + "Return the key used in github REST responses to get the URL with the correct protocol" + self subclassResponsibility \ No newline at end of file diff --git a/Iceberg-Plugin-GitHub.package/IceUrlProtocol.extension/properties.json b/Iceberg-Plugin-GitHub.package/IceUrlProtocol.extension/properties.json new file mode 100644 index 0000000000..89300bb2f3 --- /dev/null +++ b/Iceberg-Plugin-GitHub.package/IceUrlProtocol.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "IceUrlProtocol" +} \ No newline at end of file