Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.Git.revert()


            "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$
View Full Code Here


            return;
        }

        try {
            final Git git = new Git(repository);
            git.revert().include(commit).call();
            // Commit changes
            commitAllChanges(message);
            LOGGER.info("Revert of commit " + revstr + " successful.");
        }
        catch (final Exception e) {
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.