code: public List<InternalDocumentRevision> getPathForNode(long sequence) {
          Misc.checkArgument(sequenceMap.containsKey(sequence),
                  "DocumentRevision for that sequence must be in the tree already.");
          DocumentRevisionNode l = sequenceMap.get(sequence);
          List<InternalDocumentRevision> r = new LinkedList<InternalDocumentRevision>();
          while(l != null) {
              r.add(l.getData());
              if(l.getData().getParent() > 0) {
                  l = sequenceMap.get(l.getData().getParent());
              } else {
                  l = null;
              }
          }
  
          return r;
      }
docs: <p>Returns the path (list of {@code DocumentRevision}s) from the revision with
  the given sequence number to the root of the tree containing the
  revision.</p>
  
  <p>The list of revisions is in order of appearance in the tree, where
  the first revision is the given {@code DocumentRevision} and the last revision
  is the root of the tree.</p>
  
  @param sequence sequence of the starting revision
  @return list of {@code DocumentRevision}s from the revision with {@code sequence}
  to the root of the revision's tree.