* viewcvs/lib/viewcvs.py
(view_diff): Catch Subversion FS_NOT_FOUND errors from diffobj.get_pipe() so we can return a '400 Bad Request'. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@783 8cb11bc2-c004-0410-86c3-e597b4017df7remotes/tags/1.0.0-rc1
parent
fd97298424
commit
403d5c8f73
|
@ -2345,7 +2345,13 @@ def view_diff(request):
|
|||
diffobj = vclib.svn.do_diff(request.repos, p1, int(rev1),
|
||||
p2, int(rev2), args)
|
||||
|
||||
fp = diffobj.get_pipe()
|
||||
try:
|
||||
fp = diffobj.get_pipe()
|
||||
except vclib.svn.core.SubversionException, e:
|
||||
if e.apr_err == vclib.svn.core.SVN_ERR_FS_NOT_FOUND:
|
||||
raise debug.ViewcvsException('Invalid path(s) or revision(s) passed '
|
||||
'to diff', '400 Bad Request')
|
||||
raise e
|
||||
|
||||
if human_readable:
|
||||
human_readable_diff(request, fp, rev1, rev2, sym1, sym2)
|
||||
|
|
Loading…
Reference in New Issue