BranchInfo[] branchesByName = QueryCommands.GetBranchesByName(branchNameForFindCommand, repSpec);
for (BranchInfo aBranchesByName : branchesByName)
if (aBranchesByName.getFullBranchNameWithoutBranchPreffix().equals(branch))
return aBranchesByName;
throw new RepositoryException(String.format(
"Unable to obtain a valid branch. Branch name:%s rep spec: %s",
branch, repSpec));
}
catch (PlasticException e)
{
String exceptionMessage = "Failed to obtain the specified tracked branch:" +e.getMessage();
log.error(exceptionMessage);
log.debug(exceptionMessage +" - " +e.getStackTrace());
throw new RepositoryException(exceptionMessage);
}
}