* lib/viewcvs.py (view_log): when constructing the view and download URLs,

use entry.filename as the location.  This fixes the view/download links
  when the log crosses a copy boundary.  Fixes bug #999355.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@905 8cb11bc2-c004-0410-86c3-e597b4017df7
remotes/tags/1.0.0-rc1
jhenstridge 2004-07-29 02:33:04 +00:00
parent ea19338677
commit 32b741f259
1 changed files with 19 additions and 14 deletions

View File

@ -1685,20 +1685,6 @@ def view_log(request):
entry.diff_to_prev_href = None
entry.diff_to_branch_href = None
entry.diff_to_main_href = None
if pathtype is vclib.FILE:
entry.view_href = request.get_url(view_func=view_markup,
params={'rev': rev.string})
entry.download_href = request.get_url(view_func=view_checkout,
params={'rev': rev.string})
if mime_type != 'text/plain':
entry.download_text_href = \
request.get_url(view_func=view_checkout,
params={'content-type': 'text/plain',
'rev': rev.string})
else:
entry.view_href = request.get_url(view_func=view_directory,
params={'rev': entry.rev})
if request.roottype == 'cvs':
entry.annotate_href = request.get_url(view_func=view_annotate,
@ -1755,6 +1741,25 @@ def view_log(request):
entry.copy_rev = rev.copy_rev
entry.filename = rev.filename
# view/download links
if pathtype is vclib.FILE:
entry.view_href = request.get_url(view_func=view_markup,
where=entry.filename,
pathtype=vclib.FILE,
params={'rev': rev.string})
entry.download_href = request.get_url(view_func=view_checkout,
where=entry.filename,
pathtype=vclib.FILE,
params={'rev': rev.string})
if mime_type != 'text/plain':
entry.download_text_href = \
request.get_url(view_func=view_checkout,
params={'content-type': 'text/plain',
'rev': rev.string})
else:
entry.view_href = request.get_url(view_func=view_directory,
params={'rev': entry.rev})
# calculate diff links
if selected_rev != entry.rev:
if entry.filename != request.where: