~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/templates/revisionfilechanges.pt

Merge the "don't run template on HEAD requests" branch.

This should stop us from getting OOPS during HEAD requests from haproxy
(bug #701329). It also should mean that at least most HEAD requests stop
returning body content (bug #716201), and that we perform less total work
to return HEAD info (bug #716217).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<tal:block>
2
 
  <tr tal:repeat="added entry/changes/added">
3
 
    <th class="files">
4
 
      <tal:block condition="repeat/added/start">
5
 
        files added:
6
 
      </tal:block>
7
 
    </th>
8
 
    <td class="files"
9
 
        tal:define="filename python:added[0];
10
 
                    file_id  python:added[1]">
11
 
      <a tal:attributes="href  python:url(['/annotate', entry.revid], file_id=file_id);
12
 
                         title string:Annotate ${filename}"
13
 
         tal:content="filename" class="filename">
14
 
        filename
15
 
      </a>
16
 
    </td>
17
 
  </tr>
18
 
  <tr tal:repeat="removed entry/changes/removed">
19
 
    <th class="files">
20
 
      <tal:block condition="repeat/removed/start">
21
 
        files removed:
22
 
      </tal:block>
23
 
    </th>
24
 
    <td class="files"
25
 
        tal:define="filename python:removed[0];
26
 
                    file_id  python:removed[1]">
27
 
      <a tal:attributes="href  python:url(['/annotate', entry.revid], file_id=file_id);
28
 
                         title string:Annotate ${filename}"
29
 
         tal:content="filename" class="filename">
30
 
        filename
31
 
      </a>
32
 
    </td>
33
 
  </tr>
34
 
  <tr tal:repeat="renamed entry/changes/renamed">
35
 
    <th class="files">
36
 
      <tal:block condition="repeat/renamed/start">
37
 
        files renamed:
38
 
      </tal:block>
39
 
    </th>
40
 
    <td class="files"
41
 
        tal:define="old_filename python:renamed[0];
42
 
                    new_filename python:renamed[1];
43
 
                    file_id      python:renamed[2]">
44
 
      <a tal:attributes="href  python:url(['/annotate', entry.revid], file_id=file_id);
45
 
                         title string:Annotate ${old_filename}"
46
 
         tal:content="old_filename" class="filename">
 
2
  <ul tal:repeat="added file_changes/added">
 
3
    <tal:block condition="repeat/added/start">
 
4
      <li class="desc">files added:</li>
 
5
    </tal:block>
 
6
    <li class="files">
 
7
      <tal:revision condition="python:added.kind == 'file'"
 
8
                    content="structure python:file_link(added.filename)" />
 
9
      <tal:revision condition="python:added.kind != 'file'"
 
10
                    content="added/filename" />
 
11
    </li>
 
12
  </ul>
 
13
 
 
14
  <ul tal:repeat="removed file_changes/removed">
 
15
    <tal:block condition="repeat/removed/start">
 
16
      <li class="desc">files removed:</li>
 
17
    </tal:block>
 
18
    <li class="files">
 
19
      <tal:revision condition="python:removed.kind == 'file'"
 
20
                    content="structure python:file_link(removed.filename)" />
 
21
      <tal:revision condition="python:removed.kind != 'file'"
 
22
                    content="removed/filename" />
 
23
    </li>
 
24
  </ul>
 
25
 
 
26
  <ul tal:repeat="renamed file_changes/renamed">
 
27
    <tal:block condition="repeat/renamed/start">
 
28
      <li class="desc">files renamed:</li>
 
29
    </tal:block>
 
30
    <li class="files">
 
31
      <tal:old-name content="renamed/old_filename" class="filename">
47
32
        old_filename
48
 
      </a>
49
 
      =>
50
 
      <a tal:attributes="href  python:url(['/annotate', entry.revid], file_id=file_id);
51
 
                         title string:Annotate ${new_filename}"
52
 
         tal:content="new_filename">
 
33
      </tal:old-name>
 
34
      =&gt;
 
35
      <tal:revision condition="renamed/text_modified" content="structure python:file_link(renamed.new_filename)" />
 
36
      <tal:old-name condition="not:renamed/text_modified" content="renamed/new_filename" class="filename">
53
37
        new_filename
54
 
      </a>
55
 
    </td>
56
 
  </tr>
57
 
  <tr tal:repeat="item entry/changes/modified" class="filename">
58
 
    <th class="files">
59
 
      <tal:block condition="repeat/item/start">
60
 
        files modified:
61
 
      </tal:block>
62
 
    </th>
63
 
    <td class="files">
64
 
        <tal:b content="structure python:modified_file_link(url, entry, item)" />
65
 
    </td>
66
 
  </tr>
 
38
      </tal:old-name>
 
39
    </li>
 
40
  </ul>
 
41
 
 
42
  <ul tal:repeat="item file_changes/modified">
 
43
    <tal:block condition="repeat/item/start">
 
44
      <li class="desc">files modified:</li>
 
45
    </tal:block>
 
46
    <li class="files">
 
47
      <tal:revision content="structure python:file_link(item.filename)" />
 
48
    </li>
 
49
  </ul>
67
50
</tal:block>