aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdyta Przymus2012-08-28 07:32:47 (EDT)
committerSzymon Brandys2012-08-28 09:18:41 (EDT)
commit7b384d7c42b17b4ad5c45bdbb13256db19eaa182 (patch)
tree9aa6f87048759aec139b212bd4afe5a469a215a6
parent1040ddb17d1856ca9b93a94b2e616e56895b29bd (diff)
downloadorg.eclipse.orion.client-7b384d7c42b17b4ad5c45bdbb13256db19eaa182.zip
org.eclipse.orion.client-7b384d7c42b17b4ad5c45bdbb13256db19eaa182.tar.gz
org.eclipse.orion.client-7b384d7c42b17b4ad5c45bdbb13256db19eaa182.tar.bz2
Bug 388189 - [Review request] use dojo Url object instead of parsing url by hand in checkSsh functionv20120828-1318
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js4
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/gitReviewRequestExplorer.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
index 62b6882..f23c666 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
@@ -1700,8 +1700,8 @@ var exports = {};
callback: function(data) {
var sshCheck = function(gitUrl){
var url = gitUrl;
- var isSsh = gitUrl.split(":")[0];
- if(isSsh === "ssh"){
+ var scheme = new dojo._Url(url).scheme;
+ if(scheme === "ssh"){
var indexOfAt = url.indexOf("@");
if(indexOfAt !== -1){
var urlNoUser = "ssh://" + url.substr(indexOfAt + 1);
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitReviewRequestExplorer.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitReviewRequestExplorer.js
index 92e9fa1..62216e5 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitReviewRequestExplorer.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitReviewRequestExplorer.js
@@ -294,8 +294,8 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo','dijit', 'orion/section',
GitReviewRequestExplorer.prototype.sshCheck = function(remote){
var url = remote;
- var isSsh = remote.split(":")[0];
- if(isSsh === "ssh"){
+ var scheme = new dojo._Url(url).scheme;
+ if(scheme === "ssh"){
var indexOfAt = url.indexOf("@");
if(indexOfAt !== -1){
var urlNoUser = "ssh://" + url.substr(indexOfAt + 1);