  public Changeset getChangeset(Repository repository, String revision)
          throws RepositoryException, IOException, NotSupportedFeatuerException
  {
    AssertUtil.assertIsNotNull(repository);
    ChangesetViewer viewer = repositoryManager.getChangesetViewer(repository);
    if (viewer == null)
    {
      throw new NotSupportedFeatuerException(
          "ChangesetViewer is not supported for type ".concat(
            repository.getType()));
    }
    Changeset changeset = null;
    ChangesetViewerCacheKey key =
      new ChangesetViewerCacheKey(repository.getId(), -1, -1);
    ChangesetPagingResult result = cache.get(key);
    if (result == null)
    {
      changeset = viewer.getChangeset(revision);
      if (changeset != null)
      {
        callPreProcessors(changeset);
        callPreProcessorFactories(repository, changeset);
        result = new ChangesetPagingResult(1, Arrays.asList(changeset));
        cache.put(key, result);
      }
      else
      {
        throw new RepositoryException("could not find changeset");
      }
    }
    else
    {
      if (logger.isDebugEnabled())
      {
        logger.debug("fetch changesetviewer result from cache");
      }
      changeset = result.getChangesets().get(0);
    }
    return changeset;
  }

  public Changeset getChangeset(Repository repository, String revision)
          throws RepositoryException, IOException, NotSupportedFeatuerException
  {
    AssertUtil.assertIsNotNull(repository);
    ChangesetViewer viewer = repositoryManager.getChangesetViewer(repository);
    if (viewer == null)
    {
      throw new NotSupportedFeatuerException(
          "ChangesetViewer is not supported for type ".concat(
            repository.getType()));
    }
    Changeset changeset = null;
    ChangesetViewerCacheKey key =
      new ChangesetViewerCacheKey(repository.getId(), null, revision, -1, -1);
    ChangesetPagingResult result = cache.get(key);
    if (result == null)
    {
      changeset = viewer.getChangeset(revision);
      if (changeset != null)
      {
        callPreProcessors(changeset);
        callPreProcessorFactories(repository, changeset);
        result = new ChangesetPagingResult(1, Arrays.asList(changeset));
        cache.put(key, result);
      }
      else
      {
        throw new RepositoryException("could not find changeset");
      }
    }
    else
    {
      if (logger.isDebugEnabled())
      {
        logger.debug("fetch changesetviewer result from cache");
      }
      changeset = result.getChangesets().get(0);
    }
    return changeset;
  }
