aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Janik2011-07-29 10:21:23 (EDT)
committerTomasz Zarna2011-07-29 10:21:23 (EDT)
commitff8867ca40bc0b21e482681c16ccf80cca47873d (patch)
treedca6b349d673372c06c24d99f2050b9ee2b4ae6d
parent1c58a98757a41ef48dd7ce091a3bf2cc7c9ff885 (diff)
downloadorg.eclipse.orion.client-ff8867ca40bc0b21e482681c16ccf80cca47873d.zip
org.eclipse.orion.client-ff8867ca40bc0b21e482681c16ccf80cca47873d.tar.gz
org.eclipse.orion.client-ff8867ca40bc0b21e482681c16ccf80cca47873d.tar.bz2
bug 346285 - [server][tag] Tagging with a tag name that already existv20110729-2200
should not throw 500 error https://bugs.eclipse.org/bugs/show_bug.cgi?id=346285
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js12
1 files changed, 11 insertions, 1 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 79d52ec..cff9c0b 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
@@ -975,11 +975,21 @@ var exports = {};
}
serviceRegistry.getService("orion.git.provider").then(
function(service) {
- service.doAddTag(item.Location, tagName,
+ service.doAddTag(item.Location, tagName).then(
function(jsonData, secondArg) {
var trId = jsonData.Location.replace(/[^\.\:\-\_0-9A-Za-z]/g, "");
var tr = dojo.byId(trId);
dojo.place(document.createTextNode(tagName), dojo.create("p", {style: "margin: 5px"}, tr.children[6] /* tags column */, "last"), "only");
+ },
+ function (error){
+ serviceRegistry.getService("orion.page.message").then(function(progressService){
+ var display = [];
+ display.Severity = "Error";
+ display.HTML = false;
+ var resp = JSON.parse(error.responseText);
+ display.Message = resp.DetailedMessage ? resp.DetailedMessage : resp.Message;
+ progressService.setProgressResult(display);
+ });
});
});
return clientDeferred;