Skip to content

Commit

Permalink
Revert "change NotebookRepo api to get note revision from Revision ob…
Browse files Browse the repository at this point in the history
…ject to String revId"

This reverts commit baaa704.
  • Loading branch information
Khalid Huseynov authored and Khalid Huseynov committed Jul 18, 2016
1 parent ce097ed commit aa0a7d6
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public Revision checkpoint(String noteId, String checkpointMsg, AuthenticationIn
}

@Override
public Note get(String noteId, String revId, AuthenticationInfo subject) throws IOException {
public Note get(String noteId, Revision rev, AuthenticationInfo subject) throws IOException {
// Auto-generated method stub
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public Revision checkpoint(String pattern, String commitMessage, AuthenticationI
* 4. apply stash on top and remove it
*/
@Override
public synchronized Note get(String noteId, String revId, AuthenticationInfo subject)
public synchronized Note get(String noteId, Revision rev, AuthenticationInfo subject)
throws IOException {
Note note = null;
RevCommit stash = null;
Expand All @@ -123,7 +123,7 @@ public synchronized Note get(String noteId, String revId, AuthenticationInfo sub
}
ObjectId head = git.getRepository().resolve(Constants.HEAD);
// checkout to target revision
git.checkout().setStartPoint(revId).addPath(noteId).call();
git.checkout().setStartPoint(rev.id).addPath(noteId).call();
// get the note
note = super.get(noteId, subject);
// checkout back to head
Expand All @@ -137,7 +137,7 @@ public synchronized Note get(String noteId, String revId, AuthenticationInfo sub
stashes.size());
}
} catch (GitAPIException e) {
LOG.error("Failed to return note from revision \"{}\"", revId, e);
LOG.error("Failed to return note from revision \"{}\"", rev.message, e);
}
return note;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public interface NotebookRepo {
* @return a Notebook
* @throws IOException
*/
@ZeppelinApi public Note get(String noteId, String revId, AuthenticationInfo subject)
@ZeppelinApi public Note get(String noteId, Revision rev, AuthenticationInfo subject)
throws IOException;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,12 @@ public Revision checkpoint(String noteId, String checkpointMsg, AuthenticationIn
}

@Override
public Note get(String noteId, String revId, AuthenticationInfo subject) {
public Note get(String noteId, Revision rev, AuthenticationInfo subject) {
Note revisionNote = null;
try {
revisionNote = getRepo(0).get(noteId, revId, subject);
revisionNote = getRepo(0).get(noteId, rev, subject);
} catch (IOException e) {
LOG.error("Failed to get revision {} of note {}", revId, noteId, e);
LOG.error("Failed to get revision {} of note {}", rev.id, noteId, e);
}
return revisionNote;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public Revision checkpoint(String noteId, String checkpointMsg, AuthenticationIn
}

@Override
public Note get(String noteId, String revId, AuthenticationInfo subject) throws IOException {
public Note get(String noteId, Revision rev, AuthenticationInfo subject) throws IOException {
// Auto-generated method stub
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public Revision checkpoint(String noteId, String checkpointMsg, AuthenticationIn
}

@Override
public Note get(String noteId, String revId, AuthenticationInfo subject) throws IOException {
public Note get(String noteId, Revision rev, AuthenticationInfo subject) throws IOException {
// Auto-generated method stub
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public Revision checkpoint(String noteId, String checkpointMsg, AuthenticationIn
}

@Override
public Note get(String noteId, String revId, AuthenticationInfo subject) throws IOException {
public Note get(String noteId, Revision rev, AuthenticationInfo subject) throws IOException {
// Auto-generated method stub
return null;
}
Expand Down

0 comments on commit aa0a7d6

Please sign in to comment.