~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to services/svnlogservice

  • Committer: William Grant
  • Date: 2009-05-13 03:15:26 UTC
  • mto: This revision was merged to the branch mainline in revision 1247.
  • Revision ID: grantw@unimelb.edu.au-20090513031526-l3knlkpgnldp6dgj
Attempting to view an SVN log when the repo is empty will not crash now.

svnlogservice now returns a 404 if the revision isn't found.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        code = e[1][0][1]
52
52
        # See subversion/include/svn_error_codes.h.
53
53
        # 155007: WC_NOT_DIRECTORY.
 
54
        # 160006: FS_NO_SUCH_REVISION
54
55
        # 160013: FS_NOT_FOUND
55
56
        # 200005: UNVERSIONED_RESOURCE
56
 
        if code in (155007, 160013, 200005):
 
57
        if code in (155007, 160006, 160013, 200005):
57
58
            error = 'notfound'
58
59
        else:
59
 
            error = '%s (code %d)' % (error, code) 
 
60
            error = '%s (code %d)' % (error, code)
60
61
    except IndexError:
61
62
        pass
62
63