code: public static void displayHistory(List<HistoryEntry> history, boolean filter, Integer limitHistory) {
      if(history != null && history.size() > 0) {
        System.out.format("%7s|%7s|%12s|%7s|%14s|%52s|%18s|%42s|%24s|%6s|%6s|%6s|%6s\n", "Index", "Type", "Date", "Time", "User", "Repository", "Branch", "Revision", "Time Live", "Maint", "Revert", "Done", "Fail");
        for(int i=0; i<218; i++) {
          System.out.print("-");
        }
        System.out.println();
        boolean showing = false;
        for(HistoryEntry entry : history) {
          if(!filter || entry.isRevertible()) {
            if(limitHistory == null || limitHistory-- > 0) {
              showing = true;
              System.out.format("%7d|%7s|%4tm/%<2td/%<4tY|%<4tH:%<2tM|%14s|%52s|%18s|%42s|%24s|%6b|%6b|%6s|%6s\n",
                  entry.getIndex(),
                  entry.getType(),
                  entry.getTimestamp(),
                  entry.getOpenId(),
                  entry.getRepoUrl(),
                  entry.getBranch(),
                  entry.getRevision(),
                  formatTimeLive(entry.getTimeLive() == 0 ? System.currentTimeMillis() - entry.getTimestamp().getTime() : entry.getTimeLive()),
                  entry.isMaintenance(),
                  entry.isRevertible(),
                  entry.isFinished(),
                  entry.isFailed());
              printComments(entry.getComment());
            }
          }
        }
        if(!showing) {
          System.out.println("No history to show");
        }
      } else {
        System.out.println("No history to show");
      }
    }
docs: Displays a list of {@link HistoryEntry} objects.
  @param history The list of entries to display.
  @param filter If true then only revertable history entries will be displayed.
  @param limitHistory If set this will limit the number of history entries to display.