Examples of CommitFilter


Examples of org.gitective.core.filter.commit.CommitFilter

   * @throws Exception
   */
  @Test
  public void matchChildrenNotIncluding() throws Exception {
    final AtomicReference<RevCommit> visited = new AtomicReference<RevCommit>();
    CommitFilter filter = new CommitFilter() {

      public boolean include(RevWalk walker, RevCommit cmit)
          throws StopWalkException, MissingObjectException,
          IncorrectObjectTypeException, IOException {
        visited.set(cmit);
View Full Code Here

Examples of org.gitective.core.filter.commit.CommitFilter

   * @throws Exception
   */
  @Test
  public void multiMatchChildrenNotIncluding() throws Exception {
    final AtomicReference<RevCommit> visited1 = new AtomicReference<RevCommit>();
    CommitFilter filter1 = new CommitFilter() {

      public boolean include(RevWalk walker, RevCommit cmit)
          throws StopWalkException, MissingObjectException,
          IncorrectObjectTypeException, IOException {
        visited1.set(cmit);
        return false;
      }

      public RevFilter clone() {
        return this;
      }
    };
    final AtomicReference<RevCommit> visited2 = new AtomicReference<RevCommit>();
    CommitFilter filter2 = new CommitFilter() {

      public boolean include(RevWalk walker, RevCommit cmit)
          throws StopWalkException, MissingObjectException,
          IncorrectObjectTypeException, IOException {
        visited2.set(cmit);
View Full Code Here

Examples of org.gitective.core.filter.commit.CommitFilter

  @Test
  public void matcherThrowsIOException() throws Exception {
    add("test.txt", "content");
    CommitFinder finder = new CommitFinder(testRepo);
    final IOException exception = new IOException("message");
    finder.setFilter(new CommitFilter() {

      public boolean include(RevWalk walker, RevCommit cmit)
          throws IOException {
        throw exception;
      }
View Full Code Here

Examples of org.gitective.core.filter.commit.CommitFilter

  @Test
  public void suppressedStopWalkExceptionThrownByMatcher() throws Exception {
    add("test.txt", "content");
    CommitFinder finder = new CommitFinder(testRepo);
    CommitCountFilter count = new CommitCountFilter();
    finder.setFilter(new AndCommitFilter(new CommitFilter() {

      public boolean include(RevWalk walker, RevCommit cmit)
          throws IOException {
        throw StopWalkException.INSTANCE;
      }
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.