Merge "Set uploader to current user in "patchset-created" event upon cherry-picking" into stable-2.8
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/Header.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/Header.java
index f921fe4..477f018 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/Header.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/Header.java
@@ -178,11 +178,13 @@
return p.toString();
}
- private void setupNav(InlineHyperlink link, int key, String help, FileInfo info) {
+ private void setupNav(InlineHyperlink link, char key, String help, FileInfo info) {
if (info != null) {
final String url = url(info);
link.setTargetHistoryToken(url);
- link.setTitle(FileInfo.getFileName(info.path()));
+ link.setTitle(PatchUtil.M.fileNameWithShortcutKey(
+ FileInfo.getFileName(info.path()),
+ Character.toString(key)));
keys.add(new KeyCommand(0, key, help) {
@Override
public void onKeyPress(KeyPressEvent event) {
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchMessages.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchMessages.java
index 4046fec..822eff7 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchMessages.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchMessages.java
@@ -23,4 +23,5 @@
String expandAfter(int cnt);
String draftSaved(Date when);
String patchSkipRegion(String lineNumber);
+ String fileNameWithShortcutKey(String file, String key);
}
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchMessages.properties b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchMessages.properties
index 076ab5f..fbb7d08 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchMessages.properties
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchMessages.properties
@@ -2,3 +2,4 @@
expandAfter = +{0}⇩
draftSaved = Draft saved at {0,time,short}
patchSkipRegion = ... skipped {0} common lines ...
+fileNameWithShortcutKey = {0} (Shortcut: {1})
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/EmailReviewComments.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/EmailReviewComments.java
index eea2f48..e37eede 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/change/EmailReviewComments.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/EmailReviewComments.java
@@ -43,7 +43,7 @@
import java.util.Comparator;
import java.util.List;
-class EmailReviewComments implements Runnable, RequestContext {
+public class EmailReviewComments implements Runnable, RequestContext {
private static final Logger log = LoggerFactory.getLogger(EmailReviewComments.class);
interface Factory {
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReviewers.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReviewers.java
index 13deeb0..faec4f7 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReviewers.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReviewers.java
@@ -77,7 +77,7 @@
public static class Input {
@DefaultInput
public String reviewer;
- Boolean confirmed;
+ public Boolean confirmed;
boolean confirmed() {
return Objects.firstNonNull(confirmed, false);
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/EmailReviewCommentsExecutor.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/EmailReviewCommentsExecutor.java
index 1581ec48..9ad0dfc 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/git/EmailReviewCommentsExecutor.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/EmailReviewCommentsExecutor.java
@@ -16,6 +16,7 @@
import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import com.google.gerrit.server.change.EmailReviewComments;
import com.google.inject.BindingAnnotation;
import java.lang.annotation.Retention;
diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/SetReviewersCommand.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/SetReviewersCommand.java
index 6dc79ff..c1facef 100644
--- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/SetReviewersCommand.java
+++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/SetReviewersCommand.java
@@ -139,6 +139,7 @@
for (String reviewer : toAdd) {
PostReviewers.Input input = new PostReviewers.Input();
input.reviewer = reviewer;
+ input.confirmed = true;
String error;
try {
error = post.apply(changeRsrc, input).error;