Package org.eclipse.jgit.lib.RepositoryCache

Examples of org.eclipse.jgit.lib.RepositoryCache.FileKey


      File dir = FileKey.resolve(new File(base, name), FS.DETECTED);
      if (dir == null)
        continue;

      try {
        FileKey key = FileKey.exact(dir, FS.DETECTED);
        db = RepositoryCache.open(key, true);
      } catch (IOException e) {
        throw new RepositoryNotFoundException(name, e);
      }
View Full Code Here


  }

  private AlternateHandle openAlternate(File objdir) throws IOException {
    final File parent = objdir.getParentFile();
    if (FileKey.isGitRepository(parent, fs)) {
      FileKey key = FileKey.exact(parent, fs);
      FileRepository db = (FileRepository) RepositoryCache.open(key);
      return new AlternateRepository(db);
    }

    ObjectDirectory db = new ObjectDirectory(config, objdir, null, fs, null);
View Full Code Here

      throw new RepositoryNotFoundException("Invalid name: " + name);
    }
    if (!names.contains(name)) {
      throw new RepositoryNotFoundException(gitDirOf(name));
    }
    final FileKey loc = FileKey.lenient(gitDirOf(name), FS.DETECTED);
    try {
      return RepositoryCache.open(loc);
    } catch (IOException e1) {
      final RepositoryNotFoundException e2;
      e2 = new RepositoryNotFoundException("Cannot open repository " + name);
View Full Code Here

    if (isUnreasonableName(name)) {
      throw new RepositoryNotFoundException("Invalid name: " + name);
    }

    File dir = FileKey.resolve(gitDirOf(name), FS.DETECTED);
    FileKey loc;
    if (dir != null) {
      // Already exists on disk, use the repository we found.
      //
      loc = FileKey.exact(dir, FS.DETECTED);
View Full Code Here

  @Override
  protected void run() throws Exception {
    final org.eclipse.jgit.transport.UploadPack up;

    try {
      FileKey key = FileKey.lenient(srcGitdir, FS.DETECTED);
      db = key.open(true /* must exist */);
    } catch (RepositoryNotFoundException notFound) {
      throw die(MessageFormat.format(CLIText.get().notAGitRepository,
          srcGitdir.getPath()));
    }

View Full Code Here

  @Override
  protected void run() throws Exception {
    final org.eclipse.jgit.transport.ReceivePack rp;

    try {
      FileKey key = FileKey.lenient(dstGitdir, FS.DETECTED);
      db = key.open(true /* must exist */);
    } catch (RepositoryNotFoundException notFound) {
      throw die(MessageFormat.format(CLIText.get().notAGitRepository,
          dstGitdir.getPath()));
    }

View Full Code Here

  }

  private AlternateHandle openAlternate(File objdir) throws IOException {
    final File parent = objdir.getParentFile();
    if (FileKey.isGitRepository(parent, fs)) {
      FileKey key = FileKey.exact(parent, fs);
      FileRepository db = (FileRepository) RepositoryCache.open(key);
      return new AlternateRepository(db);
    }

    ObjectDirectory db = new ObjectDirectory(config, objdir, null, fs);
View Full Code Here

    if (dir == null)
      return null;

    Repository r = null;
    try {
      FileKey key = FileKey.exact(dir, FS.DETECTED);
      r = RepositoryCache.open(key, true);
    } catch (IOException e) {
      if (logError) {
        logger.error("GitBlit.getRepository(String) failed to find "
            + new File(repositoriesFolder, repositoryName).getAbsolutePath());
View Full Code Here

    if (dir == null)
      return null;

    Repository r = null;
    try {
      FileKey key = FileKey.exact(dir, FS.DETECTED);
      r = RepositoryCache.open(key, true);
    } catch (IOException e) {
      if (logError) {
        logger.error("GitBlit.getRepository(String) failed to find "
            + new File(repositoriesFolder, repositoryName).getAbsolutePath());
View Full Code Here

  @Override
  protected void run() throws Exception {
    final org.eclipse.jgit.transport.UploadPack up;

    try {
      FileKey key = FileKey.lenient(srcGitdir, FS.DETECTED);
      db = key.open(true /* must exist */);
    } catch (RepositoryNotFoundException notFound) {
      throw die(MessageFormat.format(CLIText.get().notAGitRepository,
          srcGitdir.getPath()));
    }

View Full Code Here

TOP

Related Classes of org.eclipse.jgit.lib.RepositoryCache.FileKey

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.