Examples of lsRemote()


Examples of org.eclipse.jgit.api.Git.lsRemote()

    } catch (IOException e) {
      throw new ADCException("Error creating local file repo", e);
    }

    Git git = new Git(localRepo);
    LsRemoteCommand cmd = git.lsRemote().setRemote(repoURL);
    if (credentialsProvider != null) {
      cmd.setCredentialsProvider(credentialsProvider);
    }
    try {
      Collection<Ref> collection = cmd.call();
View Full Code Here

Examples of org.eclipse.jgit.api.Git.lsRemote()

            git = Git.open( fileSet.getBasedir() );
            CredentialsProvider credentials =
                JGitUtils.prepareSession( getLogger(), git, (GitScmProviderRepository) repo );

            List<ScmFile> list = new ArrayList<ScmFile>();
            Collection<Ref> lsResult = git.lsRemote().setCredentialsProvider( credentials ).call();
            for ( Ref ref : lsResult )
            {
                getLogger().debug( ref.getObjectId().getName() + "  " + ref.getTarget().getName() );
                list.add( new ScmFile( ref.getName(), ScmFileStatus.CHECKED_IN ) );
            }
View Full Code Here

Examples of org.eclipse.jgit.api.Git.lsRemote()

        {
            git = Git.open( fileSet.getBasedir() );
            CredentialsProvider credentials = JGitUtils.getCredentials( repo );

            LsRemoteCommand lsCommand =
                git.lsRemote().setRemote( repo.getPushUrl() ).setCredentialsProvider( credentials );

            Map<String, String> tag = new HashMap<String, String>();
            Collection<Ref> allTags = lsCommand.setHeads( false ).setTags( true ).call();
            for ( Ref ref : allTags )
            {
View Full Code Here

Examples of org.eclipse.jgit.api.Git.lsRemote()

   *            timeout is seconds; 0 means no timeout
   */
  public ListRemoteOperation(final Repository localDb, final URIish uri,
      int timeout) {
    Git git = new Git(localDb);
    rc = git.lsRemote();
    rc.setRemote(uri.toString()).setTimeout(timeout);
  }

  /**
   * @return collection of refs advertised by remote side.
View Full Code Here

Examples of org.eclipse.jgit.api.Git.lsRemote()

        File dir = tmp.newFolder();
        clone.setDirectory(dir);
        Git git = clone.call();

        // makes sure there's nothing in here
        Collection<Ref> remotes = git.lsRemote().setRemote("origin").call();
        assertEquals(0,remotes.size());

        File f = new File(dir, "src/org/acme/Foo.groovy");
        f.getParentFile().mkdirs();
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.