Package org.eclipse.jgit.revwalk

Examples of org.eclipse.jgit.revwalk.RevWalk.dispose()


      RevCommit commit = rw.lookupCommit(commitId);
      return rw.isMergedInto(commit, tip);
    } catch (Exception e) {
      LOGGER.error("Failed to determine isMergedInto", e);
    } finally {
      rw.dispose();
    }
    return false;
  }

  /**
 
View Full Code Here


      }
      return mergeBase.getName();
    } catch (Exception e) {
      LOGGER.error("Failed to determine merge base", e);
    } finally {
      rw.dispose();
    }
    return null;
  }

  public static enum MergeStatus {
View Full Code Here

      RevWalk walk = new RevWalk(repository);
      walk.sort(RevSort.REVERSE);
      RevCommit head = walk.parseCommit(branchObject);
      walk.markStart(head);
      commit = walk.next();
      walk.dispose();
    } catch (Throwable t) {
      error(t, repository, "{0} failed to determine first commit");
    }
    return commit;
  }
View Full Code Here

      commit = rev;
    } catch (Throwable t) {
      error(t, repository, "{0} failed to get commit {1}", objectId);
    } finally {
      if (walk != null) {
        walk.dispose();
      }
    }
    return commit;
  }
View Full Code Here

    } catch (Throwable t) {
      if (throwError) {
        error(t, repository, "{0} can't find {1} in tree {2}", path, tree.name());
      }
    } finally {
      rw.dispose();
      tw.release();
    }
    return content;
  }
View Full Code Here

      ObjectLoader ldr = repository.open(blob.getId(), Constants.OBJ_BLOB);
      content = ldr.getCachedBytes();
    } catch (Throwable t) {
      error(t, repository, "{0} can't find blob {1}", objectId);
    } finally {
      rw.dispose();
    }
    return content;
  }

  /**
 
View Full Code Here

      RevTree baseTree;
      if (baseCommit == null) {
        if (commit.getParentCount() > 0) {
          final RevWalk rw = new RevWalk(repository);
          RevCommit parent = rw.parseCommit(commit.getParent(0).getId());
          rw.dispose();
          baseTree = parent.getTree();
        } else {
          // FIXME initial commit. no parent?!
          baseTree = commitTree;
        }
View Full Code Here

      }
      return getDiffStat(repository, baseCommit, tipCommit, null);
    } catch (Exception e) {
      LOGGER.error("failed to generate diffstat!", e);
    } finally {
      revWalk.dispose();
    }
    return null;
  }

  public static DiffStat getDiffStat(Repository repository, RevCommit commit) {
View Full Code Here

      success = true;
    } catch (IOException e) {
      error(e, repository, "{0} failed to zip files from commit {1}", commit.getName());
    } finally {
      tw.release();
      rw.dispose();
    }
    return success;
  }

  /**
 
View Full Code Here

      success = true;
    } catch (IOException e) {
      error(e, repository, "{0} failed to {1} stream files from commit {2}", algorithm, commit.getName());
    } finally {
      tw.release();
      rw.dispose();
    }
    return success;
  }
}
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.