ExportReviewNotes: Use @CommandMetaData to define command name and description
Change-Id: Ie91feb240fd14cc27f8a82d6a52ce35391bb33c0
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 4144381..b714a73 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java
@@ -28,6 +28,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.gwtorm.server.OrmException;
import com.google.gwtorm.server.SchemaFactory;
@@ -42,6 +43,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);
}
}