Package org.eclipse.egit.core.op

Examples of org.eclipse.egit.core.op.CommitOperation.execute()


        "some text");
    IFile[] filesToCommit = { fileA, fileB };
    CommitOperation commitOperation = new CommitOperation(filesToCommit,
        Arrays.asList(filesToCommit), TestUtils.AUTHOR,
        TestUtils.COMMITTER, "first commit");
    commitOperation.execute(null);
    testUtils.assertRepositoryContainsFiles(repository, getRepoRelativePaths(filesToCommit));
  }

  private String[] getRepoRelativePaths(IFile[] files) {
    ArrayList<String> result = new ArrayList<String>();
View Full Code Here


        "foo/b.txt", "some text");
    IFile[] filesToCommit = { fileA, fileB };
    CommitOperation commitOperation = new CommitOperation(filesToCommit,
        Arrays.asList(filesToCommit), TestUtils.AUTHOR,
        TestUtils.COMMITTER, "first commit");
    commitOperation.execute(null);
    testUtils.changeContentOfFile(project.getProject(), fileA,
        "new content of A");
    testUtils.changeContentOfFile(project.getProject(), fileB,
        "new content of B");
    resources.add(fileA);
View Full Code Here

    resources.add(fileA);
    resources.add(fileB);
    new AddToIndexOperation(resources).execute(null);
    commitOperation = new CommitOperation(filesToCommit, EMPTY_FILE_LIST,
        TestUtils.AUTHOR, TestUtils.COMMITTER, "second commit");
    commitOperation.execute(null);

    testUtils.assertRepositoryContainsFilesWithContent(repository,
        "foo/a.txt", "new content of A", "foo/b.txt",
        "new content of B");
  }
View Full Code Here

        "foo/b.txt", "some text");
    IFile[] filesToCommit = { fileA, fileB };
    CommitOperation commitOperation = new CommitOperation(filesToCommit,
        Arrays.asList(filesToCommit), TestUtils.AUTHOR,
        TestUtils.COMMITTER, "first commit");
    commitOperation.execute(null);
    testUtils.changeContentOfFile(project.getProject(), fileA,
        "new content of A");
    testUtils.changeContentOfFile(project.getProject(), fileB,
        "new content of B");
    resources.add(fileA);
View Full Code Here

    resources.add(fileB);
    new AddToIndexOperation(resources).execute(null);
    IFile[] filesToCommit2 = { fileA };
    commitOperation = new CommitOperation(filesToCommit2, EMPTY_FILE_LIST,
        TestUtils.AUTHOR, TestUtils.COMMITTER, "second commit");
    commitOperation.execute(null);

    testUtils.assertRepositoryContainsFilesWithContent(repository,
        "foo/a.txt", "new content of A", "foo/b.txt", "some text");
  }
View Full Code Here

        "foo/b.txt", "some text");
    IFile[] filesToCommit = { fileA, fileB };
    CommitOperation commitOperation = new CommitOperation(filesToCommit,
        Arrays.asList(filesToCommit), TestUtils.AUTHOR,
        TestUtils.COMMITTER, "first commit");
    commitOperation.execute(null);

    testUtils.changeContentOfFile(project.getProject(), fileA,
        "new content of A");
    testUtils.changeContentOfFile(project.getProject(), fileB,
        "new content of B");
View Full Code Here

    resources.add(fileA);
    resources.add(fileB);
    commitOperation = new CommitOperation(filesToCommit,
        EMPTY_FILE_LIST, TestUtils.AUTHOR,
        TestUtils.COMMITTER, "first commit");
    commitOperation.execute(null);

    testUtils.assertRepositoryContainsFilesWithContent(repository,
        "foo/a.txt", "new content of A", "foo/b.txt",
        "new content of B");
  }
View Full Code Here

    IFile[] commitables = getAllFiles();
    CommitOperation cop = new CommitOperation(commitables,
        Arrays.asList(commitables), TestUtil.TESTAUTHOR,
        TestUtil.TESTCOMMITTER, "Initial commit");
    cop.setAmending(true);
    cop.execute(null);
  }

  private static IFile[] getAllFiles() {
    IProject firstProject = ResourcesPlugin.getWorkspace().getRoot()
        .getProject(PROJ1);
View Full Code Here

    untracked.add(toBeDeleted);
    // commit to stable
    CommitOperation op = new CommitOperation(new IFile[] { toBeDeleted },
        untracked, TestUtil.TESTAUTHOR, TestUtil.TESTCOMMITTER,
        "Add to stable");
    op.execute(null);

    InputStream is = toBeDeleted.getContents();
    try {
      checkout(new String[] { LOCAL_BRANCHES, "master" });
      final SWTBotShell showUndeleted = bot
View Full Code Here

    AddToIndexOperation trop = new AddToIndexOperation(files);
    trop.execute(null);
    CommitOperation cop = new CommitOperation(fileArr, files, TestUtils.AUTHOR,
        TestUtils.COMMITTER, "Added file");
    cop.execute(null);

    proj.delete(false, false, null);

    pop = createPushOperation();
    pop.run(null);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.