Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.RevertCommand


            "An error occured when reverting.", null));

      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


        pm.beginTask("", 2); //$NON-NLS-1$

        pm.subTask(MessageFormat.format(
            CoreText.RevertCommitOperation_reverting,
            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());
        }
        pm.worked(1);
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.api.RevertCommand

Copyright © 2018 www.massapicom. 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.