Ticket #4366 (closed enhancement: fixed)
Provide additional radio button in log template
| Reported by: | Tim Hatch <trac@…> | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.11 |
| Component: | version control/log view | Version: | 0.10.2 |
| Severity: | normal | Keywords: | ranges |
| Cc: |
Description
This is a little difficult to explain. r4431:4432 shows the log message for both, but the radio buttons don't allow selecting "Prior to This" as a source revision for a diff to actually get the net changes for the two.
Of course, this is only valid if the node existed prior to what's being displayed.
Here's a rough hack that keys off whether the last listed change is an 'add' or something else. If it's a 'something else' then allow diffing to that n-1th revision. Move or copy probably needs to be on the list of things that perhaps can't be diffed against. A true fix would delve more into the source and see if it actually exists at r(n-1).
Index: templates/revisionlog.html
===================================================================
--- templates/revisionlog.html (revision 4434)
+++ templates/revisionlog.html (working copy)
@@ -110,7 +110,7 @@
<tr class="$odd_even">
<td class="diff">
<input type="radio" name="old" value="${item.path}@${item.rev}"
- checked="${idx == (len(items) - 1) or None}" />
+ checked="${len(items)==0 or (items[-1].change=='add' and idx==len(items)-1)}" />
<input type="radio" name="new" value="${item.path}@${item.rev}"
checked="${idx == 0 or None}" />
</td>
@@ -146,6 +146,14 @@
</tr>
</py:with>
</py:for>
+ <tr py:if="len(items) and items[-1].change != 'add'">
+ <td class="diff">
+ <input type="radio" name="old"
+ value="${items[-1].path}@${items[-1].rev-1}"
+ checked="checked" />
+ </td>
+ <td colspan="6">Prior State</td>
+ </tr>
</tbody>
</table>


