use of jetbrains.buildServer.buildTriggers.vcs.git.GitFetchService in project teamcity-git by JetBrains.
the class GitCommitsInfoBuilderTest method test_torrents_repo_local.
@Test(enabled = false)
public void test_torrents_repo_local() throws VcsException {
// /does not work for real repository: Fetcher call is mostly endless
VcsRoot root = vcsRoot().withFetchUrl("E:\\Work\\TeamCity\\trunk\\teamcity-torrent-plugin\\.git").withRepositoryPathOnServer("E:\\Work\\TeamCity\\trunk\\teamcity-torrent-plugin\\.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());
}
use of jetbrains.buildServer.buildTriggers.vcs.git.GitFetchService 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