Package org.eclipse.egit.core.synchronize.dto

Examples of org.eclipse.egit.core.synchronize.dto.GitSynchronizeData$RemoteAndMerge


  public void shouldReturnFalseWhenShortContentIsDifferent() throws Exception {
    // when
    byte[] localContent = "very long long content".getBytes("UTF-8");
    // this typo should be here
    byte[] remoteContent = "very long lonk content".getBytes("UTF-8");
    GitSynchronizeData data = new GitSynchronizeData(repo, HEAD, HEAD, true);
    GitSynchronizeDataSet dataSet = new GitSynchronizeDataSet(data);
    GitResourceVariantComparator grvc = new GitResourceVariantComparator(
        dataSet);

    // given
View Full Code Here


    byte[] localContent = new byte[8192];
    Arrays.fill(localContent, (byte) 'a');
    byte[] remoteContent = new byte[8192];
    Arrays.fill(remoteContent, (byte) 'a');
    remoteContent[8101] = 'b';
    GitSynchronizeData data = new GitSynchronizeData(repo, HEAD, HEAD, true);
    GitSynchronizeDataSet dataSet = new GitSynchronizeDataSet(data);
    GitResourceVariantComparator grvc = new GitResourceVariantComparator(
        dataSet);

    // given
View Full Code Here

    // when
    byte[] localContent = new byte[8192];
    Arrays.fill(localContent, (byte) 'a');
    byte[] remoteContent = new byte[8200];
    Arrays.fill(remoteContent, (byte) 'a');
    GitSynchronizeData data = new GitSynchronizeData(repo, HEAD, HEAD, true);
    GitSynchronizeDataSet dataSet = new GitSynchronizeDataSet(data);
    GitResourceVariantComparator grvc = new GitResourceVariantComparator(
        dataSet);

    // given
View Full Code Here

  @SuppressWarnings("boxing")
  public void shouldReturnTrueWhenShortContentIsDifferent() throws Exception {
    // when
    byte[] localContent = "very long long content".getBytes("UTF-8");
    byte[] remoteContent = "very long long content".getBytes("UTF-8");
    GitSynchronizeData data = new GitSynchronizeData(repo, HEAD, HEAD, true);
    GitSynchronizeDataSet dataSet = new GitSynchronizeDataSet(data);
    GitResourceVariantComparator grvc = new GitResourceVariantComparator(
        dataSet);

    // given
View Full Code Here

    // when
    byte[] localContent = new byte[8192];
    Arrays.fill(localContent, (byte) 'a');
    byte[] remoteContent = new byte[8192];
    Arrays.fill(remoteContent, (byte) 'a');
    GitSynchronizeData data = new GitSynchronizeData(repo, HEAD, HEAD, true);
    GitSynchronizeDataSet dataSet = new GitSynchronizeDataSet(data);
    GitResourceVariantComparator grvc = new GitResourceVariantComparator(
        dataSet);

    // given
View Full Code Here

        IResource.FORCE, new NullProgressMonitor());
  }

  private RemoteResourceMappingContext prepareContext(String srcRev,
      String dstRev) throws Exception {
    GitSynchronizeData gsd = new GitSynchronizeData(repo, srcRev, dstRev,
        true);
    GitSynchronizeDataSet gsds = new GitSynchronizeDataSet(gsd);
    GitResourceVariantTreeSubscriber subscriber = new GitResourceVariantTreeSubscriber(
        gsds);
    subscriber.init(new NullProgressMonitor());
View Full Code Here

    return commit;
  }

  protected GitSynchronizeData getGSD(Repository repo) throws IOException {
    return new GitSynchronizeData(repo, Constants.HEAD,
        Constants.HEAD, true);
  }
View Full Code Here

  @Test
  public void shouldIgnoreEmptyRepositories() throws Exception {
    // given
    touchAndSubmit("second commit");
    GitSynchronizeDataSet gsds = new GitSynchronizeDataSet();
    gsds.add(new GitSynchronizeData(repo1, HEAD, HEAD + "^1", false));
    gsds.add(new GitSynchronizeData(repo2, HEAD, HEAD, false));

    // when
    GitModelRoot root = new GitModelRoot(gsds);

    // then
View Full Code Here

  @Test
  public void shouldReturnOneRoot() throws Exception {
    // when
    new Git(repo).commit().setAuthor("JUnit", "junit@egit.org")
        .setMessage("Initial commit").call();
    GitSynchronizeData data = new GitSynchronizeData(repo, HEAD, HEAD,
        false);
    GitSynchronizeDataSet dataSet = new GitSynchronizeDataSet(data);

    // given
    GitResourceVariantTree grvt = new GitTestResourceVariantTree(dataSet,
View Full Code Here

      IProject secondIProject = secondProject.project;
      // add connect project with repository
      new ConnectProviderOperation(secondIProject, gitDir).execute(null);
      new Git(repo).commit().setAuthor("JUnit", "junit@egit.org")
          .setMessage("Initial commit").call();
      GitSynchronizeData data = new GitSynchronizeData(repo, HEAD, HEAD,
          false);
      GitSynchronizeDataSet dataSet = new GitSynchronizeDataSet(data);

      // given
      GitResourceVariantTree grvt = new GitTestResourceVariantTree(dataSet,
View Full Code Here

TOP

Related Classes of org.eclipse.egit.core.synchronize.dto.GitSynchronizeData$RemoteAndMerge

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.