Package org.eclipse.egit.core.project

Examples of org.eclipse.egit.core.project.RepositoryMapping


    assertNotNull(RepositoryMapping.getMapping(bbImported));

    IProject cImported = root.getProject("c");
    createdProjects.add(cImported);
    assertTrue(cImported.exists());
    RepositoryMapping cMapping = RepositoryMapping.getMapping(cImported);
    assertNotNull(cMapping);
    assertEquals("stable", cMapping.getRepository().getBranch());
  }
View Full Code Here


    IProject xaImported = root.getProject("xa");
    createdProjects.add(xaImported);
    assertTrue(xaImported.exists());
    assertEquals(root.getLocation().append("x/xa"), xaImported.getLocation());
    RepositoryMapping xaMapping = RepositoryMapping.getMapping(xaImported);
    assertNotNull(xaMapping);
    assertEquals("master", xaMapping.getRepository().getBranch());

    IProject xbImported = root.getProject("xb");
    createdProjects.add(xbImported);
    assertTrue(xbImported.exists());
    assertEquals(root.getLocation().append("x_stable/xb"), xbImported.getLocation());
    RepositoryMapping xbMapping = RepositoryMapping.getMapping(xbImported);
    assertNotNull(xbMapping);
    assertEquals("stable", xbMapping.getRepository().getBranch());
  }
View Full Code Here

        "some text");
    AddToIndexOperation addToIndexOperation = new AddToIndexOperation(
        new IResource[] { project.getProject().getFile("file.txt") });
    addToIndexOperation.execute(null);

    RepositoryMapping mapping = RepositoryMapping.getMapping(project
        .getProject());
    IPath gitDirAbsolutePath = mapping.getGitDirAbsolutePath();
    Repository db = FileRepositoryBuilder.create(gitDirAbsolutePath
        .toFile());
    DirCache index = DirCache.read(db.getIndexFile(), db.getFS());
    assertNotNull(index.getEntry("P/Project-1/file.txt"));
    db.close();
View Full Code Here

      IProject[] projects = ResourcesPlugin.getWorkspace().getRoot()
          .getProjects();
      Set<IProject> toRefresh = new HashSet<IProject>();
      synchronized (repositoriesChanged) {
        for (IProject p : projects) {
          RepositoryMapping mapping = RepositoryMapping.getMapping(p);
          if (mapping != null
              && repositoriesChanged.contains(mapping
                  .getRepository())) {
            toRefresh.add(p);
          }
        }
        repositoriesChanged.clear();
View Full Code Here

    final TreeWalk treeWalk = new TreeWalk(repository);
    treeWalk.addTree(new AdaptableFileTreeIterator(repository, root));
    treeWalk.setRecursive(true);

    final IFile eclipseFile = project.getProject().getFile(file.getName());
    final RepositoryMapping mapping = RepositoryMapping
        .getMapping(eclipseFile);
    final Set<String> repositoryPaths = Collections.singleton(mapping
        .getRepoRelativePath(eclipseFile));

    assertEquals(1, repositoryPaths.size());
    treeWalk.setFilter(PathFilterGroup.createFromStrings(repositoryPaths));
View Full Code Here

    project2.open(null);
    gitDir2 = new File(project2.getLocation().toFile().getAbsoluteFile(), Constants.DOT_GIT);
    repository2 = FileRepositoryBuilder.create(gitDir2);
    repository2.create();

    RepositoryMapping mapping = new RepositoryMapping(project, gitDir);
    RepositoryMapping mapping2 = new RepositoryMapping(project2, gitDir2);

    GitProjectData projectData = new GitProjectData(project);
    GitProjectData projectData2 = new GitProjectData(project2);
    projectData.setRepositoryMappings(Collections.singletonList(mapping));
    projectData.store();
View Full Code Here

TOP

Related Classes of org.eclipse.egit.core.project.RepositoryMapping

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.