Examples of addFetchRefSpec()


Examples of org.eclipse.jgit.transport.RemoteConfig.addFetchRefSpec()

    Repository repository = lookupRepository(repositoryFile);
    StoredConfig config = repository.getConfig();
    RemoteConfig remoteConfig = new RemoteConfig(config, "origin");
    remoteConfig.addURI(new URIish(childRepository.getDirectory().getParentFile().toURI().toURL()));
    remoteConfig.addFetchRefSpec(new RefSpec("+refs/heads/*:refs/remotes/origin/*"));
    remoteConfig.update(config);

    config.setString(ConfigConstants.CONFIG_BRANCH_SECTION, "master", ConfigConstants.CONFIG_KEY_REMOTE, "origin");
    config.setString(ConfigConstants.CONFIG_BRANCH_SECTION, "master", ConfigConstants.CONFIG_KEY_MERGE, "refs/heads/master");
    config.save();
View Full Code Here

Examples of org.eclipse.jgit.transport.RemoteConfig.addFetchRefSpec()

        + config.getName();
    RefSpec refSpec = new RefSpec();
    refSpec = refSpec.setForceUpdate(true);
    refSpec = refSpec.setSourceDestination(Constants.R_HEADS + "*", dst + "/*"); //$NON-NLS-1$ //$NON-NLS-2$

    config.addFetchRefSpec(refSpec);
    config.update(clonedRepo.getConfig());

    clonedRepo.getConfig().save();

    // run the fetch command
View Full Code Here

Examples of org.eclipse.jgit.transport.RemoteConfig.addFetchRefSpec()

    RefSpec refSpec = new RefSpec();
    refSpec = refSpec.setForceUpdate(true);
    refSpec = refSpec.setSourceDestination(
        Constants.R_HEADS + "*", dst + "/*"); //$NON-NLS-1$ //$NON-NLS-2$

    config.addFetchRefSpec(refSpec);
    config.update(clonedRepo.getConfig());

    clonedRepo.getConfig().save();

    // run the fetch command
View Full Code Here

Examples of org.eclipse.jgit.transport.RemoteConfig.addFetchRefSpec()

        + config.getName() + "/") + "*"; //$NON-NLS-1$//$NON-NLS-2$
    RefSpec refSpec = new RefSpec();
    refSpec = refSpec.setForceUpdate(true);
    refSpec = refSpec.setSourceDestination(Constants.R_HEADS + "*", dst); //$NON-NLS-1$

    config.addFetchRefSpec(refSpec);
    config.update(clonedRepo.getConfig());

    clonedRepo.getConfig().save();

    // run the fetch command
View Full Code Here

Examples of org.eclipse.jgit.transport.RemoteConfig.addFetchRefSpec()

        logger.flushLog();

        // save remote
        final RemoteConfig rc = new RemoteConfig(repo.getConfig(), "origin");
        rc.addURI(uri);
        rc.addFetchRefSpec(new RefSpec().setForceUpdate(true).setSourceDestination(Constants.R_HEADS + "*",
                Constants.R_REMOTES + "origin" + "/*"));
        rc.update(repo.getConfig());
        repo.getConfig().save();
    }

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.