<commit_before><!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="layout.html" />
  <xi:include href="macros.html" />

  <head>
    <title>
      <py:choose>
        <py:when test="ticket.exists">
          #${ticket.id} (ticket.summary)
        </py:when>
        <py:otherwise>
          New Ticket
        </py:otherwise>
      </py:choose>
    </title>
    <script type="text/javascript" src="${chrome.htdocs_location}js/wikitoolbar.js"></script>
    <script type="text/javascript" py:choose="">
      $(document).ready(function() {
        $("div.description").find("h1,h2,h3,h4,h5,h6").addAnchor("Link to this section");
      <py:when test="ticket.exists">
        $("#changelog h3.change").addAnchor("Link to this change");

        /* only enable control elements for the currenly selected action */
        var actions = $("fieldset[@id='action']//input[@name='action']");
        /* ... as Opera doesn't like $("#action input[@name=action]") */

        function updateActionFields() {
          actions.each(function () {
            $(this).siblings().find("*[@id]").enable($(this).checked());
            $(this).siblings().filter("*[@id]").enable($(this).checked());
          });
        }
        actions.click(updateActionFields);
        updateActionFields();
      </py:when>
      <py:otherwise>
        $(document).ready(function() {$("#field-summary").get(0).focus()});
      </py:otherwise>
      });
    </script>
  </head>

  <body>
    <div id="ctxtnav" class="nav" py:with="links = chrome.links">
      <h2>Ticket Navigation</h2>
      ${prevnext_nav('Ticket', 'Back to Query')}
    </div>

    <py:def function="commentref(prefix, cnum)">
      <a href="#comment:$cnum"><small>$prefix$cnum</small></a>
    </py:def>

    <py:def function="display_change(change)">
      <ul py:if="change.fields" class="changes">
        <li py:for="field_name, field in change.fields.items()">
          <strong>${field_name}</strong>
          <py:choose>
            <py:when test="field_name == 'attachment'">
              <a href="${href.attachment('ticket', ticket.id, field.new)}"><em>${field.new}</em></a> added
            </py:when>
            <py:when test="'rendered' in field">${field.rendered}</py:when>
            <py:when test="field.old and field.new">
              changed from <em>${field.old}</em> to <em>${field.new}</em>
            </py:when>
            <py:when test="not field.old and field.new">
              set to <em>${field.new}</em>
            </py:when>
            <py:otherwise>deleted</py:otherwise>
          </py:choose>
        </li>
      </ul>
      <div py:if="'comment' in change" class="comment searchable" xml:space="preserve">
        ${wiki_to_html(context, change.comment, escape_newlines=True)}
      </div>
    </py:def>

    <div id="content" class="ticket" py:with="preview_mode = 'preview' in req.args">
      <h1>
        <py:choose>
          <py:when test="ticket.exists">
            <a py:strip="not version and version != 0" href="${href.ticket(ticket.id)}">
              Ticket #${ticket.id}
            </a>
          </py:when>
          <py:otherwise>
            Create New Ticket
          </py:otherwise>
        </py:choose>

        <py:if test="ticket.exists">
          <span class="status">(${ticket.status} <py:if
              test="ticket.type">${ticket.type}</py:if><py:if
              test="ticket.resolution">: ${ticket.resolution}</py:if>)</span>
          <py:choose test="">
            <py:when test="version is None" />
            <py:when test="version == 0">
              &mdash; at <a href="#comment:description">Initial Version</a>
            </py:when>
            <py:otherwise>
              &mdash; at <a href="#comment:$version">Version $version</a>
            </py:otherwise>
          </py:choose>
        </py:if>
      </h1>

      <!-- Do not show the ticket (pre)view when the user first comes to the "New Ticket" page.
           Wait until they hit preview. -->
      <fieldset id="preview" py:strip="not preview_mode">
        <py:if test="preview_mode">
          <legend>Preview (<a href="#${ticket.exists and 'edit' or 'properties'}">skip</a>)</legend>

          <!-- Preview of ticket changes -->
          <div py:if="change_preview" id="ticketchange" class="ticketdraft">
            <h3 class="change" id="${'cnum' in change_preview and 'comment:%d' % change_preview.cnum or None}">
              <span class="threading" py:if="'replyto' in change_preview">
                in reply to: ${commentref('&darr;&nbsp;', change_preview.replyto)}
              </span>
              Changed by ${authorinfo(change_preview.author)}
            </h3>
            ${display_change(change_preview)}<commit_msg>Fix white space in ticket <h1> title when there's no ticket type set.<commit_after><!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="layout.html" />
  <xi:include href="macros.html" />

  <head>
    <title>
      <py:choose>
        <py:when test="ticket.exists">
          #${ticket.id} (ticket.summary)
        </py:when>
        <py:otherwise>
          New Ticket
        </py:otherwise>
      </py:choose>
    </title>
    <script type="text/javascript" src="${chrome.htdocs_location}js/wikitoolbar.js"></script>
    <script type="text/javascript" py:choose="">
      $(document).ready(function() {
        $("div.description").find("h1,h2,h3,h4,h5,h6").addAnchor("Link to this section");
      <py:when test="ticket.exists">
        $("#changelog h3.change").addAnchor("Link to this change");

        /* only enable control elements for the currenly selected action */
        var actions = $("fieldset[@id='action']//input[@name='action']");
        /* ... as Opera doesn't like $("#action input[@name=action]") */

        function updateActionFields() {
          actions.each(function () {
            $(this).siblings().find("*[@id]").enable($(this).checked());
            $(this).siblings().filter("*[@id]").enable($(this).checked());
          });
        }
        actions.click(updateActionFields);
        updateActionFields();
      </py:when>
      <py:otherwise>
        $(document).ready(function() {$("#field-summary").get(0).focus()});
      </py:otherwise>
      });
    </script>
  </head>

  <body>
    <div id="ctxtnav" class="nav" py:with="links = chrome.links">
      <h2>Ticket Navigation</h2>
      ${prevnext_nav('Ticket', 'Back to Query')}
    </div>

    <py:def function="commentref(prefix, cnum)">
      <a href="#comment:$cnum"><small>$prefix$cnum</small></a>
    </py:def>

    <py:def function="display_change(change)">
      <ul py:if="change.fields" class="changes">
        <li py:for="field_name, field in change.fields.items()">
          <strong>${field_name}</strong>
          <py:choose>
            <py:when test="field_name == 'attachment'">
              <a href="${href.attachment('ticket', ticket.id, field.new)}"><em>${field.new}</em></a> added
            </py:when>
            <py:when test="'rendered' in field">${field.rendered}</py:when>
            <py:when test="field.old and field.new">
              changed from <em>${field.old}</em> to <em>${field.new}</em>
            </py:when>
            <py:when test="not field.old and field.new">
              set to <em>${field.new}</em>
            </py:when>
            <py:otherwise>deleted</py:otherwise>
          </py:choose>
        </li>
      </ul>
      <div py:if="'comment' in change" class="comment searchable" xml:space="preserve">
        ${wiki_to_html(context, change.comment, escape_newlines=True)}
      </div>
    </py:def>

    <div id="content" class="ticket" py:with="preview_mode = 'preview' in req.args">
      <h1>
        <py:choose>
          <py:when test="ticket.exists">
            <a py:strip="not version and version != 0" href="${href.ticket(ticket.id)}">
              Ticket #${ticket.id}
            </a>
          </py:when>
          <py:otherwise>
            Create New Ticket
          </py:otherwise>
        </py:choose>

        <py:if test="ticket.exists">
          <span class="status">(${ticket.status}<py:if
              test="ticket.type"> ${ticket.type}</py:if><py:if
              test="ticket.resolution">: ${ticket.resolution}</py:if>)</span>
          <py:choose test="">
            <py:when test="version is None" />
            <py:when test="version == 0">
              &mdash; at <a href="#comment:description">Initial Version</a>
            </py:when>
            <py:otherwise>
              &mdash; at <a href="#comment:$version">Version $version</a>
            </py:otherwise>
          </py:choose>
        </py:if>
      </h1>

      <!-- Do not show the ticket (pre)view when the user first comes to the "New Ticket" page.
           Wait until they hit preview. -->
      <fieldset id="preview" py:strip="not preview_mode">
        <py:if test="preview_mode">
          <legend>Preview (<a href="#${ticket.exists and 'edit' or 'properties'}">skip</a>)</legend>

          <!-- Preview of ticket changes -->
          <div py:if="change_preview" id="ticketchange" class="ticketdraft">
            <h3 class="change" id="${'cnum' in change_preview and 'comment:%d' % change_preview.cnum or None}">
              <span class="threading" py:if="'replyto' in change_preview">
                in reply to: ${commentref('&darr;&nbsp;', change_preview.replyto)}
              </span>
              Changed by ${authorinfo(change_preview.author)}
            </h3>
            ${display_change(change_preview)}
{'fraction_non_alphanumeric': 0.18836509528585757, 'fraction_numerical': 0.006519558676028084, 'mean_word_length': 2.393805309734513, 'pattern_counts': {'":': 0, '<': 220, '<?xml version=': 0, '>': 220, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7639391', 'n_tokens_mistral': 3252, 'n_tokens_neox': 3071, 'n_words': 587}