Examples of call()


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

      mergeCmd.include(srcRef);
    else
      mergeCmd.include(src);
    MergeResult result;
    try {
      result = mergeCmd.call();
    } catch (CheckoutConflictException e) {
      result = new MergeResult(e.getConflictingPaths()); // CHECKOUT_CONFLICT
    }

    switch (result.getMergeStatus()) {
View Full Code Here

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

      PullCommand pull = git.pull();
      if (timeout >= 0)
         pull.setTimeout(timeout);
      pull.setProgressMonitor(new TextProgressMonitor());

      PullResult result = pull.call();
      return result;
   }

   public static List<Ref> getRemoteBranches(final Git repo) throws GitAPIException
   {
View Full Code Here

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

    if (tags)
      push.setPushTags();
    push.setRemote(remote);
    push.setThin(thin);
    push.setTimeout(timeout);
    Iterable<PushResult> results = push.call();
    for (PushResult result : results) {
      ObjectReader reader = db.newObjectReader();
      try {
        printPushResult(reader, result.getURI(), result);
      } finally {
View Full Code Here

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

      } else if (operation.equals(Operation.BEGIN)) {
        return statusHandler.handleRequest(request, response, new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_BAD_REQUEST,
            "Missing commit refId.", null));
      }
      rebase.setOperation(operation);
      RebaseResult rebaseResult = rebase.call();
      result.put(GitConstants.KEY_RESULT, rebaseResult.getStatus().name());
    } catch (UnmergedPathsException e) {
      // this error should be handled by client, so return a proper status
      result.put(GitConstants.KEY_RESULT, AdditionalRebaseStatus.FAILED_UNMERGED_PATHS.name());
    } catch (WrongRepositoryStateException e) {
View Full Code Here

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

  @Override
  protected void run() throws Exception {
    ReflogCommand cmd = new Git(db).reflog();
    if (ref != null)
      cmd.setRef(ref);
    Collection<ReflogEntry> entries = cmd.call();
    int i = 0;
    for (ReflogEntry entry : entries) {
      outw.println(toString(entry, i++));
    }
  }
View Full Code Here

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

    if (hard)
      mode = selectMode(mode, ResetType.HARD);
    if (mode == null)
      throw die("no reset mode set");
    command.setMode(mode);
    command.call();
  }

  private static ResetType selectMode(ResetType mode, ResetType want) {
    if (mode != null)
      throw die("reset modes are mutually exclusive, select one");
View Full Code Here

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

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

  @Override
  protected void run() throws Exception {
    RmCommand command = new Git(db).rm();
    for (String p : paths)
      command.addFilepattern(p);
    command.call();
  }

}
View Full Code Here

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

        stashCreate.setIndexMessage(indexMessage);

      if (!workingDirectoryMessage.isEmpty())
        stashCreate.setWorkingDirectoryMessage(workingDirectoryMessage);

      stashCreate.call();
      return true;

    } catch (Exception ex) {
      String msg = "An error occured for stash command.";
      return statusHandler.handleRequest(request, response, new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, msg, ex));
View Full Code Here

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

        applyCommand.setApplyIndex(applyIndex);
        applyCommand.call();

        StashDropCommand dropCommand = git.stashDrop();
        dropCommand.setAll(false);
        dropCommand.call();

      }

      return true;
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.