GitNotebookRepo extends VFSNotebookRepo { @Override public List<Revision> revisionHistory(String noteId, AuthenticationInfo subject) { List<Revision> 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 Revision(log.getName(), log.getShortMessage(), log.getCommitTime())); LOG.debug(" - ({},{},{})", log.getName(), log.getCommitTime(), log.getFullMessage()); } } catch (NoHeadException e) { LOG.warn("No Head found for {}, {}", noteId, e.getMessage()); } catch (GitAPIException e) { LOG.error("Failed to get logs for {}", noteId, e); } return history; } GitNotebookRepo(ZeppelinConfiguration conf); @Override synchronized void save(Note note, AuthenticationInfo subject); @Override Revision checkpoint(String pattern, String commitMessage, AuthenticationInfo subject); @Override Note get(String noteId, Revision rev, AuthenticationInfo subject); @Override List<Revision> revisionHistory(String noteId, AuthenticationInfo subject); @Override void close();  }
@Test public void showNotebookHistory() throws GitAPIException, IOException { notebookRepo = new GitNotebookRepo(conf); assertThat(notebookRepo.list(null)).isNotEmpty(); List<Revision> testNotebookHistory = notebookRepo.revisionHistory(TEST_NOTE_ID, null); assertThat(testNotebookHistory).isEmpty(); }