Package org.eclipse.egit.core.op

Examples of org.eclipse.egit.core.op.CloneOperation


    // let's get rid of the project
    project.delete(false, false, null);

    // let's clone repository1 to repository2
    URIish uri = repository1.getUri();
    CloneOperation clop = new CloneOperation(uri, true, null, workdir2,
        "refs/heads/master", "origin", 0);
    clop.run(null);

    Repository repo2 = Activator.getDefault().getRepositoryCache().lookupRepository(new File(workdir2,
        Constants.DOT_GIT));
    repository2 = new TestRepository(repo2);
    // we push to branch "test" of repository2
View Full Code Here


    TestUtil.disableProxy();
    remoteRepository = new SampleTestRepository(NUMBER_RANDOM_COMMITS, true);
    localRepoPath = new File(ResourcesPlugin.getWorkspace().getRoot()
        .getLocation().toFile(), "test" + System.nanoTime());
    String branch = Constants.R_HEADS + SampleTestRepository.FIX;
    CloneOperation cloneOperation = new CloneOperation(new URIish(
        remoteRepository.getUri()), true, null, localRepoPath, branch,
        "origin", 30);
    cloneOperation
        .setCredentialsProvider(new UsernamePasswordCredentialsProvider(
            "agitter", "letmein"));
    cloneOperation.run(null);
    file = new File(localRepoPath, SampleTestRepository.A_txt_name);
    assertTrue(file.exists());
    localRepository = Activator.getDefault().getRepositoryCache()
        .lookupRepository(new File(localRepoPath, ".git"));
    assertNotNull(localRepository);
View Full Code Here

    project.delete(false, false, null);

    // let's clone repository1 to repository2
    URIish uri = new URIish("file:///"
        + repository1.getRepository().getDirectory().toString());
    CloneOperation clop = new CloneOperation(uri, true, null, workdir2,
        "refs/heads/master", "origin", 0);
    clop.run(null);

    Repository existingRepo = Activator
        .getDefault()
        .getRepositoryCache()
        .lookupRepository(
View Full Code Here

TOP

Related Classes of org.eclipse.egit.core.op.CloneOperation

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.