Merge branch 'stable-2.8'

* stable-2.8:
  Update 2.8.2 release notes
  Make the message of 'Cherry Picked' informative
  Show error message when the commentlink is configured wrongly

Conflicts:
	gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java

Change-Id: I82a7ac51f31fec83166ecad26e65d66623d2cda4
This commit is contained in:
David Pursehouse
2014-03-10 15:57:05 +09:00
3 changed files with 56 additions and 11 deletions

View File

@@ -14,6 +14,7 @@
package com.google.gerrit.client.projects;
import com.google.gerrit.client.ErrorDialog;
import com.google.gerrit.client.actions.ActionInfo;
import com.google.gerrit.client.rpc.NativeMap;
import com.google.gerrit.reviewdb.client.Project;
@@ -87,7 +88,16 @@ public class ConfigInfo extends JavaScriptObject {
if (cl.link() != null) {
commentLinks.add(new LinkFindReplace(cl.match(), cl.link()));
} else {
commentLinks.add(new RawFindReplace(cl.match(), cl.html()));
try {
FindReplace fr = new RawFindReplace(cl.match(), cl.html());
commentLinks.add(fr);
} catch (RuntimeException e) {
int index = e.getMessage().indexOf("at Object");
new ErrorDialog("Invalid commentlink configuration: "
+ (index == -1
? e.getMessage()
: e.getMessage().substring(0, index))).center();
}
}
}
return commentLinks;