Package org.eclipse.egit.core.op

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


        getShell(event), repository);
    if (branchSelectionDialog.open() == IDialogConstants.OK_ID) {
      final String refName = branchSelectionDialog.getRefName();
      final ResetType type = branchSelectionDialog.getResetType();
      String jobname = NLS.bind(UIText.ResetAction_reset, refName);
      final ResetOperation operation = new ResetOperation(repository,
          refName, type);
      JobUtil.scheduleUserWorkspaceJob(operation, jobname,
          JobFamilies.RESET);
    }
    return null;
View Full Code Here


      break;
    default:
      return; // other types are currently not used
    }

    ResetOperation operation = new ResetOperation(repo, commitId.getName(),
        resetType);
    JobUtil.scheduleUserWorkspaceJob(operation, jobName, JobFamilies.RESET);
  }
View Full Code Here

      CommitUI commitUI = new CommitUI(getShell(), repository,
          new IResource[0], true);
      shouldContinue = commitUI.commit();
      break;
    case IDialogConstants.ABORT_ID:
      final ResetOperation operation = new ResetOperation(repository,
          Constants.HEAD, ResetType.HARD);
      String jobname = NLS.bind(UIText.ResetAction_reset, Constants.HEAD);
      JobUtil.scheduleUserWorkspaceJob(operation, jobname,
          JobFamilies.RESET);
      shouldContinue = true;
View Full Code Here

    clickCompareWith(compareWithIndexActionLabel);

    assertTreeCompareNoChange();

    // reset -> there should be no more changes
    ResetOperation rop = new ResetOperation(
        lookupRepository(repositoryFile), "refs/heads/master",
        ResetType.HARD);
    rop.execute(new NullProgressMonitor());

    clickCompareWith(compareWithIndexActionLabel);

    assertTreeCompareNoChange();
  }
View Full Code Here

    clickCompareWithAndWaitForSync(compareWithHeadMenuLabel);

    assertSynchronizeFile1Changed();

    // reset -> there should be no more changes
    ResetOperation rop = new ResetOperation(
        lookupRepository(repositoryFile), "refs/heads/master",
        ResetType.HARD);
    rop.execute(new NullProgressMonitor());

    clickCompareWithAndWaitForSync(compareWithHeadMenuLabel);

    assertSynchronizeNoChange();
  }
View Full Code Here

                    InterruptedException {

                  String jobname = NLS.bind(
                      UIText.ResetAction_reset,
                      targetBranch);
                  final ResetOperation operation = new ResetOperation(
                      node.getRepository(), targetBranch,
                      resetType);
                  JobUtil.scheduleUserWorkspaceJob(operation,
                      jobname, JobFamilies.RESET);
                }
View Full Code Here

  @Test
  public void testHardReset() throws Exception {
    setupRepository();
    String fileInIndexPath = fileInIndex.getLocation().toPortableString();
    new ResetOperation(repository, initialCommit.getName(), ResetType.HARD)
        .execute(null);
    // .project must disappear, related Eclipse project must be deleted
    assertFalse(projectFile.exists());
    assertFalse(project.getProject().exists());
    // check if HEAD points to initial commit now
View Full Code Here

  @Test
  public void testSoftReset() throws Exception {
    setupRepository();
    String fileInIndexPath = fileInIndex.getLocation().toPortableString();
    new ResetOperation(repository, initialCommit.getName(), ResetType.SOFT)
        .execute(null);
    // .project must remain
    assertTrue(projectFile.exists());
    assertTrue(project.getProject().exists());
    // check if HEAD points to initial commit now
View Full Code Here

  @Test
  public void testMixedReset() throws Exception {
    setupRepository();
    String fileInIndexPath = fileInIndex.getLocation().toPortableString();
    new ResetOperation(repository, initialCommit.getName(), ResetType.MIXED)
        .execute(null);
    // .project must remain
    assertTrue(projectFile.exists());
    assertTrue(project.getProject().exists());
    // check if HEAD points to initial commit now
View Full Code Here

TOP

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

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.