Merge "Mark project and user options as required for LsUserRefs" into stable-2.6
This commit is contained in:
@@ -31,11 +31,11 @@ OPTIONS
|
||||
-------
|
||||
--project::
|
||||
-p::
|
||||
Name of the project for which the refs should be listed.
|
||||
Required; Name of the project for which the refs should be listed.
|
||||
|
||||
--user::
|
||||
-u::
|
||||
User for which the visible refs should be listed. Gerrit
|
||||
Required; User for which the visible refs should be listed. Gerrit
|
||||
will query the database to find matching users, so the
|
||||
full identity/name does not need to be specified.
|
||||
|
||||
|
||||
@@ -58,11 +58,11 @@ public class LsUserRefs extends SshCommand {
|
||||
private ChangeCache changeCache;
|
||||
|
||||
@Option(name = "--project", aliases = {"-p"}, metaVar = "PROJECT",
|
||||
usage = "project for which the refs should be listed")
|
||||
required = true, usage = "project for which the refs should be listed")
|
||||
private ProjectControl projectControl;
|
||||
|
||||
@Option(name = "--user", aliases = {"-u"}, metaVar = "USER",
|
||||
usage = "user for which the groups should be listed")
|
||||
required = true, usage = "user for which the groups should be listed")
|
||||
private String userName;
|
||||
|
||||
@Option(name = "--only-refs-heads", usage = "list only refs under refs/heads")
|
||||
@@ -73,10 +73,6 @@ public class LsUserRefs extends SshCommand {
|
||||
|
||||
@Override
|
||||
protected void run() throws Failure {
|
||||
if (userName == null || projectControl == null) {
|
||||
throw new UnloggedFailure(1, "fatal: --user and --project options must be used.");
|
||||
}
|
||||
|
||||
Account userAccount = null;
|
||||
try {
|
||||
userAccount = accountResolver.find(userName);
|
||||
|
||||
Reference in New Issue
Block a user