Package org.eclipse.egit.core.op

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


  private void createBranch(final String textForBranch, boolean doCheckout,
      RevCommit commit, IProgressMonitor monitor) throws CoreException,
      GitAPIException {
    monitor.setTaskName(UIText.FetchGerritChangePage_CreatingBranchTaskName);
    CreateLocalBranchOperation bop = new CreateLocalBranchOperation(
        repository, textForBranch, commit);
    bop.execute(monitor);

    if (doCheckout) {
      CheckoutCommand co = new Git(repository).checkout();
      try {
        co.setName(textForBranch).call();
View Full Code Here


    monitor.beginTask(UIText.CreateBranchPage_CreatingBranchMessage,
        IProgressMonitor.UNKNOWN);

    String newRefName = getBranchName();

    final CreateLocalBranchOperation cbop;

    if (myBaseCommit != null
        && this.sourceRefName.equals(myBaseCommit.name()))
      cbop = new CreateLocalBranchOperation(myRepository, newRefName,
          myBaseCommit);
    else
      cbop = new CreateLocalBranchOperation(myRepository, newRefName,
          myRepository.getRef(this.sourceRefName),
          upstreamConfig);

    cbop.execute(monitor);

    if (checkout.getSelection()) {
      if (monitor.isCanceled())
        return;
      monitor.beginTask(UIText.CreateBranchPage_CheckingOutMessage,
View Full Code Here

    config.save();
  }

  private void checkoutNewLocalBranch(String branchName)
      throws Exception {
    CreateLocalBranchOperation createBranch = new CreateLocalBranchOperation(
        repository, branchName, repository.getRef("master"),
        UpstreamConfig.NONE);
    createBranch.execute(null);
    BranchOperation checkout = new BranchOperation(repository, branchName);
    checkout.execute(null);
  }
View Full Code Here

    assertBranchPushed("baz", remoteRepository);
  }

  private void checkoutNewLocalBranch(String branchName)
      throws Exception {
    CreateLocalBranchOperation createBranch = new CreateLocalBranchOperation(
        repository, branchName, repository.getRef("master"),
        UpstreamConfig.NONE);
    createBranch.execute(null);
    BranchOperation checkout = new BranchOperation(repository, branchName);
    checkout.execute(null);
  }
View Full Code Here

TOP

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

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.