Examples of RepositoryNotFoundException


Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

      public Repository open(HttpServletRequest req, String name)
          throws RepositoryNotFoundException,
          ServiceNotEnabledException {
        final FileRepository db = remoteRepository.getRepository();
        if (!name.equals(nameOf(db)))
          throw new RepositoryNotFoundException(name);

        db.incrementOpen();
        return db;
      }
    });
View Full Code Here

Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

    gs.setRepositoryResolver(new RepositoryResolver() {
      public Repository open(HttpServletRequest req, String name)
          throws RepositoryNotFoundException,
          ServiceNotEnabledException {
        if (!name.equals(srcName))
          throw new RepositoryNotFoundException(name);

        final Repository db = src.getRepository();
        db.incrementOpen();
        return db;
      }
View Full Code Here

Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

    gs.setRepositoryResolver(new RepositoryResolver() {
      public Repository open(HttpServletRequest req, String name)
          throws RepositoryNotFoundException,
          ServiceNotEnabledException {
        if (!name.equals(srcName))
          throw new RepositoryNotFoundException(name);

        final Repository db = src.getRepository();
        db.incrementOpen();
        return db;
      }
View Full Code Here

Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

  public Repository open(final HttpServletRequest req,
      final String repositoryName) throws RepositoryNotFoundException,
      ServiceNotEnabledException {
    if (isUnreasonableName(repositoryName))
      throw new RepositoryNotFoundException(repositoryName);

    final Repository db;
    try {
      final File gitdir = new File(basePath, repositoryName);
      db = RepositoryCache.open(FileKey.lenient(gitdir, FS.DETECTED), true);
    } catch (IOException e) {
      throw new RepositoryNotFoundException(repositoryName, e);
    }

    try {
      if (isExportOk(req, repositoryName, db)) {
        // We have to leak the open count to the caller, they
        // are responsible for closing the repository if we
        // complete successfully.
        return db;
      } else
        throw new ServiceNotEnabledException();

    } catch (RuntimeException e) {
      db.close();
      throw new RepositoryNotFoundException(repositoryName, e);

    } catch (IOException e) {
      db.close();
      throw new RepositoryNotFoundException(repositoryName, e);

    } catch (ServiceNotEnabledException e) {
      db.close();
      throw e;
    }
View Full Code Here

Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

    gs.setRepositoryResolver(new RepositoryResolver() {
      public Repository open(HttpServletRequest req, String name)
          throws RepositoryNotFoundException,
          ServiceNotEnabledException {
        if (!name.equals(srcName))
          throw new RepositoryNotFoundException(name);

        final Repository db = src.getRepository();
        db.incrementOpen();
        return db;
      }
View Full Code Here

Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

    gs.setRepositoryResolver(new RepositoryResolver() {
      public Repository open(HttpServletRequest req, String name)
          throws RepositoryNotFoundException,
          ServiceNotEnabledException {
        if (!name.equals(srcName))
          throw new RepositoryNotFoundException(name);

        final Repository db = src.getRepository();
        db.incrementOpen();
        return db;
      }
View Full Code Here

Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

   */
  @SuppressWarnings("unchecked")
  public R build() throws IOException {
    R repo = (R) new FileRepository(setup());
    if (isMustExist() && !repo.getObjectDatabase().exists())
      throw new RepositoryNotFoundException(getGitDir());
    return repo;
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

   */
  @Override
  public FileRepository build() throws IOException {
    FileRepository repo = new FileRepository(setup());
    if (isMustExist() && !repo.getObjectDatabase().exists())
      throw new RepositoryNotFoundException(getGitDir());
    return repo;
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

      } catch (TimeoutException e) {
        throw new DhtTimeoutException(MessageFormat.format(
            DhtText.get().timeoutLocatingRepository, name), e);
      }
      if (isMustExist() && r == null)
        throw new RepositoryNotFoundException(getRepositoryName());
      if (r != null)
        setRepositoryKey(r);
    }
    return self();
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

      return path;
    }

    public Repository open(final boolean mustExist) throws IOException {
      if (mustExist && !isGitRepository(path, fs))
        throw new RepositoryNotFoundException(path);
      return new FileRepository(path);
    }
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.