~ubuntu-branches/ubuntu/precise/trac/precise

« back to all changes in this revision

Viewing changes to trac/versioncontrol/web_ui/log.py

  • Committer: Bazaar Package Importer
  • Author(s): W. Martin Borgert
  • Date: 2009-09-15 21:43:38 UTC
  • mfrom: (1.1.15 upstream)
  • Revision ID: james.westby@ubuntu.com-20090915214338-q3ecy6qxwxfzf9y8
Tags: 0.11.5-2
* Set exec bit for *_frontends (Closes: #510441), thanks to Torsten
  Landschoff for the patch.
* Move python-psycopg2 and python-mysql from Suggests to Depends as
  alternative to python-psqlite2 (Closes: #513117).
* Use debhelper 7 (Closes: #497862).
* Don't compress *-hook files and don't install MS-Windows *.cmd
  files (Closes: #526142), thanks to Jan Dittberner for the patch.
* Add README.source to point to dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- coding: utf-8 -*-
2
2
#
3
 
# Copyright (C) 2003-2008 Edgewall Software
 
3
# Copyright (C) 2003-2009 Edgewall Software
4
4
# Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com>
5
5
# Copyright (C) 2005-2006 Christian Boos <cboos@neuf.fr>
6
6
# All rights reserved.
64
64
    # IRequestHandler methods
65
65
 
66
66
    def match_request(self, req):
67
 
        import re
68
 
        match = re.match(r'/log(?:(/.*)|$)', req.path_info)
 
67
        match = re.match(r'/log(/.*)?$', req.path_info)
69
68
        if match:
70
69
            req.args['path'] = match.group(1) or '/'
71
70
            return True
305
304
        if revs and query:
306
305
            query = '&' + query[1:]
307
306
        href = formatter.href.log(path or '/', revs=revs) + query + fragment
308
 
        return html.A(label, class_='source', href=href)
 
307
        if 'LOG_VIEW' in formatter.perm:
 
308
            return html.A(label, class_='source', href=href)
 
309
        else:
 
310
            return html.A(label, class_='missing source')
309
311
 
310
312
    LOG_LINK_RE = re.compile(r"([^@:]*)[@:]%s?" % REV_RANGE)
311
313