private long validateRevisionNumber() throws VcsException {
    long revision = myCommandListener.getCommittedRevision();

    if (revision < 0) {
      throw new VcsException("Wrong committed revision number: " + revision);
    }

    return revision;
  }