Merge branch 'stable-3.0'
* stable-3.0:
ExportReviewNotes: Use @CommandMetaData to define command name and description
Change-Id: Icddffc96b2b7bed8011b5592a308083363481349
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java
index 447cb77..b6455bb 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java
@@ -26,6 +26,7 @@
import com.google.gerrit.server.notedb.ChangeNotes;
import com.google.gerrit.server.update.RetryHelper;
import com.google.gerrit.server.update.UpdateException;
+import com.google.gerrit.sshd.CommandMetaData;
import com.google.gerrit.sshd.SshCommand;
import com.google.inject.Inject;
import java.io.IOException;
@@ -38,6 +39,9 @@
import org.kohsuke.args4j.Option;
/** Export review notes for all submitted changes in all projects. */
+@CommandMetaData(
+ name = "export",
+ description = "Export review notes for all submitted changes in all projects")
public class ExportReviewNotes extends SshCommand {
@Option(name = "--threads", usage = "Number of concurrent threads to run")
private int threads = 2;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/SshModule.java b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/SshModule.java
index 62457b0..3e69940 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/SshModule.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/SshModule.java
@@ -19,6 +19,6 @@
class SshModule extends PluginCommandModule {
@Override
protected void configureCommands() {
- command("export").to(ExportReviewNotes.class);
+ command(ExportReviewNotes.class);
}
}