GitNotebookRepo extends VFSNotebookRepo implements NotebookRepoVersioned { @Override public List<Rev> history(String noteId) { List<Rev> history = Lists.newArrayList(); LOG.debug("Listing history for {}:", noteId); try { Iterable<RevCommit> logs = git.log().addPath(noteId).call(); for (RevCommit log: logs) { history.add(new Rev(log.getName(), log.getCommitTime())); LOG.debug(" - ({},{})", log.getName(), log.getCommitTime()); } } catch (GitAPIException e) { LOG.error("Failed to get logs for {}", noteId, e); } return history; } GitNotebookRepo(ZeppelinConfiguration conf); @Override synchronized void save(Note note); @Override Note get(String noteId, String rev); @Override List<Rev> history(String noteId); @Override void close();  }
@Test public void showNotebookHistory() throws GitAPIException, IOException { notebookRepo = new GitNotebookRepo(conf); assertThat(notebookRepo.list()).isNotEmpty(); List<Rev> testNotebookHistory = notebookRepo.history(TEST_NOTE_ID); assertThat(testNotebookHistory).isNotEmpty(); }