* lib/viewcvs.py, templates/log.ezt, templates/log_table.ezt: revert

change that moved generation of human readable diff URLs from the
  templates to the Python code.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@899 8cb11bc2-c004-0410-86c3-e597b4017df7
remotes/tags/1.0.0-rc1
jhenstridge 2004-07-24 16:34:04 +00:00
parent db74810b91
commit c3aff09497
3 changed files with 12 additions and 36 deletions

View File

@ -1674,13 +1674,9 @@ def view_log(request):
entry.download_text_href = None
entry.sel_for_diff_href = None
entry.diff_to_sel_href = None
entry.diff_to_sel_hr_href = None
entry.diff_to_prev_href = None
entry.diff_to_prev_hr_href = None
entry.diff_to_branch_href = None
entry.diff_to_branch_hr_href = None
entry.diff_to_main_href = None
entry.diff_to_main_hr_href = None
if pathtype is vclib.FILE:
entry.view_href = request.get_url(view_func=view_markup,
params={'rev': rev.string})
@ -1768,18 +1764,12 @@ def view_log(request):
else:
other_path = None
entry.diff_to_prev_href = \
request.get_url(view_func=view_diff,
where=entry.filename, pathtype=vclib.FILE,
params={'r1': entry.prev,
'p1': other_path,
'r2': entry.rev})
entry.diff_to_prev_hr_href = \
request.get_url(view_func=view_diff,
where=entry.filename, pathtype=vclib.FILE,
params={'r1': entry.prev,
'p1': other_path,
'r2': entry.rev,
'diff_format': 'h'})
'diff_format': None})
if selected_rev and \
selected_rev != str(entry.rev) and \
selected_rev != str(entry.prev) and \
@ -1790,39 +1780,25 @@ def view_log(request):
else:
other_path = None
entry.diff_to_sel_href = \
request.get_url(view_func=view_diff,
where=entry.filename, pathtype=vclib.FILE,
params={'r1': selected_rev,
'p1': other_path,
'r2': entry.rev})
entry.diff_to_sel_hr_href = \
request.get_url(view_func=view_diff,
where=entry.filename, pathtype=vclib.FILE,
params={'r1': selected_rev,
'p1': other_path,
'r2': entry.rev,
'diff_format': 'h'})
'diff_format': None})
# moves aren't handled here but they are only supported by CVS right now.
if entry.next_main:
entry.diff_to_main_href = \
request.get_url(view_func=view_diff,
params={'r1': entry.next_main,
'r2': entry.rev})
entry.diff_to_main_hr_href = \
request.get_url(view_func=view_diff,
params={'r1': entry.next_main,
'r2': entry.rev,
'diff_format': 'h'})
'diff_format': None})
if entry.branch_point:
entry.diff_to_branch_href = \
request.get_url(view_func=view_diff,
params={'r1': entry.branch_point,
'r2': entry.rev})
entry.diff_to_branch_hr_href = \
request.get_url(view_func=view_diff,
params={'r1': entry.branch_point,
'r2': entry.rev,
'diff_format': 'h'})
'diff_format': None})
entries.append(entry)

View File

@ -106,7 +106,7 @@
<br>Diff to <a href="[entries.diff_to_prev_href]">previous [entries.prev]</a>
[if-any human_readable]
[else]
(<a href="[entries.diff_to_prev_hr_href]">colored</a>)
(<a href="[entries.diff_to_prev_href]&amp;diff_format=h">colored</a>)
[end]
[end]
@ -115,7 +115,7 @@
, to <a href="[entries.diff_to_branch_href]">branch point [entries.branch_point]</a>
[if-any human_readable]
[else]
(<a href="[entries.diff_to_branch_hr_href]">colored</a>)
(<a href="[entries.diff_to_branch_href]&amp;diff_format=h">colored</a>)
[end]
[end]
@ -123,7 +123,7 @@
, to <a href="[entries.diff_to_main_href]">next main [entries.next_main]</a>
[if-any human_readable]
[else]
(<a href="[entries.diff_to_main_hr_href]">colored</a>)
(<a href="[entries.diff_to_main_href]&amp;diff_format=h">colored</a>)
[end]
[end]
[end]
@ -133,7 +133,7 @@
to <a href="[entries.diff_to_sel_href]">selected [rev_selected]</a>
[if-any human_readable]
[else]
(<a href="[entries.diff_to_sel_hr_href]">colored</a>)
(<a href="[entries.diff_to_sel_href]&amp;diff_format=h">colored</a>)
[end]
[end]
[end]

View File

@ -64,14 +64,14 @@
<a href="[entries.diff_to_sel_href]"><b>Diff&nbsp;to&nbsp;selected&nbsp;[rev_selected]</b></a>
[if-any human_readable]
[else]
(<a href="[entries.diff_to_sel_hr_href]"><b>colored</b></a>)
(<a href="[entries.diff_to_sel_href]&amp;diff_format=h"><b>colored</b></a>)
[end]<br />
[end]
[if-any entries.prev]
<a href="[entries.diff_to_prev_href]"><b>Diff&nbsp;to&nbsp;previous&nbsp;[entries.prev]</b></a>
[if-any human_readable]
[else]
(<a href="[entries.diff_to_prev_hr_href]"><b>colored</b></a>)
(<a href="[entries.diff_to_prev_href]&amp;diff_format=h"><b>colored</b></a>)
[end]<br />
[end]
[end]
@ -98,14 +98,14 @@
<a href="[entries.diff_to_main_href]"><b>Diff&nbsp;to&nbsp;next&nbsp;MAIN&nbsp;[entries.next_main]</b></a>
[if-any human_readable]
[else]
(<a href="[entries.diff_to_main_hr_href]"><b>colored</b></a>)
(<a href="[entries.diff_to_main_href]&amp;diff_format=h"><b>colored</b></a>)
[end]<br />
[end]
[if-any entries.branch_point]
<a href="[entries.diff_to_branch_href]"><b>Diff&nbsp;to&nbsp;branch&nbsp;point&nbsp;[entries.branch_point]</b></a>
[if-any human_readable]
[else]
(<a href="[entries.diff_to_branch_hr_href]"><b>colored</b></a>)
(<a href="[entries.diff_to_branch_href]&amp;diff_format=h"><b>colored</b></a>)
[end]<br />
[end]