Package org.eclipse.egit.core.op

Examples of org.eclipse.egit.core.op.MergeOperation.execute()


      op.setCommit(mergeTargetSelectionDialog.isCommit());
      Job job = new WorkspaceJob(jobname) {
        @Override
        public IStatus runInWorkspace(IProgressMonitor monitor) {
          try {
            op.execute(monitor);
          } catch (final CoreException e) {
            return e.getStatus();
          }
          return Status.OK_STATUS;
        }
View Full Code Here


    testRepository.branch("stable").commit().add(path.toString(), "stable")
        .create();
    touchAndSubmit("master", "master");
    MergeOperation mergeOp = new MergeOperation(
        testRepository.getRepository(), "stable");
    mergeOp.execute(null);
    MergeResult mergeResult = mergeOp.getResult();
    assertThat(mergeResult.getMergeStatus(), is(MergeStatus.CONFLICTING));
    assertThat(mergeResult.getConflicts().keySet(),
        hasItem(path.toString()));
View Full Code Here

    Job job = new WorkspaceJob(jobname) {

      @Override
      public IStatus runInWorkspace(IProgressMonitor monitor) {
        try {
          op.execute(monitor);
        } catch (final CoreException e) {
          return e.getStatus();
        }
        return Status.OK_STATUS;
      }
View Full Code Here

    Job job = new WorkspaceJob(jobname) {

      @Override
      public IStatus runInWorkspace(IProgressMonitor monitor) {
        try {
          op.execute(monitor);
        } catch (final CoreException e) {
          return e.getStatus();
        }
        return Status.OK_STATUS;
      }
View Full Code Here

  @Test
  public void testMergeFF() throws Exception {
    MergeOperation operation = new MergeOperation(
        testRepository.getRepository(), MASTER);
    operation.execute(new NullProgressMonitor());

    assertTrue(testRepository.getRepository().resolve(SIDE).equals(secondCommit));
    assertEquals(2, countCommitsInHead());
  }
View Full Code Here

  public void testMergeoptionsNoFF() throws Exception {
    setMergeOptions("side", FastForwardMode.NO_FF);

    MergeOperation operation = new MergeOperation(
        testRepository.getRepository(), MASTER);
    operation.execute(new NullProgressMonitor());

    assertEquals(3, countCommitsInHead());
  }

  @Test
View Full Code Here

    RevCommit commit = testRepository.addAndCommit(project.getProject(), file2,
        "side commit 1");

    MergeOperation operation = new MergeOperation(
        testRepository.getRepository(), MASTER);
    operation.execute(new NullProgressMonitor());

    assertTrue(testRepository.getRepository().resolve(SIDE).equals(commit));
  }

  private void setMergeOptions(String branch, FastForwardMode ffMode)
View Full Code Here

  public void testMergeNoFF() throws Exception {
    setMerge(FastForwardMode.NO_FF);

    MergeOperation operation = new MergeOperation(
        testRepository.getRepository(), MASTER);
    operation.execute(new NullProgressMonitor());

    assertEquals(3, countCommitsInHead());
  }

  @Test
View Full Code Here

    RevCommit commit = testRepository.addAndCommit(project.getProject(), file2,
        "side commit 1");

    MergeOperation operation = new MergeOperation(
        testRepository.getRepository(), MASTER);
    operation.execute(new NullProgressMonitor());

    assertTrue(testRepository.getRepository().resolve(SIDE).equals(commit));
  }

  private void setMerge(FastForwardMode ffMode) throws IOException {
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.