Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.ObjectReader.release()


      // Return stashed commit
      return parseCommit(reader, commitId);
    } catch (IOException e) {
      throw new JGitInternalException(JGitText.get().stashFailed, e);
    } finally {
      reader.release();
    }
  }
}
View Full Code Here


          failingPaths.put(fileName,
              MergeFailureReason.COULD_NOT_DELETE);
        modifiedFiles.add(fileName);
      }
    } finally {
      r.release();
    }
  }

  private void createDir(File f) throws IOException {
    if (!f.isDirectory() && !f.mkdirs()) {
View Full Code Here

      // Return stashed commit
      return parseCommit(reader, commitId);
    } catch (IOException e) {
      throw new JGitInternalException(JGitText.get().stashFailed, e);
    } finally {
      reader.release();
    }
  }
}
View Full Code Here

    } catch (JGitInternalException e) {
      throw e;
    } catch (IOException e) {
      throw new JGitInternalException(JGitText.get().stashApplyFailed, e);
    } finally {
      reader.release();
    }
  }

  /**
   * @param applyIndex
View Full Code Here

      // commit the index builder - a new index is persisted
      if (!builder.commit())
        throw new IndexWriteException();
    } finally {
      objectReader.release();
    }
    return toBeDeleted.size() == 0;
  }

  private static boolean isSamePrefix(String a, String b) {
View Full Code Here

      DirCacheEntry entry) throws IOException {
    ObjectReader or = repository.newObjectReader();
    try {
      checkoutEntry(repository, f, entry, repository.newObjectReader());
    } finally {
      or.release();
    }
  }

  /**
   * Updates the file in the working tree with content and mode from an entry
View Full Code Here

      IncorrectObjectTypeException, CorruptObjectException, IOException {
    ObjectReader reader = db.newObjectReader();
    try {
      return forPath(reader, path, trees);
    } finally {
      reader.release();
    }
  }

  /**
   * Open a tree walk and filter to exactly one path.
View Full Code Here

                    CanonicalTreeParser p = new CanonicalTreeParser();
                    ObjectReader reader = repo.newObjectReader();
                    try {
                        p.reset( reader, head );
                    } finally {
                        reader.release();
                    }
                    oldTree = p;
                }
                newTree = new DirCacheIterator( repo.readDirCache() );
            } else {
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.