Tabnine Logo
RevCommitList
Code IndexAdd Tabnine to your IDE (free)

How to use
RevCommitList
in
org.eclipse.jgit.revwalk

Best Java code snippets using org.eclipse.jgit.revwalk.RevCommitList (Showing top 20 results out of 315)

origin: org.eclipse.jgit/org.eclipse.jgit

  return;
enter(size, (E) c);
add((E) c);
      return;
    enter(size++, (E) c);
    dst[index++] = c;
origin: org.eclipse.jgit/org.eclipse.jgit

  throws MissingObjectException, IncorrectObjectTypeException,
  IOException {
applyFlag(matching, flag, 0, size());
origin: org.eclipse.jgit/org.eclipse.jgit

/**
 * Remove the given flag from all commits.
 * <p>
 * Same as <code>clearFlag(flag, 0, size())</code>, but without the
 * incremental behavior.
 *
 * @param flag
 *            the flag to remove. Applications are responsible for
 *            allocating this flag from the source RevWalk.
 */
public void clearFlag(RevFlag flag) {
  clearFlag(flag, 0, size());
}
origin: org.eclipse.jgit/org.eclipse.jgit

/**
 * Find the next commit that has the given flag set.
 *
 * @param flag
 *            the flag to test commits against.
 * @param begin
 *            first commit index to test at. Applications may wish to begin
 *            at 0, to test the first commit in the list.
 * @return index of the first commit at or after index <code>begin</code>
 *         that has the specified flag set on it; -1 if no match is found.
 */
public int indexOf(RevFlag flag, int begin) {
  while (begin < size()) {
    int index = begin;
    Block s = contents;
    while (s.shift > 0) {
      final int i = index >> s.shift;
      index -= i << s.shift;
      s = (Block) s.contents[i];
    }
    while (begin++ < size() && index < BLOCK_SIZE) {
      final RevCommit c = (RevCommit) s.contents[index++];
      if (c.has(flag))
        return begin;
    }
  }
  return -1;
}
origin: org.eclipse.jgit/org.eclipse.jgit

private void parseReachable(ObjectId id) {
  try {
    RevCommit o = walk.parseCommit(id);
    if (!o.has(REACHABLE)) {
      o.add(REACHABLE);
      reachableCommits.add(o);
    }
  } catch (IOException readError) {
    // If we cannot read the value of the ref skip it.
  }
}
origin: org.eclipse.jgit/org.eclipse.jgit

/**
 * Remove the given flag from all commits.
 * <p>
 * This method is actually implemented in terms of:
 * <code>applyFlag(RevFilter.NONE, flag, rangeBegin, rangeEnd)</code>.
 *
 * @param flag
 *            the flag to remove. Applications are responsible for
 *            allocating this flag from the source RevWalk.
 * @param rangeBegin
 *            first commit within the list to begin testing at, inclusive.
 *            Must not be negative, but may be beyond the end of the list.
 * @param rangeEnd
 *            last commit within the list to end testing at, exclusive. If
 *            smaller than or equal to <code>rangeBegin</code> then no
 *            commits will be tested.
 */
public void clearFlag(final RevFlag flag, final int rangeBegin,
    final int rangeEnd) {
  try {
    applyFlag(RevFilter.NONE, flag, rangeBegin, rangeEnd);
  } catch (IOException e) {
    // Never happen. The filter we use does not throw any
    // exceptions, for any reason.
  }
}
origin: org.eclipse.jgit/org.eclipse.jgit

/** {@inheritDoc} */
@Override
public void source(RevWalk w) {
  if (!(w instanceof PlotWalk))
    throw new ClassCastException(MessageFormat.format(JGitText.get().classCastNotA, PlotWalk.class.getName()));
  super.source(w);
}
origin: org.eclipse.jgit/org.eclipse.jgit

/** {@inheritDoc} */
@Override
public void clear() {
  super.clear();
  positionsAllocated = 0;
  freePositions.clear();
  activeLanes.clear();
  laneLength.clear();
}
origin: org.eclipse.jgit/org.eclipse.jgit

reachableCommits = new RevCommitList<>();
REACHABLE = walk.newFlag("REACHABLE"); //$NON-NLS-1$
COMMON = walk.newFlag("COMMON"); //$NON-NLS-1$
origin: org.eclipse.jgit/org.eclipse.jgit

/**
 * Find the next commit that has the given flag set.
 *
 * @param flag
 *            the flag to test commits against.
 * @param begin
 *            first commit index to test at. Applications may wish to begin
 *            at <code>size()-1</code>, to test the last commit in the
 *            list.
 * @return index of the first commit at or before index <code>begin</code>
 *         that has the specified flag set on it; -1 if no match is found.
 */
public int lastIndexOf(RevFlag flag, int begin) {
  begin = Math.min(begin, size() - 1);
  while (begin >= 0) {
    int index = begin;
    Block s = contents;
    while (s.shift > 0) {
      final int i = index >> s.shift;
      index -= i << s.shift;
      s = (Block) s.contents[i];
    }
    while (begin-- >= 0 && index >= 0) {
      final RevCommit c = (RevCommit) s.contents[index--];
      if (c.has(flag))
        return begin;
    }
  }
  return -1;
}
origin: org.eclipse.jgit/org.eclipse.jgit

reachableCommits.add(c);
origin: berlam/github-bucket

/**
 * Remove the given flag from all commits.
 * <p>
 * This method is actually implemented in terms of:
 * <code>applyFlag(RevFilter.NONE, flag, rangeBegin, rangeEnd)</code>.
 *
 * @param flag
 *            the flag to remove. Applications are responsible for
 *            allocating this flag from the source RevWalk.
 * @param rangeBegin
 *            first commit within the list to begin testing at, inclusive.
 *            Must not be negative, but may be beyond the end of the list.
 * @param rangeEnd
 *            last commit within the list to end testing at, exclusive. If
 *            smaller than or equal to <code>rangeBegin</code> then no
 *            commits will be tested.
 */
public void clearFlag(final RevFlag flag, final int rangeBegin,
    final int rangeEnd) {
  try {
    applyFlag(RevFilter.NONE, flag, rangeBegin, rangeEnd);
  } catch (IOException e) {
    // Never happen. The filter we use does not throw any
    // exceptions, for any reason.
  }
}
origin: sonia.jgit/org.eclipse.jgit

@Override
public void source(final RevWalk w) {
  if (!(w instanceof PlotWalk))
    throw new ClassCastException(MessageFormat.format(JGitText.get().classCastNotA, PlotWalk.class.getName()));
  super.source(w);
}
origin: sonia.jgit/org.eclipse.jgit

@Override
public void clear() {
  super.clear();
  positionsAllocated = 0;
  freePositions.clear();
  activeLanes.clear();
  laneLength.clear();
}
origin: sonia.jgit/org.eclipse.jgit

reachableCommits = new RevCommitList<RevCommit>();
REACHABLE = walk.newFlag("REACHABLE"); //$NON-NLS-1$
COMMON = walk.newFlag("COMMON"); //$NON-NLS-1$
origin: org.eclipse.jgit/org.eclipse.jgit

  return;
enter(size, (E) c);
add((E) c);
      return;
    enter(size++, (E) c);
    dst[index++] = c;
origin: sonia.jgit/org.eclipse.jgit

/**
 * Remove the given flag from all commits.
 * <p>
 * Same as <code>clearFlag(flag, 0, size())</code>, but without the
 * incremental behavior.
 *
 * @param flag
 *            the flag to remove. Applications are responsible for
 *            allocating this flag from the source RevWalk.
 */
public void clearFlag(final RevFlag flag) {
  clearFlag(flag, 0, size());
}
origin: berlam/github-bucket

  throws MissingObjectException, IncorrectObjectTypeException,
  IOException {
applyFlag(matching, flag, 0, size());
origin: org.eclipse.jgit/org.eclipse.jgit

  IncorrectObjectTypeException, IOException {
final RevWalk w = flag.getRevWalk();
rangeEnd = Math.min(rangeEnd, size());
while (rangeBegin < rangeEnd) {
  int index = rangeBegin;
origin: berlam/github-bucket

private void parseReachable(ObjectId id) {
  try {
    RevCommit o = walk.parseCommit(id);
    if (!o.has(REACHABLE)) {
      o.add(REACHABLE);
      reachableCommits.add(o);
    }
  } catch (IOException readError) {
    // If we cannot read the value of the ref skip it.
  }
}
org.eclipse.jgit.revwalkRevCommitList

Javadoc

An ordered list of org.eclipse.jgit.revwalk.RevCommit subclasses.

Most used methods

  • add
  • applyFlag
    Apply a flag to all commits matching the specified filter. This version allows incremental testing a
  • clearFlag
    Remove the given flag from all commits. This method is actually implemented in terms of:applyFlag(Re
  • enter
    Optional callback invoked when commits enter the list by fillTo. This method is only called during #
  • size
  • <init>
  • clear
  • source
    Set the revision walker this list populates itself from.

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (Timer)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now