Fix handling of "tarball" parameter (for backwards compatibility

with ViewCVS 0.9.2

* lib/viewcvs.py
  (Request.run_viewcvs)
    look for tarball parameter on directory paths, not file paths
----------------------------------------------------------------------


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1006 8cb11bc2-c004-0410-86c3-e597b4017df7
remotes/tags/1.0.0-rc1
rey4 2005-01-14 19:35:14 +00:00
parent 83d2817867
commit ff5aa6d251
1 changed files with 5 additions and 3 deletions

View File

@ -315,7 +315,11 @@ class Request:
# view parameter is not set, try looking at pathtype and the
# other parameters
if self.pathtype == vclib.DIR:
self.view_func = view_directory
# ViewCVS 0.9.2 used to put ?tarball=1 at the end of tarball urls
if self.query_dict.has_key('tarball'):
self.view_func = download_tarball
else:
self.view_func = view_directory
elif self.pathtype == vclib.FILE:
if self.query_dict.has_key('r1') and self.query_dict.has_key('r2'):
self.view_func = view_diff
@ -329,8 +333,6 @@ class Request:
self.view_func = view_checkout
elif self.query_dict.has_key('annotate'):
self.view_func = view_annotate
elif self.query_dict.has_key('tarball'):
self.view_func = download_tarball
elif self.query_dict.has_key('graph'):
if not self.query_dict.has_key('makeimage'):
self.view_func = view_cvsgraph