Package org.eclipse.egit.core.op

Examples of org.eclipse.egit.core.op.RebaseOperation


  @Override
  protected RebaseOperation createRebaseOperation(Repository repository)
      throws ExecutionException {
    InteractiveHandler handler = interactive ? RebaseInteractiveHandler.INSTANCE
        : null;
    RebaseOperation operation = new RebaseOperation(repository, ref,
        handler);
    operation.setPreserveMerges(preserveMerges);
    return operation;
  }
View Full Code Here


  }

  @Override
  protected RebaseOperation createRebaseOperation(Repository repository)
      throws ExecutionException {
    return new RebaseOperation(repository, Operation.ABORT);
  }
View Full Code Here

   *
   * @param repository
   * @throws ExecutionException
   */
  public void execute(Repository repository) throws ExecutionException {
    final RebaseOperation rebase = createRebaseOperation(repository);
    execute(rebase);
  }
View Full Code Here

  private void handleBeginError(final Repository repository, IStatus result) {
    if (!repository.getRepositoryState().equals(RepositoryState.SAFE)) {
      Throwable t = result.getException();
      try {
        new RebaseOperation(repository, Operation.ABORT).execute(null);
        Activator.showError(t.getMessage(), t);
      } catch (CoreException e1) {
        IStatus childStatus = Activator.createErrorStatus(
            e1.getMessage(), e1);
        IStatus mStatus = new MultiStatus(Activator.getPluginId(),
View Full Code Here

        UIText.SkipRebaseCommand_CancelDialogMessage);
  }

  @Override
  public RebaseOperation createRebaseOperation(Repository repository) {
    return new RebaseOperation(repository, Operation.SKIP,
        RebaseInteractiveHandler.INSTANCE);
  }
View Full Code Here

  }

  @Override
  protected RebaseOperation createRebaseOperation(Repository repository)
      throws ExecutionException {
    return new RebaseOperation(repository, Operation.CONTINUE,
        RebaseInteractiveHandler.INSTANCE);
  }
View Full Code Here

  }

  @Override
  protected RebaseOperation createRebaseOperation(Repository repository)
      throws ExecutionException {
    return new RebaseOperation(repository, Operation.PROCESS_STEPS,
        RebaseInteractiveHandler.INSTANCE);
  }
View Full Code Here

    // parent of topic commit should be first master commit before rebase
    assertEquals(first, topicCommit.getParent(0));

    // rebase topic onto master
    RebaseOperation op = new RebaseOperation(
        testRepository.getRepository(), testRepository.getRepository()
            .getRef(MASTER));
    op.execute(null);

    RebaseResult res = op.getResult();
    assertEquals(RebaseResult.Status.UP_TO_DATE, res.getStatus());

    RevCommit newTopic = new RevWalk(repository).parseCommit(repository
        .resolve(TOPIC));
    assertEquals(topicCommit, newTopic);
View Full Code Here

    // parent of topic commit should be first master commit before rebase
    assertEquals(first, topicCommit.getParent(0));

    // rebase topic onto master
    RebaseOperation op = new RebaseOperation(
        testRepository.getRepository(), testRepository.getRepository()
            .getRef(MASTER));
    op.execute(null);

    RebaseResult res = op.getResult();
    assertEquals(RebaseResult.Status.OK, res.getStatus());

    RevCommit newTopic = new RevWalk(repository).parseCommit(repository
        .resolve(TOPIC));
    assertEquals(second, newTopic.getParent(0));
View Full Code Here

    // parent of topic commit should be first master commit before rebase
    assertEquals(first, topicCommit.getParent(0));

    // rebase topic onto master
    RebaseOperation op = new RebaseOperation(
        testRepository.getRepository(), testRepository.getRepository()
            .getRef(MASTER));
    op.execute(null);

    RebaseResult res = op.getResult();
    assertEquals(RebaseResult.Status.STOPPED, res.getStatus());

    // let's try to abort this here
    RebaseOperation abort = new RebaseOperation(repository, Operation.ABORT);
    abort.execute(null);
    RebaseResult abortResult = abort.getResult();
    assertEquals(Status.ABORTED, abortResult.getStatus());

    assertEquals(topicCommit, repository.resolve(Constants.HEAD));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.egit.core.op.RebaseOperation

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.