Examples of GitSynchronizeDataSet


Examples of org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet

      IProgressMonitor monitor) throws CoreException {
    GitModelObject[] children = ((GitModelObjectContainer) getModelObject())
        .getChildren();
    Set<ResourceTraversal> result = new LinkedHashSet<ResourceTraversal>();

    final GitSynchronizeDataSet dataSet;
    if (context instanceof GitSubscriberResourceMappingContext)
      dataSet = ((GitSubscriberResourceMappingContext) context)
          .getSyncData();
    else
      dataSet = null;
View Full Code Here

Examples of org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet

    // 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
    IFile local = mock(IFile.class);
View Full Code Here

Examples of org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet

    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
    IFile local = mock(IFile.class);
View Full Code Here

Examples of org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet

    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
    IFile local = mock(IFile.class);
View Full Code Here

Examples of org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet

  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
    IFile local = mock(IFile.class);
View Full Code Here

Examples of org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet

    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
    IFile local = mock(IFile.class);
View Full Code Here

Examples of org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet

  private IMergeContext prepareContext(IFile workspaceFile, String srcRev,
      String dstRev) throws Exception {
    GitSynchronizeData gsd = new GitSynchronizeData(repo, srcRev, dstRev,
        true, Collections.<IResource> singleton(workspaceFile));
    GitSynchronizeDataSet gsds = new GitSynchronizeDataSet(gsd);
    GitResourceVariantTreeSubscriber subscriber = new GitResourceVariantTreeSubscriber(
        gsds);
    subscriber.init(new NullProgressMonitor());

    ResourceMapping mapping = AdapterUtils.adapt(workspaceFile,
View Full Code Here

Examples of org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet

    ResourceMapping[] mappings = allMappings
        .toArray(new ResourceMapping[allMappings.size()]);

    GitSynchronizeData gsd = new GitSynchronizeData(repo, srcRev, dstRev,
        true, includedResources);
    GitSynchronizeDataSet gsds = new GitSynchronizeDataSet(gsd);
    GitResourceVariantTreeSubscriber subscriber = new GitResourceVariantTreeSubscriber(
        gsds);
    subscriber.init(new NullProgressMonitor());

    GitSubscriberResourceMappingContext resourceMappingContext = new GitSubscriberResourceMappingContext(
View Full Code Here

Examples of org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet

  private GitResourceVariantTreeSubscriber createGitResourceVariantTreeSubscriber(
      String src, String dst, boolean includeLocal) throws IOException {
    GitSynchronizeData gsd = new GitSynchronizeData(
        testRepo.getRepository(), src, dst, includeLocal);
    GitSynchronizeDataSet gsds = new GitSynchronizeDataSet(gsd);
    return new GitResourceVariantTreeSubscriber(gsds);
  }
View Full Code Here

Examples of org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet

  /**
   * Creates {@link GitRepositoryProviderType}
   */
  public GitRepositoryProviderType() {
    GitSynchronizeDataSet set = new GitSynchronizeDataSet();
    try {
      Repository[] repositories = Activator.getDefault()
          .getRepositoryCache().getAllRepositories();
      for (Repository repository : repositories) {
        if (!repository.isBare()) {
          GitSynchronizeData data = new GitSynchronizeData(
              repository, Constants.HEAD, Constants.HEAD, true);
          set.add(data);
        }
      }
    } catch (IOException e) {
      // do nothing
    }
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.