Package org.eclipse.jgit.blame

Examples of org.eclipse.jgit.blame.BlameGenerator.release()


      }
      return gen.computeBlameResult();
    } catch (IOException e) {
      throw new JGitInternalException(e.getMessage(), e);
    } finally {
      gen.release();
    }
  }
}
View Full Code Here


        blame.getResultContents().writeLine(outs, line);
        outs.flush();
        outw.print('\n');
      }
    } finally {
      generator.release();
      reader.release();
    }
  }

  private void parseLineRangeOption() {
View Full Code Here

      assertEquals(2, generator.getSourceEnd());
      assertEquals("file.txt", generator.getSourcePath());

      assertFalse(generator.next());
    } finally {
      generator.release();
    }
  }

  @Test
  public void testRenamedBoundLineDelete() throws Exception {
View Full Code Here

      assertEquals(2, generator.getSourceEnd());
      assertEquals(FILENAME_1, generator.getSourcePath());

      assertFalse(generator.next());
    } finally {
      generator.release();
    }

    // and test again with other BlameGenerator API:
    generator = new BlameGenerator(db, FILENAME_2);
    try {
View Full Code Here

      assertEquals(c1, result.getSourceCommit(2));
      assertEquals(FILENAME_1, result.getSourcePath(2));

    } finally {
      generator.release();
    }
  }

  @Test
  public void testLinesAllDeletedShortenedWalk() throws Exception {
View Full Code Here

      assertEquals(0, generator.getResultStart());
      assertEquals(3, generator.getResultEnd());

      assertFalse(generator.next());
    } finally {
      generator.release();
    }
  }

  private static String join(String... lines) {
    StringBuilder joined = new StringBuilder();
View Full Code Here

          outs.flush();
          outw.print('\n');
        } while (++line < end && blame.getSourceCommit(line) == c);
      }
    } finally {
      generator.release();
      reader.release();
    }
  }

  private int uniqueAbbrevLen(RevCommit commit) throws IOException {
View Full Code Here

      }
      return gen.computeBlameResult();
    } catch (IOException e) {
      throw new JGitInternalException(e.getMessage(), e);
    } finally {
      gen.release();
    }
  }

  private RawText getRawText(File inTree) throws IOException,
      FileNotFoundException {
View Full Code Here

      }
      return gen.computeBlameResult();
    } catch (IOException e) {
      throw new JGitInternalException(e.getMessage(), e);
    } finally {
      gen.release();
    }
  }
}
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.