Merge branch 'stable-2.6'

* stable-2.6:
  Fix ls-user-refs command name in documentation
  Mark project and user options as required for LsUserRefs
  Fix setting account's full name via ssh
  TrivialRebase: tidy up docstrings to follow PEP-0257

Change-Id: Ibd4563a8418e823d700082bc4fbcf465085d4719
This commit is contained in:
David Pursehouse
2013-05-02 10:28:50 +09:00
4 changed files with 21 additions and 19 deletions

View File

@@ -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);

View File

@@ -147,6 +147,7 @@ final class SetAccountCommand extends BaseCommand {
if (fullName != null) {
if (realm.allowsEdit(FieldName.FULL_NAME)) {
account.setFullName(fullName);
accountUpdated = true;
} else {
throw new UnloggedFailure(1, "The realm doesn't allow editing names");
}