Package org.eclipse.egit.core.op

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


  @Test
  public void testCheckoutRemote() throws Exception {
    Repository repo = lookupRepository(clonedRepositoryFile);
    BranchOperation bop = new BranchOperation(repo, "refs/heads/master");
    bop.execute(null);

    assertEquals("master", repo.getBranch());
    SWTBotTree tree = getOrOpenView().bot().tree();

    SWTBotTreeItem item = myRepoViewUtil.getLocalBranchesItem(tree,
View Full Code Here


                tracker.save(snapshot).restore(pMonitor);
              }
            });
          }

          bop.execute(monitor);
        } catch (CoreException e) {
          switch (bop.getResult().getStatus()) {
          case CONFLICTS:
          case NONDELETED:
            break;
View Full Code Here

    askForTargetIfNecessary();
    if (target == null)
      return;

    BranchOperation bop = new BranchOperation(repository, target);
    bop.execute(monitor);

    show(bop.getResult());
  }

  private void askForTargetIfNecessary() {
View Full Code Here

    CreateLocalBranchOperation createBranch = new CreateLocalBranchOperation(
        repository, branchName, repository.getRef("master"),
        UpstreamConfig.NONE);
    createBranch.execute(null);
    BranchOperation checkout = new BranchOperation(repository, branchName);
    checkout.execute(null);
  }

  private Repository createRemoteRepository() throws IOException {
    File gitDir = new File(getTestDirectory(), "pushbranchremote");
    Repository repo = FileRepositoryBuilder.create(gitDir);
View Full Code Here

    assertTrue(testFile.exists());

    // check out test and verify the file is there
    BranchOperation bop = new BranchOperation(repository2.getRepository(),
        "refs/heads/test");
    bop.execute(null);
    testFile = new File(workdir2, newFilePath);
    assertTrue(testFile.exists());
  }

  /**
 
View Full Code Here

    CreateLocalBranchOperation createBranch = new CreateLocalBranchOperation(
        repository, branchName, repository.getRef("master"),
        UpstreamConfig.NONE);
    createBranch.execute(null);
    BranchOperation checkout = new BranchOperation(repository, branchName);
    checkout.execute(null);
  }

  private void assertBranchPushed(String branchName, Repository remoteRepo)
      throws Exception {
    ObjectId pushed = remoteRepo.resolve(branchName);
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.