Examples of SquashCommitsOperation


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

      public String modifyCommitMessage(String oldMessage) {
        return promptCommitMessage(shell, oldMessage);
      }
    };

    final SquashCommitsOperation op = new SquashCommitsOperation(repo,
        commits, messageHandler);
    Job job = new Job(MessageFormat.format(UIText.SquashHandler_JobName,
        Integer.valueOf(commits.size()))) {
      @Override
      protected IStatus run(IProgressMonitor monitor) {
        try {
          op.execute(monitor);
        } catch (CoreException e) {
          Activator.logError(UIText.SquashHandler_InternalError, e);
        }
        return Status.OK_STATUS;
      }

      @Override
      public boolean belongsTo(Object family) {
        if (JobFamilies.SQUASH.equals(family))
          return true;
        return super.belongsTo(family);
      }
    };
    job.setUser(true);
    job.setRule(op.getSchedulingRule());
    job.schedule();
    return null;
  }
View Full Code Here

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

        return "squashed";
      }
    };

    List<RevCommit> commits = Arrays.asList(commit1, commit2, commit3);
    SquashCommitsOperation op = new SquashCommitsOperation(
        testRepository.getRepository(), commits, messageHandler);
    op.execute(new NullProgressMonitor());

    assertEquals(2, countCommitsInHead());

    LogCommand log = new Git(testRepository.getRepository()).log();
    Iterable<RevCommit> logCommits = log.call();
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.