Examples of branchList()


Examples of org.eclipse.jgit.api.Git.branchList()

    JSONObject gitSection = project.getJSONObject(GitConstants.KEY_GIT);
    String gitRemoteUri = gitSection.getString(GitConstants.KEY_REMOTE);

    Repository db1 = getRepositoryForContentLocation(cloneContentLocation);
    Git git = new Git(db1);
    int localBefore = git.branchList().call().size();
    int remoteBefore = git.branchList().setListMode(ListMode.REMOTE).call().size();
    int allBefore = git.branchList().setListMode(ListMode.ALL).call().size();
    branch(branchesLocation, "a");

    assertEquals(1, git.branchList().call().size() - localBefore);
View Full Code Here

Examples of org.eclipse.jgit.api.Git.branchList()

    String gitRemoteUri = gitSection.getString(GitConstants.KEY_REMOTE);

    Repository db1 = getRepositoryForContentLocation(cloneContentLocation);
    Git git = new Git(db1);
    int localBefore = git.branchList().call().size();
    int remoteBefore = git.branchList().setListMode(ListMode.REMOTE).call().size();
    int allBefore = git.branchList().setListMode(ListMode.ALL).call().size();
    branch(branchesLocation, "a");

    assertEquals(1, git.branchList().call().size() - localBefore);
    assertEquals(0, git.branchList().setListMode(ListMode.REMOTE).call().size() - remoteBefore);
View Full Code Here

Examples of org.eclipse.jgit.api.Git.branchList()

    Repository db1 = getRepositoryForContentLocation(cloneContentLocation);
    Git git = new Git(db1);
    int localBefore = git.branchList().call().size();
    int remoteBefore = git.branchList().setListMode(ListMode.REMOTE).call().size();
    int allBefore = git.branchList().setListMode(ListMode.ALL).call().size();
    branch(branchesLocation, "a");

    assertEquals(1, git.branchList().call().size() - localBefore);
    assertEquals(0, git.branchList().setListMode(ListMode.REMOTE).call().size() - remoteBefore);
    assertEquals(1, git.branchList().setListMode(ListMode.ALL).call().size() - allBefore);
View Full Code Here

Examples of org.eclipse.jgit.api.Git.branchList()

    int localBefore = git.branchList().call().size();
    int remoteBefore = git.branchList().setListMode(ListMode.REMOTE).call().size();
    int allBefore = git.branchList().setListMode(ListMode.ALL).call().size();
    branch(branchesLocation, "a");

    assertEquals(1, git.branchList().call().size() - localBefore);
    assertEquals(0, git.branchList().setListMode(ListMode.REMOTE).call().size() - remoteBefore);
    assertEquals(1, git.branchList().setListMode(ListMode.ALL).call().size() - allBefore);

    // push all
    // TODO: replace with REST API when bug 339115 is fixed
View Full Code Here

Examples of org.eclipse.jgit.api.Git.branchList()

    int remoteBefore = git.branchList().setListMode(ListMode.REMOTE).call().size();
    int allBefore = git.branchList().setListMode(ListMode.ALL).call().size();
    branch(branchesLocation, "a");

    assertEquals(1, git.branchList().call().size() - localBefore);
    assertEquals(0, git.branchList().setListMode(ListMode.REMOTE).call().size() - remoteBefore);
    assertEquals(1, git.branchList().setListMode(ListMode.ALL).call().size() - allBefore);

    // push all
    // TODO: replace with REST API when bug 339115 is fixed
    git.push().setPushAll().call();
View Full Code Here

Examples of org.eclipse.jgit.api.Git.branchList()

    int allBefore = git.branchList().setListMode(ListMode.ALL).call().size();
    branch(branchesLocation, "a");

    assertEquals(1, git.branchList().call().size() - localBefore);
    assertEquals(0, git.branchList().setListMode(ListMode.REMOTE).call().size() - remoteBefore);
    assertEquals(1, git.branchList().setListMode(ListMode.ALL).call().size() - allBefore);

    // push all
    // TODO: replace with REST API when bug 339115 is fixed
    git.push().setPushAll().call();
View Full Code Here

Examples of org.eclipse.jgit.api.Git.branchList()

    // push all
    // TODO: replace with REST API when bug 339115 is fixed
    git.push().setPushAll().call();

    assertEquals(1, git.branchList().call().size() - localBefore);
    assertEquals(1, git.branchList().setListMode(ListMode.REMOTE).call().size() - remoteBefore);
    assertEquals(2, git.branchList().setListMode(ListMode.ALL).call().size() - allBefore);

    checkoutBranch(cloneLocation, Constants.MASTER);
    JSONObject remoteBranch = getRemoteBranch(gitRemoteUri, 2, 0, Constants.MASTER);
View Full Code Here

Examples of org.eclipse.jgit.api.Git.branchList()

    // push all
    // TODO: replace with REST API when bug 339115 is fixed
    git.push().setPushAll().call();

    assertEquals(1, git.branchList().call().size() - localBefore);
    assertEquals(1, git.branchList().setListMode(ListMode.REMOTE).call().size() - remoteBefore);
    assertEquals(2, git.branchList().setListMode(ListMode.ALL).call().size() - allBefore);

    checkoutBranch(cloneLocation, Constants.MASTER);
    JSONObject remoteBranch = getRemoteBranch(gitRemoteUri, 2, 0, Constants.MASTER);
    assertNotNull(remoteBranch);
View Full Code Here

Examples of org.eclipse.jgit.api.Git.branchList()

    // TODO: replace with REST API when bug 339115 is fixed
    git.push().setPushAll().call();

    assertEquals(1, git.branchList().call().size() - localBefore);
    assertEquals(1, git.branchList().setListMode(ListMode.REMOTE).call().size() - remoteBefore);
    assertEquals(2, git.branchList().setListMode(ListMode.ALL).call().size() - allBefore);

    checkoutBranch(cloneLocation, Constants.MASTER);
    JSONObject remoteBranch = getRemoteBranch(gitRemoteUri, 2, 0, Constants.MASTER);
    assertNotNull(remoteBranch);
View Full Code Here

Examples of org.eclipse.jgit.api.Git.branchList()

    Repository db = null;
    try {
      File gitDir = GitUtils.getGitDir(path);
      db = FileRepositoryBuilder.create(gitDir);
      Git git = new Git(db);
      List<Ref> branchRefs = git.branchList().call();
      List<Branch> branches = new ArrayList<Branch>(branchRefs.size());
      for (Ref ref : branchRefs) {
        if (nameFilter != null && !nameFilter.equals("")) {
          String shortName = Repository.shortenRefName(ref.getName());
          if (shortName.toLowerCase().contains(nameFilter.toLowerCase())) {
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.