summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2013-02-28 22:16:46 +0100
committerDavid Ostrovsky <david@ostrovsky.org>2013-03-01 08:13:19 +0100
commitf4c61dd01e37f88d9174dd0a9cad2d8d3043b86a (patch)
tree0ec336aa2bc281fe51ad7f96c8f2e3c6ad10ac3e
parent20c6fc7eada3a1f0e099c8e2e1da5407a892b685 (diff)
Add description to start ssh command
-rw-r--r--src/main/java/com/googlesource/gerrit/plugins/replication/SshModule.java2
-rw-r--r--src/main/java/com/googlesource/gerrit/plugins/replication/StartCommand.java3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/SshModule.java b/src/main/java/com/googlesource/gerrit/plugins/replication/SshModule.java
index 89486d3..dd33049 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/SshModule.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/SshModule.java
@@ -19,6 +19,6 @@ import com.google.gerrit.sshd.PluginCommandModule;
class SshModule extends PluginCommandModule {
@Override
protected void configureCommands() {
- command("start").to(StartCommand.class);
+ command(StartCommand.class);
}
}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/StartCommand.java b/src/main/java/com/googlesource/gerrit/plugins/replication/StartCommand.java
index 24c047d..5bcb7cb 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/StartCommand.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/StartCommand.java
@@ -18,6 +18,7 @@ import com.google.gerrit.common.data.GlobalCapability;
import com.google.gerrit.extensions.annotations.RequiresCapability;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gerrit.server.project.ProjectCache;
+import com.google.gerrit.sshd.CommandMetaData;
import com.google.gerrit.sshd.SshCommand;
import com.google.inject.Inject;
@@ -28,8 +29,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
-/** Force a project to replicate, again. */
@RequiresCapability(GlobalCapability.START_REPLICATION)
+@CommandMetaData(name="start", descr="Start replication for specific project or all projects")
final class StartCommand extends SshCommand {
@Option(name = "--all", usage = "push all known projects")
private boolean all;