Examples of BanCommitResult


Examples of com.google.gerrit.server.git.BanCommitResult

  private BanCommit.Factory banCommitFactory;

  @Override
  protected void run() throws Failure {
    try {
      final BanCommitResult result =
          banCommitFactory.create().ban(projectControl, commitsToBan, reason);

      final List<ObjectId> newlyBannedCommits =
          result.getNewlyBannedCommits();
      if (!newlyBannedCommits.isEmpty()) {
        stdout.print("The following commits were banned:\n");
        printCommits(stdout, newlyBannedCommits);
      }

      final List<ObjectId> alreadyBannedCommits =
          result.getAlreadyBannedCommits();
      if (!alreadyBannedCommits.isEmpty()) {
        stdout.print("The following commits were already banned:\n");
        printCommits(stdout, alreadyBannedCommits);
      }

      final List<ObjectId> ignoredIds = result.getIgnoredObjectIds();
      if (!ignoredIds.isEmpty()) {
        stdout.print("The following ids do not represent commits"
            + " and were ignored:\n");
        printCommits(stdout, ignoredIds);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.