<commit_before>{%extends "issue_base.html"%}
{%block body%}

<script language="JavaScript" type="text/javascript"><!--
function keyPressIntermediary(evt) {
  return M_keyPress(evt);
}
document.onkeypress = keyPressIntermediary;
{%if user%}
logged_in = true;
{%else%}
logged_in = false;
login_warned = false;
{%endif%}
// -->
</script>

{%if user%}
<!-- Form used by in-line comment JS; XXX filled in by JS code -->
<form id="dainlineform" style="display: none;"
      action="{%url codereview.views.inline_draft%}" method="post">
  <div class="comment-border" name="form-container">
    <input type="hidden" name="snapshot" value="XXX">
    <input type="hidden" name="lineno" value="XXX">
    <input type="hidden" name="side" value="XXX">
    <input type="hidden" name="issue" value="{{issue.key.id}}">
    <input type="hidden" name="ps_left" value="{{ps_left.key.id}}">
    <input type="hidden" name="patch_left" value="{{patch_left.key.id}}">
    <input type="hidden" name="ps_right" value="{{ps_right.key.id}}">
    <input type="hidden" name="patch_right" value="{{patch_right.key.id}}">
    <textarea name="text" cols="60" rows="5"></textarea><br>
    <input type="submit" name="save" value="Save"
           onclick="return M_submitInlineComment(this.form);">
    <input type="reset" name="cancel" value="Cancel"
           onclick="M_removeTempInlineComment(this.form)">
  </div>
  <div class="comment-border" style="padding: 0pt;"></div>
</form>
<a id="resizer" style="display:none;cursor:pointer"><img src="/static/zippyplus.gif"></a>
{%endif%}

<div style="float: left;">
  <h2 style="margin-bottom: 0em; margin-top: 0em;">Delta Between Two Patch Sets: {{patch_right.filename}}</h2>
  <div style="margin-top: .2em;"><b>Issue <a href="{%url codereview.views.show issue.key.id%}" onmouseover="M_showPopUp(this, 'popup-issue');">{{issue.key.id}}</a>:</b>
  {{issue.subject}} {%if issue.closed %} (Closed) {%endif%}
  {%if issue.base%}<span class="extra">SVN Base: {{issue.base}}</span>{%endif%}</div>
  <div style="margin-top: .4em;">
    <b>Left Patch Set: {%if ps_left.message%}{{ps_left.message}}{%endif%}</b>
    <span class="extra">
    Created {{ps_left.created|timesince}} ago
    {%ifnotequal ps_left.owner issue.owner%}
    by <b>{{ps_left.owner|show_user}}</b>{%endifnotequal%}
    {%if ps_left.url%},
    Downloaded from: <a href="{{ps_left.url}}">{{ps_left.url}}</a>
    {%endif%}
    </span>
  </div>
  <div style="margin-top: .4em;">
    <b>Right Patch Set: {%if ps_right.message%}{{ps_right.message}}{%endif%}</b>
    <span class="extra">
    Created {{ps_right.created|timesince}} ago
    {%ifnotequal ps_right.owner issue.owner%}
    by <b>{{ps_right.owner|show_user}}</b>{%endifnotequal%}
    {%if ps_right.url%},
    Downloaded from: <a href="{{ps_right.url}}">{{ps_right.url}}</a>
    {%endif%}
    </span>
  </div>
  <div style="margin-top: .4em;" class="help">
    Use n/p to move between diff chunks;
    N/P to move between comments.
    {%if user%}
    Double-click a line to add a draft in-line comment.
    <br><span style="color:red">Draft comments are only viewable by you;</span>
    use <a href="{%url codereview.views.publish issue.key.id%}" class="novisit">Publish+Mail Comments</a> ('m') to let others view them.
    {%else%}
    Please Sign in to add in-line comments.
    {%endif%}
  </div>
</div>
<div style="float: right; color: #333333; background-color: #eeeeec; border: 1px solid lightgray; -moz-border-radius: 5px 5px 5px 5px; padding: 5px;">
  <div>{%include "context_select.html"%}</div>
  <div>
    Jump to: <select onchange="M_jumpToPatch(this, {{issue.key.id}}, {{patchset.key.id}});">
      {% for jump_patch in ps_right.patches %}
        <option value="{{jump_patch.key.id}}"
         {%ifequal jump_patch.key.id patch.key.id%} selected="selected"{%endifequal%}>{{jump_patch.filename}}</option>
      {% endfor %}
    </select>
  </div>
  <div>
    Left: <a href="{%url codereview.views.patch issue.key.id,ps_left.key.id,patch_left.key.id%}">
    View regular side by side diff</a><br/>
    Right: <a href="{%url codereview.views.patch issue.key.id,ps_right.key.id,patch_right.key.id%}">
    View regular side by side diff</a>
    {%if user%}
    <br/>
    <a class="novisit" href="{%url codereview.views.publish issue.key.id%}">Publish+Mail
    Comments</a> ('m')
    {%endif%}
  </div>
</div>
<div style="clear: both;"></div>


<div class="code" style="margin-top: 1.3em; display: table; margin-left: auto; margin-right: auto;">
<div class="codenav">
{%comment%}
For some reason,
{%url codereview.views.diff issue.key.id,patchset.key.id,patch.prev.key.id%}
doesn't work.  Go figure.  Bleah.  So use absolute URLs.
{%endcomment%}
{%if patch_right.prev%}
<a id="prevFile" 
   href="/{{issue.key.id}}/diff2/{{ps_left.key.id}}:{{ps_right.key.id}}/{{patch_right.prev.key.id}}">
&laquo; {{patch_right.prev.filename}}</a> ('k'){%else%}
<span class="disabled">&laquo; no previous file</span>{%endif%}<commit_msg>Fixed link on delta page that pointed to unified diff instead to side-by-side diff as labeled.<commit_after>{%extends "issue_base.html"%}
{%block body%}

<script language="JavaScript" type="text/javascript"><!--
function keyPressIntermediary(evt) {
  return M_keyPress(evt);
}
document.onkeypress = keyPressIntermediary;
{%if user%}
logged_in = true;
{%else%}
logged_in = false;
login_warned = false;
{%endif%}
// -->
</script>

{%if user%}
<!-- Form used by in-line comment JS; XXX filled in by JS code -->
<form id="dainlineform" style="display: none;"
      action="{%url codereview.views.inline_draft%}" method="post">
  <div class="comment-border" name="form-container">
    <input type="hidden" name="snapshot" value="XXX">
    <input type="hidden" name="lineno" value="XXX">
    <input type="hidden" name="side" value="XXX">
    <input type="hidden" name="issue" value="{{issue.key.id}}">
    <input type="hidden" name="ps_left" value="{{ps_left.key.id}}">
    <input type="hidden" name="patch_left" value="{{patch_left.key.id}}">
    <input type="hidden" name="ps_right" value="{{ps_right.key.id}}">
    <input type="hidden" name="patch_right" value="{{patch_right.key.id}}">
    <textarea name="text" cols="60" rows="5"></textarea><br>
    <input type="submit" name="save" value="Save"
           onclick="return M_submitInlineComment(this.form);">
    <input type="reset" name="cancel" value="Cancel"
           onclick="M_removeTempInlineComment(this.form)">
  </div>
  <div class="comment-border" style="padding: 0pt;"></div>
</form>
<a id="resizer" style="display:none;cursor:pointer"><img src="/static/zippyplus.gif"></a>
{%endif%}

<div style="float: left;">
  <h2 style="margin-bottom: 0em; margin-top: 0em;">Delta Between Two Patch Sets: {{patch_right.filename}}</h2>
  <div style="margin-top: .2em;"><b>Issue <a href="{%url codereview.views.show issue.key.id%}" onmouseover="M_showPopUp(this, 'popup-issue');">{{issue.key.id}}</a>:</b>
  {{issue.subject}} {%if issue.closed %} (Closed) {%endif%}
  {%if issue.base%}<span class="extra">SVN Base: {{issue.base}}</span>{%endif%}</div>
  <div style="margin-top: .4em;">
    <b>Left Patch Set: {%if ps_left.message%}{{ps_left.message}}{%endif%}</b>
    <span class="extra">
    Created {{ps_left.created|timesince}} ago
    {%ifnotequal ps_left.owner issue.owner%}
    by <b>{{ps_left.owner|show_user}}</b>{%endifnotequal%}
    {%if ps_left.url%},
    Downloaded from: <a href="{{ps_left.url}}">{{ps_left.url}}</a>
    {%endif%}
    </span>
  </div>
  <div style="margin-top: .4em;">
    <b>Right Patch Set: {%if ps_right.message%}{{ps_right.message}}{%endif%}</b>
    <span class="extra">
    Created {{ps_right.created|timesince}} ago
    {%ifnotequal ps_right.owner issue.owner%}
    by <b>{{ps_right.owner|show_user}}</b>{%endifnotequal%}
    {%if ps_right.url%},
    Downloaded from: <a href="{{ps_right.url}}">{{ps_right.url}}</a>
    {%endif%}
    </span>
  </div>
  <div style="margin-top: .4em;" class="help">
    Use n/p to move between diff chunks;
    N/P to move between comments.
    {%if user%}
    Double-click a line to add a draft in-line comment.
    <br><span style="color:red">Draft comments are only viewable by you;</span>
    use <a href="{%url codereview.views.publish issue.key.id%}" class="novisit">Publish+Mail Comments</a> ('m') to let others view them.
    {%else%}
    Please Sign in to add in-line comments.
    {%endif%}
  </div>
</div>
<div style="float: right; color: #333333; background-color: #eeeeec; border: 1px solid lightgray; -moz-border-radius: 5px 5px 5px 5px; padding: 5px;">
  <div>{%include "context_select.html"%}</div>
  <div>
    Jump to: <select onchange="M_jumpToPatch(this, {{issue.key.id}}, {{patchset.key.id}});">
      {% for jump_patch in ps_right.patches %}
        <option value="{{jump_patch.key.id}}"
         {%ifequal jump_patch.key.id patch.key.id%} selected="selected"{%endifequal%}>{{jump_patch.filename}}</option>
      {% endfor %}
    </select>
  </div>
  <div>
    Left: <a href="{%url codereview.views.diff issue.key.id,ps_left.key.id,patch_left.key.id%}">
    View regular side by side diff</a><br/>
    Right: <a href="{%url codereview.views.diff issue.key.id,ps_right.key.id,patch_right.key.id%}">
    View regular side by side diff</a>
    {%if user%}
    <br/>
    <a class="novisit" href="{%url codereview.views.publish issue.key.id%}">Publish+Mail
    Comments</a> ('m')
    {%endif%}
  </div>
</div>
<div style="clear: both;"></div>


<div class="code" style="margin-top: 1.3em; display: table; margin-left: auto; margin-right: auto;">
<div class="codenav">
{%comment%}
For some reason,
{%url codereview.views.diff issue.key.id,patchset.key.id,patch.prev.key.id%}
doesn't work.  Go figure.  Bleah.  So use absolute URLs.
{%endcomment%}
{%if patch_right.prev%}
<a id="prevFile" 
   href="/{{issue.key.id}}/diff2/{{ps_left.key.id}}:{{ps_right.key.id}}/{{patch_right.prev.key.id}}">
&laquo; {{patch_right.prev.filename}}</a> ('k'){%else%}
<span class="disabled">&laquo; no previous file</span>{%endif%}
{'fraction_non_alphanumeric': 0.2098370488853344, 'fraction_numerical': 0.0053983804858542435, 'mean_word_length': 4.591950810508664, 'pattern_counts': {'":': 0, '<': 189, '<?xml version=': 0, '>': 189, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3178267', 'n_tokens_mistral': 3767, 'n_tokens_neox': 3572, 'n_words': 758}