summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalgorzata Janczarska <malgorzata.tomczyk@pl.ibm.com>2013-10-17 18:52:54 +0200
committerMalgorzata Janczarska <malgorzata.tomczyk@pl.ibm.com>2013-10-17 18:52:54 +0200
commit03f128d957731728462470428a4a958b0997434b (patch)
tree5d8951ea57035d1eef54b792be54335950783ba5
parent637018b96fd26d84cfe8ce433d56da9715cca737 (diff)
downloadorg.eclipse.orion.client-origin/Bug419516.zip
org.eclipse.orion.client-origin/Bug419516.tar.gz
org.eclipse.orion.client-origin/Bug419516.tar.bz2
Bug 419516 - deleting git repo gives "Nothing found for given ID..." errororigin/Bug419516
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js2
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js18
2 files changed, 14 insertions, 6 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 6340536..ff52dda 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
@@ -2488,7 +2488,7 @@ var exports = {};
progress.progress(gitService.removeGitRepository(item.Location), "Removing repository " + item.Name).then(
function(jsonData){
if(explorer.changedItem){
- explorer.changedItem();
+ explorer.changedItem({Location: ""});
}
},
displayErrorOnStatus);
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js
index 6ea2f98..be2c649 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js
@@ -10,9 +10,9 @@
******************************************************************************/
/*global define document Image window*/
define(['i18n!git/nls/gitmessages', 'require', 'orion/commandRegistry', 'orion/section', 'orion/i18nUtil', 'orion/webui/littlelib', 'orion/PageUtil', 'orion/dynamicContent', 'orion/fileUtils',
- 'orion/globalCommands', 'orion/git/gitCommands', 'orion/Deferred', 'orion/git/widgets/CommitTooltipDialog'],
+ 'orion/globalCommands', 'orion/git/gitCommands', 'orion/Deferred', 'orion/git/widgets/CommitTooltipDialog', 'orion/URITemplate'],
function(messages, require, mCommands, mSection, i18nUtil, lib, PageUtil, mDynamicContent, mFileUtils, mGlobalCommands, mGitCommands, Deferred,
- mCommitTooltip) {
+ mCommitTooltip, URITemplate) {
var exports = {};
exports.GitRepositoryExplorer = (function() {
@@ -63,17 +63,25 @@ exports.GitRepositoryExplorer = (function() {
};
GitRepositoryExplorer.prototype.changedItem = function(parent, children) {
- // An item changed so we do not need to process any URLs
- this.redisplay(false);
+ if(parent){
+ this.redisplay(true, parent.Location);
+ } else {
+ // An item changed so we do not need to process any URLs
+ this.redisplay(false);
+ }
};
- GitRepositoryExplorer.prototype.redisplay = function(processURLs){
+ GitRepositoryExplorer.prototype.redisplay = function(processURLs, newUrl){
// make sure to have this flag
if(processURLs === undefined){
processURLs = true;
}
var pageParams = PageUtil.matchResourceParameters();
+ if(newUrl !== undefined && pageParams.resource != newUrl){
+ window.location = new URITemplate(require.toUrl("git/git-repository.html") + "#" + newUrl).expand({});
+ return;
+ }
if (pageParams.resource) {
this.displayRepository(pageParams.resource);
} else {