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

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


    // 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

    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

    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

  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

    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

  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

    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

  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

  /**
   * 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

Related Classes of org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet

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.