Package org.eclipse.egit.core.op

Examples of org.eclipse.egit.core.op.CreatePatchOperation


    sb.append("+new content").append("\n");
    sb.append("\\ No newline at end of file").append("\n");
    sb.append(SIMPLE_PATCH_CONTENT);

    // update patch
    CreatePatchOperation op = new CreatePatchOperation(testRepository.getRepository(), null);
    op.updateWorkspacePatchPrefixes(sb, diffFmt);
    // add workspace header
    StringBuilder sb1 = new StringBuilder("### Eclipse Workspace Patch 1.0\n#P ")
        .append(project.getProject().getName()).append("\n").append(sb);

    assertPatch(SIMPLE_WORKSPACE_PATCH_CONTENT, sb1.toString());
View Full Code Here


    testRepository.track(file);
    testRepository.track(newFile);
    commit = testRepository.commit("2nd commit");

    // create patch
    CreatePatchOperation operation = new CreatePatchOperation(
        testRepository.getRepository(), commit);

    operation.setHeaderFormat(DiffHeaderFormat.WORKSPACE);
    operation.execute(new NullProgressMonitor());

    assertPatch(SIMPLE_WORKSPACE_PATCH_CONTENT, operation.getPatchContent());
  }
View Full Code Here

    commit = testRepository.addAndCommit(project.getProject(), deletedFile,
        "whatever");
    FileUtils.delete(deletedFile);

    // create patch
    CreatePatchOperation operation = new CreatePatchOperation(
        testRepository.getRepository(), null);

    operation.setHeaderFormat(DiffHeaderFormat.WORKSPACE);
    operation.execute(new NullProgressMonitor());

    assertPatch(SIMPLE_WORKSPACE_PATCH_CONTENT, operation.getPatchContent());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.egit.core.op.CreatePatchOperation

Copyright © 2018 www.massapicom. 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.