code: public void revertToRevision(final String resourceName, final long backToRevision) throws JaxRxException,
          TTException {
          ISession session = null;
          INodeWriteTrx wtx = null;
          boolean abort = false;
          try {
              session = mDatabase.getSession(new SessionConfiguration(resourceName, StandardSettings.KEY));
              wtx = new NodeWriteTrx(session, session.beginBucketWtx(), HashKind.Rolling);
              wtx.revertTo(backToRevision);
              wtx.commit();
          } catch (final TTException exce) {
              abort = true;
              throw new JaxRxException(exce);
          } finally {
              WorkerHelper.closeWTX(abort, wtx, session);
          }
      }
docs: This method reverts the latest revision data to the requested.
  
  @param resourceName
  The name of the XML resource.
  @param backToRevision
  The revision value, which has to be set as the latest.
  @throws WebApplicationException
  @throws TTException