Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.RevertCommand.call()


      ObjectId objectId = db.resolve(commitToRevert);
      Git git = new Git(db);

      RevertCommand revertCommand = git.revert().include(objectId);
      RevCommit revertedCommit = revertCommand.call();

      if (revertedCommit == null) {
        JSONObject result = new JSONObject();
        result.put(GitConstants.KEY_RESULT, "FAILURE"); //$NON-NLS-1$
        OrionServlet.writeJSONResponse(request, response, result, JsonURIUnqualificationStrategy.ALL_NO_GIT);
View Full Code Here


            Integer.valueOf(commits.size())));
        RevertCommand command = new Git(repo).revert();
        for (RevCommit commit : commits)
          command.include(commit);
        try {
          newHead = command.call();
          reverted = command.getRevertedRefs();
          result = command.getFailingResult();
        } catch (GitAPIException e) {
          throw new TeamException(e.getLocalizedMessage(),
              e.getCause());
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.