Search in sources :

Example 1 with BulkPatchBuilder

use of jetbrains.buildServer.vcs.BulkPatchService.BulkPatchBuilder in project teamcity-git by JetBrains.

the class BulkPatchBuilderTest method test_merged_patch.

@Test
public void test_merged_patch() throws Exception {
    final VcsRoot root = vcsRoot().withFetchUrl(GitUtils.toURL(myRepositoryDir)).withBranch("master").build();
    final ArrayList<String> log = new ArrayList<String>();
    final BulkPatchBuilder patcher = patcher(new PatchLogger() {

        public void log(@NotNull final String message) {
            log.add(message);
        }
    });
    runFullPatch(root, patcher);
    Assert.assertTrue(log.size() > 0);
}
Also used : BulkPatchBuilder(jetbrains.buildServer.vcs.BulkPatchService.BulkPatchBuilder) ArrayList(java.util.ArrayList) VcsRoot(jetbrains.buildServer.vcs.VcsRoot) Test(org.testng.annotations.Test)

Example 2 with BulkPatchBuilder

use of jetbrains.buildServer.vcs.BulkPatchService.BulkPatchBuilder in project teamcity-git by JetBrains.

the class BulkPatchBuilderTest method test_local_idea.

@Test(enabled = false)
public void test_local_idea() throws Exception {
    // /does not work for real repository: Fetcher call is mostly endless
    final String ultimate_local = "E:\\Work\\idea-ultimate\\.git";
    VcsRoot root = vcsRoot().withFetchUrl(ultimate_local).withRepositoryPathOnServer(ultimate_local).withBranch("master").build();
    final BulkPatchBuilder patcher = patcher(new PatchLogger() {

        public void log(@NotNull final String message) {
        }
    });
    runFullPatch(root, patcher);
}
Also used : BulkPatchBuilder(jetbrains.buildServer.vcs.BulkPatchService.BulkPatchBuilder) VcsRoot(jetbrains.buildServer.vcs.VcsRoot) Test(org.testng.annotations.Test)

Aggregations

BulkPatchBuilder (jetbrains.buildServer.vcs.BulkPatchService.BulkPatchBuilder)2 VcsRoot (jetbrains.buildServer.vcs.VcsRoot)2 Test (org.testng.annotations.Test)2 ArrayList (java.util.ArrayList)1