Package org.eclipse.jgit.transport

Examples of org.eclipse.jgit.transport.URIish


      final String[] tokens = reference.split(Pattern.quote(SEPARATOR));
      if (tokens.length != 4)
        throw new IllegalArgumentException("InvalidTokensCount: "
            + tokens.length + " for " + tokens);

      this.repository = new URIish(tokens[1]);
      if (!"".equals(tokens[2])) //$NON-NLS-1$
        this.branch = tokens[2];
      this.projectDir = tokens[3];
    }
View Full Code Here


  @Override
  protected void run() throws Exception {
    if (localName != null && gitdir != null)
      throw die(CLIText.get().conflictingUsageOf_git_dir_andArguments);

    final URIish uri = new URIish(sourceUri);
    if (localName == null) {
      try {
        localName = uri.getHumanishName();
      } catch (IllegalArgumentException e) {
        throw die(MessageFormat.format(CLIText.get().cannotGuessLocalNameFrom, sourceUri));
      }
    }
    if (gitdir == null)
View Full Code Here

  private static String nameOf(final FileRepository db) {
    return db.getDirectory().getName();
  }

  public void testRepositoryNotFound_Dumb() throws Exception {
    URIish uri = toURIish("/dumb.none/not-found");
    Repository dst = createBareRepository();
    Transport t = Transport.open(dst, uri);
    try {
      try {
        t.openFetch();
View Full Code Here

      t.close();
    }
  }

  public void testRepositoryNotFound_Smart() throws Exception {
    URIish uri = toURIish("/smart.none/not-found");
    Repository dst = createBareRepository();
    Transport t = Transport.open(dst, uri);
    try {
      try {
        t.openFetch();
View Full Code Here

    assertNotNull("has " + Constants.HEAD, head);
    assertEquals(Q, head.getObjectId());
  }

  public void testListRemote_Smart_WithQueryParameters() throws Exception {
    URIish myURI = toURIish("/snone/do?r=1&p=test.git");
    Repository dst = createBareRepository();
    Transport t = Transport.open(dst, myURI);
    try {
      try {
        t.openFetch();
View Full Code Here

    return new TestRepository<FileRepository>(createBareRepository());
  }

  protected URIish toURIish(String path) throws URISyntaxException {
    URI u = server.getURI().resolve(path);
    return new URIish(u.toString());
  }
View Full Code Here

      transport.setDryRun(dryRun);

      final Collection<RemoteRefUpdate> toPush = transport
          .findRemoteRefUpdatesFor(refSpecs);

      final URIish uri = transport.getURI();
      final PushResult result;
      try {
        result = transport.push(new TextProgressMonitor(), toPush);
      } finally {
        transport.close();
View Full Code Here

   * @throws GitAPIException
   */
  public Git call() throws GitAPIException, InvalidRemoteException,
      org.eclipse.jgit.api.errors.TransportException {
    try {
      URIish u = new URIish(uri);
      Repository repository = init(u);
      FetchResult result = fetch(repository, u);
      if (!noCheckout)
        checkout(repository, result);
      return new Git(repository);
View Full Code Here

    newCommand.fetchResult = fetchResult;
    return newCommand;
  }

  public void fetch() throws GitAPIException, IOException, URISyntaxException {
    URIish u = new URIish(uri);
    fetchResult = fetch(repository, u);
  }
View Full Code Here

  public Repository getRepository() {
    return repository;
  }

  public void init() throws GitAPIException, IOException, URISyntaxException {
    URIish u = new URIish(uri);
    repository = init(u);
    fetchResult = fetch(repository, u);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.transport.URIish

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.