@Test public void parseEmpty() throws Exception { History result = instance.parse(""); assertNotNull(result); assertNotNull(result.getHistoryEntries()); assertTrue("Should not contain any history entries", 0 == result.getHistoryEntries().size()); }
History parse(File file, String sinceRevision) throws HistoryException { try { Executor executor = repository.getHistoryLogExecutor(file, sinceRevision); int status = executor.exec(true, this); if (status != 0) { throw new HistoryException("Failed to get history for: \"" + file.getAbsolutePath() + "\" Exit code: " + status); } } catch (IOException e) { throw new HistoryException("Failed to get history for: \"" + file.getAbsolutePath() + "\"", e); } if (sinceRevision != null) { repository.removeAndVerifyOldestChangeset(entries, sinceRevision); } return new History(entries); }
BazaarHistoryParser implements Executor.StreamHandler { History parse(File file, String sinceRevision) throws HistoryException { try { Executor executor = repository.getHistoryLogExecutor(file, sinceRevision); int status = executor.exec(true, this); if (status != 0) { throw new HistoryException("Failed to get history for: \"" + file.getAbsolutePath() + "\" Exit code: " + status); } } catch (IOException e) { throw new HistoryException("Failed to get history for: \"" + file.getAbsolutePath() + "\"", e); } if (sinceRevision != null) { repository.removeAndVerifyOldestChangeset(entries, sinceRevision); } return new History(entries); } }
BazaarHistoryParser implements Executor.StreamHandler { History parse(File file, String sinceRevision) throws HistoryException { try { Executor executor = repository.getHistoryLogExecutor(file, sinceRevision); int status = executor.exec(true, this); if (status != 0) { throw new HistoryException("Failed to get history for: \"" + file.getAbsolutePath() + "\" Exit code: " + status); } } catch (IOException e) { throw new HistoryException("Failed to get history for: \"" + file.getAbsolutePath() + "\"", e); } if (sinceRevision != null) { repository.removeAndVerifyOldestChangeset(entries, sinceRevision); } return new History(entries); } BazaarHistoryParser(BazaarRepository repository); }
BazaarHistoryParser implements Executor.StreamHandler { History parse(File file, String sinceRevision) throws HistoryException { try { Executor executor = repository.getHistoryLogExecutor(file, sinceRevision); int status = executor.exec(true, this); if (status != 0) { throw new HistoryException("Failed to get history for: \"" + file.getAbsolutePath() + "\" Exit code: " + status); } } catch (IOException e) { throw new HistoryException("Failed to get history for: \"" + file.getAbsolutePath() + "\"", e); } if (sinceRevision != null) { repository.removeAndVerifyOldestChangeset(entries, sinceRevision); } return new History(entries); } BazaarHistoryParser(BazaarRepository repository); @Override void processStream(InputStream input); }
BazaarHistoryParser implements Executor.StreamHandler { History parse(File file, String sinceRevision) throws HistoryException { try { Executor executor = repository.getHistoryLogExecutor(file, sinceRevision); int status = executor.exec(true, this); if (status != 0) { throw new HistoryException("Failed to get history for: \"" + file.getAbsolutePath() + "\" Exit code: " + status); } } catch (IOException e) { throw new HistoryException("Failed to get history for: \"" + file.getAbsolutePath() + "\"", e); } if (sinceRevision != null) { repository.removeAndVerifyOldestChangeset(entries, sinceRevision); } return new History(entries); } BazaarHistoryParser(BazaarRepository repository); @Override void processStream(InputStream input);  }