Fix issue #512 ("'Select for diffs' does not work across pages").

* lib/viewvc.py
  (view_log): Preserve the 'log_pagestart' query value when generating
    the 'select for diff' links so that clicking the link returns you to
    the same page (modulo repagination due to new commits in the race
    window ... but let's not think about that).  Also, preserve the
    'r1' query parameter when generating the paging form.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2788 8cb11bc2-c004-0410-86c3-e597b4017df7
trunk
cmpilato 2012-10-03 14:22:48 +00:00
parent ace5d55f0e
commit 4590ebbd6b
1 changed files with 5 additions and 2 deletions

View File

@ -2686,7 +2686,8 @@ def view_log(request):
if selected_rev != entry.rev:
entry.sel_for_diff_href = \
request.get_url(view_func=view_log,
params={'r1': entry.rev},
params={'r1': entry.rev,
'log_pagestart': log_pagestart},
escape=1)
if entry.prev is not None:
entry.diff_to_prev_href = \
@ -2827,7 +2828,9 @@ def view_log(request):
if cfg.options.log_pagesize:
data['log_paging_action'], data['log_paging_hidden_values'] = \
request.get_form(params={'log_pagestart': None})
request.get_form(params={'log_pagestart': None,
'r1': selected_rev,
})
data['log_pagestart'] = int(request.query_dict.get('log_pagestart',0))
data['entries'] = paging_sws(data, 'entries', data['log_pagestart'],
'rev', cfg.options.log_pagesize,