Examples of BranchInfo


Examples of com.codicesoftware.plastic.commontypes.BranchInfo

    }

    private String addCommitsInContinuousIntegrationMode(String lastVcsKeyBuilt, List<Commit> commits)
            throws RepositoryException {

        BranchInfo branchInfo = Utils.getBranchInfo(
                mRepositoryData.branch, mRepositoryData.repository, mRepositoryData.repositoryserver);
        String lastCsetOnRep = branchInfo.getChangeset();

        ChangesetInfo[] changesets = getChangesetsToBeCommited(branchInfo, lastVcsKeyBuilt);
        if (changesets.length == 0)
            return lastCsetOnRep;
View Full Code Here

Examples of com.codicesoftware.plastic.commontypes.BranchInfo

    }

    private String addCommitsInTestBranchMode(String lastVcsKeyBuilt, List<Commit> commits)
            throws RepositoryException {

    BranchInfo firstCandidateBranch = pickFirstResolvedBranch();
        String lastCsetOnRep = firstCandidateBranch.getChangeset();
        mLastResolvedBranchSelectedMap.put(lastCsetOnRep, firstCandidateBranch);
        if (lastVcsKeyBuilt.equals(lastCsetOnRep)) {
      return lastVcsKeyBuilt;
    }
View Full Code Here

Examples of com.codicesoftware.plastic.commontypes.BranchInfo

                {
                    public String call() throws Exception
                    {
                        WorkspaceManager.createWorkspace(workspaceFilePath);
                        String repSpec = Utils.getRepositorySpec(mRepositoryData);
                        BranchInfo lastSelectedBranch = mLastResolvedBranchSelectedMap.containsKey(vcsRevisionKey) ?
                                mLastResolvedBranchSelectedMap.get(vcsRevisionKey) : pickFirstResolvedBranch();

                        Utils.writeToFile(lastSelectedBranch.getFullBranchNameWithoutBranchPreffix(), "CurrentBranch.txt");
                        WorkspaceManager.updateWorkspace(
                                workspaceFilePath, repSpec, lastSelectedBranch.getFullBranchNameWithoutBranchPreffix(), vcsRevisionKey);
                        return vcsRevisionKey;
                    }
                });
        }
        catch (RepositoryException e)
View Full Code Here

Examples of com.codicesoftware.plastic.commontypes.BranchInfo

    if (repName == null || repName.trim().length() == 0) {
      errorCollection.addError(Constants.PLASTIC_REPOSITORY, "The repository name must be specified");
    }

    try  {
            BranchInfo brInfo;
            if (branch.equals(Constants.BR_NAME))
                brInfo = Utils.getBranchInfo(Constants.MAIN, repName, repServer);
            else
                brInfo = Utils.getBranchInfo(branch, repName, repServer);
View Full Code Here

Examples of com.codicesoftware.plastic.commontypes.BranchInfo

    }

    @NotNull
    public List<VcsBranch> getOpenBranches() throws RepositoryException {

        BranchInfo currentMainTrackedBranch = Utils.getBranchInfo(
                repositoryData.branch, repositoryData.repository, repositoryData.repositoryserver);
        List<VcsBranch> openBranches = new ArrayList<VcsBranch>();

        try {
            WhereClauseBuilder whereBuilder = new WhereClauseBuilder();
            whereBuilder.addClause("parent", "=", currentMainTrackedBranch.getFullBranchNameWithoutBranchPreffix());
            BranchInfo[] branchesByName = QueryCommands.GetBranches(Utils.getRepositorySpec(repositoryData), whereBuilder.getWhereString());
            log.debug("Getting open branches from branch"+ repositoryData.branch + ". Count: " + branchesByName.length);
            for(BranchInfo br : branchesByName) {
                openBranches.add(new VcsBranchImpl(br.getFullBranchNameWithoutBranchPreffix()));
            }
View Full Code Here

Examples of org.guvnor.asset.management.backend.model.BranchInfo

        Collection<String> branchNames = repository.getBranches();

        List<BranchInfo> branchInfos = new ArrayList<BranchInfo>();
        for (String branch : branchNames) {
          branchInfos.add(new BranchInfo("default://"+branch+"@"+gitRepo, branch));
        }

        ExecutionResults results = new ExecutionResults();
        results.setData("Branches", branchInfos);
        return results;
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgBranches.BranchInfo

  @Test
  public void testClosedInactiveBranches() throws Exception {
    HgRepository repo = Configuration.get().find("branches-1");
    HgBranches branches = repo.getBranches();
    BranchInfo b1 = branches.getBranch("branch1");
    assertNotNull(b1);
    assertTrue(b1.isClosed());
    assertEquals(2, b1.getHeads().size());
    // order is important!
    assertEquals("131e84b878d25b5eab7f529ebb35e57b2a439db7", b1.getHeads().get(0).toString());
    assertEquals("c993cda1f5a7afd771efa87fe95fb7c5f73169e6", b1.getHeads().get(1).toString());
    //
    BranchInfo b2 = branches.getBranch("branch2");
    assertNotNull(b2);
    assertFalse(b2.isClosed());
    assertEquals(2, b2.getHeads().size());
    assertEquals("537f548adfd7eb9ce2a73ed7e7ca163eb1b61401", b2.getHeads().get(0).toString());
    assertEquals("e698babd9479b1c07e0ed3155f5e290ee15affed", b2.getHeads().get(1).toString());
    //
    BranchInfo b3 = branches.getBranch("branch3");
    assertNotNull(b3);
    assertFalse(b3.isClosed());
    assertEquals(1, b3.getHeads().size());
    assertEquals("b103f33723f37c7bb4b81d74a66135d6fdaf0ced", b3.getHeads().get(0).toString());
    //
    BranchInfo b4 = branches.getBranch("branch4");
    assertNotNull(b4);
    assertFalse(b4.isClosed());
    assertEquals(2, b4.getHeads().size());
    assertEquals("fceabd402f0193fb30605aed0ee3a9d5feb99f60", b4.getHeads().get(0).toString());
    assertEquals("892b6a504be7835f1748ba632fe15a9389d4479b", b4.getHeads().get(1).toString());
    //
    BranchInfo b5 = branches.getBranch("branch5");
    assertNotNull(b5);
    assertFalse(b5.isClosed());
    assertEquals(1, b5.getHeads().size());
    assertEquals("9cb6ad32b9074021356c38050e2aab6addba4393", b5.getHeads().get(0).toString());
  }
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgBranches.BranchInfo

  @Test
  public void testBranchInfoClosedHeads() throws Exception{
    HgRepository repo = Configuration.get().find("branches-1");
    HgBranches branches = repo.getBranches();
    // branch1 - two closed heads
    BranchInfo b1 = branches.getBranch("branch1");
    assertTrue(b1.isClosed(b1.getHeads().get(0)));
    assertTrue(b1.isClosed(b1.getHeads().get(1)));
    try {
      b1.isClosed(Nodeid.fromAscii("9cb6ad32b9074021356c38050e2aab6addba4393"));
      fail("Revision that doesn't belong to heads of the branch shall not be handled");
    } catch (IllegalArgumentException ex) {
      // good
    }
    //
    // branch2, one closed head
    BranchInfo b2 = branches.getBranch("branch2");
    assertFalse(b2.isClosed(b2.getHeads().get(0)));
    assertTrue(b2.isClosed(b2.getHeads().get(1)));
    //
    // branch5, closed and reopened, 1 open head
    BranchInfo b5 = branches.getBranch("branch5");
    for (Nodeid h : b5.getHeads()) {
      assertFalse(b5.isClosed(h));
    }
  }
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.