Wed, 06 Feb 2019 19:21:41 +0100
Git Interface: changed code to cope with 'scp like' repository URLs.
--- a/Plugins/VcsPlugins/vcsGit/GitNewProjectOptionsDialog.py Wed Feb 06 19:14:50 2019 +0100 +++ b/Plugins/VcsPlugins/vcsGit/GitNewProjectOptionsDialog.py Wed Feb 06 19:21:41 2019 +0100 @@ -117,8 +117,17 @@ @param txt current text of the combo box @type str """ - url = QUrl.fromUserInput(txt) - enable = url.isValid() and url.scheme() in ConfigGitSchemes + enable = False + + if txt: + url = QUrl.fromUserInput(txt) + if url.isValid(): + if url.scheme() in ConfigGitSchemes: + enable = True + elif ':' in txt: + # assume scp like repository URL + enable = True + self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) self.vcsUrlButton.setEnabled(url.scheme() == "file" or len(txt) == 0)
--- a/Plugins/VcsPlugins/vcsGit/GitSubmoduleAddDialog.py Wed Feb 06 19:14:50 2019 +0100 +++ b/Plugins/VcsPlugins/vcsGit/GitSubmoduleAddDialog.py Wed Feb 06 19:21:41 2019 +0100 @@ -77,8 +77,17 @@ @param txt current text of the combo box @type str """ - url = QUrl.fromUserInput(txt) - enable = url.isValid() and url.scheme() in ConfigGitSchemes + enable = False + + if txt: + url = QUrl.fromUserInput(txt) + if url.isValid(): + if url.scheme() in ConfigGitSchemes: + enable = True + elif ':' in txt: + # assume scp like repository URL + enable = True + self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) self.submoduleUrlButton.setEnabled(url.scheme() == "file" or