use of jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport in project teamcity-git by JetBrains.
the class GitCommitsInfoBuilderTest method test_linux.
@Test(enabled = false)
public void test_linux() throws VcsException {
// /does not work for real repository: Fetcher call is mostly endless
VcsRoot root = vcsRoot().withFetchUrl("F:\\Work\\linux\\.git").withRepositoryPathOnServer("F:\\Work\\linux\\.git").withBranch("master").build();
GitVcsSupport vcs = gitSupport().withServerPaths(myServerPaths).build();
final List<CommitInfo> commits = new ArrayList<CommitInfo>();
new GitCommitsInfoBuilder(vcs, new GitFetchService(vcs)).collectCommits(root, CheckoutRules.DEFAULT, new CommitsInfoBuilder.CommitsConsumer() {
public void consumeCommit(@NotNull CommitInfo commit) {
commits.add(commit);
}
});
System.out.println("Total commits: " + commits.size());
}
Aggregations