Reverting to older versions
---------------------------

We look at a folder

    >>> browser = Browser(url)
    >>> browser.open('@@zodbbrowser_path_to_oid?path=/rbcbc')
    >>> browser.open(browser.json['url'])

The latest version (i.e. the one we're looking at) has a strange attribute

    >>> printCSSPath(browser, 'div.attributes strong')
    <strong>__name__</strong>
    <strong>__parent__</strong>
    <strong>data</strong>
    <strong>random_attribute</strong>

    >>> printCSSPath(browser, 'div.history h4.transaction')
    <h4 class="transaction">
      <a class="title" href="@@zodbbrowser?oid=XX">
        Latest
      </a>
    </h4>
    <h4 class="transaction" id="tidXXXXXXXXXXXXXXXXXX">
      <a class="subtitle" href="@@zodbbrowser_history?tid=XXXXXXXXXXXXXXXXXX">
        view transaction record
      </a>
      <a class="title" href="@@zodbbrowser?oid=XX&amp;tid=XXXXXXXXXXXXXXXXXX">
        #2:
        <span class="timestamp" title="UTC">YYYY-MM-DD HH:MM:SS</span>
        <span class="user" title="user from site None"></span>
        <span class="location" title="request type None"></span>
        <span class="description">
          createTestDataForRollbackCanBeCancelled (2)
        </span>
      </a>
    </h4>
    <h4 class="transaction" id="tidXXXXXXXXXXXXXXXXXX">
      <a class="subtitle" href="@@zodbbrowser_history?tid=XXXXXXXXXXXXXXXXXX">
        view transaction record
      </a>
      <a class="title" href="@@zodbbrowser?oid=XX&amp;tid=XXXXXXXXXXXXXXXXXX">
        #1:
        <span class="timestamp" title="UTC">YYYY-MM-DD HH:MM:SS</span>
        <span class="user" title="user from site None"></span>
        <span class="location" title="request type None"></span>
        <span class="description">
          createTestDataForRollbackCanBeCancelled (1)
        </span>
      </a>
    </h4>

Let's revert to the older version without it.

    >>> browser.getControl('Revert to this state').click()

We get a confirmation prompt, since this is a potentially dangerous operation

    >>> printCSSPath(browser, 'h3')
    <h3>
      Revert to old state as of YYYY-MM-DD HH:MM:SS.SSSSSS?
    </h3>

    >>> printCSSPath(browser, '.message')
    <p class="message">
      This is a dangerous operation that may break data integrity. Are you really sure you want to do this?
    </p>

maybe we'd better not:

    >>> browser.getControl('Cancel').click()

and here we are, unchanged:

    >>> printCSSPath(browser, 'div.attributes strong')
    <strong>__name__</strong>
    <strong>__parent__</strong>
    <strong>data</strong>
    <strong>random_attribute</strong>

    >>> printCSSPath(browser, 'div.history h4.transaction')
    <h4 class="transaction">
      <a class="title" href="@@zodbbrowser?oid=XX">
        Latest
      </a>
    </h4>
    <h4 class="transaction" id="tidXXXXXXXXXXXXXXXXXX">
      <a class="subtitle" href="@@zodbbrowser_history?tid=XXXXXXXXXXXXXXXXXX">
        view transaction record
      </a>
      <a class="title" href="@@zodbbrowser?oid=XX&amp;tid=XXXXXXXXXXXXXXXXXX">
        #2:
        <span class="timestamp" title="UTC">YYYY-MM-DD HH:MM:SS</span>
        <span class="user" title="user from site None"></span>
        <span class="location" title="request type None"></span>
        <span class="description">
          createTestDataForRollbackCanBeCancelled (2)
        </span>
      </a>
    </h4>
    <h4 class="transaction" id="tidXXXXXXXXXXXXXXXXXX">
      <a class="subtitle" href="@@zodbbrowser_history?tid=XXXXXXXXXXXXXXXXXX">
        view transaction record
      </a>
      <a class="title" href="@@zodbbrowser?oid=XX&amp;tid=XXXXXXXXXXXXXXXXXX">
        #1:
        <span class="timestamp" title="UTC">YYYY-MM-DD HH:MM:SS</span>
        <span class="user" title="user from site None"></span>
        <span class="location" title="request type None"></span>
        <span class="description">
          createTestDataForRollbackCanBeCancelled (1)
        </span>
      </a>
    </h4>

