GitNotebookRepo extends VFSNotebookRepo implements NotebookRepoWithVersionControl { @Override public List<Revision> revisionHistory(String noteId, String notePath, AuthenticationInfo subject) throws IOException { List<Revision> history = Lists.newArrayList(); String noteFileName = buildNoteFileName(noteId, notePath); LOGGER.debug("Listing history for {}:", noteFileName); try { Iterable<RevCommit> logs = git.log().addPath(noteFileName).call(); for (RevCommit log: logs) { history.add(new Revision(log.getName(), log.getShortMessage(), log.getCommitTime())); LOGGER.debug(" - ({},{},{})", log.getName(), log.getCommitTime(), log.getFullMessage()); } } catch (NoHeadException e) { LOGGER.warn("No Head found for {}, {}", noteFileName, e.getMessage()); } catch (GitAPIException e) { LOGGER.error("Failed to get logs for {}", noteFileName, e); } return history; } GitNotebookRepo(); @VisibleForTesting  GitNotebookRepo(ZeppelinConfiguration conf); @Override void init(ZeppelinConfiguration conf); @Override void move(String noteId,
                   String notePath,
                   String newNotePath,
                   AuthenticationInfo subject); @Override void move(String folderPath, String newFolderPath,
                   AuthenticationInfo subject); @Override Revision checkpoint(String noteId,
                             String notePath,
                             String commitMessage,
                             AuthenticationInfo subject); @Override synchronized Note get(String noteId,
                               String notePath,
                               String revId,
                               AuthenticationInfo subject); @Override List<Revision> revisionHistory(String noteId,
                                        String notePath,
                                        AuthenticationInfo subject); @Override Note setNoteRevision(String noteId, String notePath, String revId,
                              AuthenticationInfo subject); @Override void close();  }
@Test public void showNotebookHistoryEmptyTest() throws GitAPIException, IOException { notebookRepo = new GitNotebookRepo(conf); assertThat(notebookRepo.list(null)).isNotEmpty(); List<Revision> testNotebookHistory = notebookRepo.revisionHistory(TEST_NOTE_ID, TEST_NOTE_PATH, null); assertThat(testNotebookHistory).isEmpty(); }