49
56
url, entry.revno, filename, '#' + filename)
51
58
def file_link(filename):
52
return '<a href="%s%s" title="View changes to %s in revision %s">%s</a>'%(
59
return '<a href="%s%s" title="View changes to %s in revision %s">%s</a>' % (
53
60
url(['/revision', entry.revno]), '#' + filename, cgi.escape(filename),
54
61
cgi.escape(entry.revno), cgi.escape(filename))
55
62
return _pt('revisionfilechanges').expand(
117
124
def annotate_link(url, revno, path):
118
return '<a href="%s" title="Annotate %s">%s</a>'%(
125
return '<a href="%s" title="Annotate %s">%s</a>' % (
119
126
url(['/annotate', revno, path]), cgi.escape(path), cgi.escape(path))
122
129
def revision_link(url, revno, path, frag=''):
123
return '<a href="%s%s" title="View changes to %s in revision %s">%s</a>'%(
130
return '<a href="%s%s" title="View changes to %s in revision %s">%s</a>' % (
124
131
url(['/revision', revno, path]), frag, cgi.escape(path),
125
132
cgi.escape(revno), cgi.escape(path))
136
def loggerhead_version():
137
return loggerhead.__version__
139
_cached_generator_string = None
142
def generator_string():
143
global _cached_generator_string
144
if _cached_generator_string is None:
147
# TODO: Errors -- e.g. from a missing/invalid __version__ attribute, or
148
# ValueError accessing Distribution.version -- should be non-fatal.
150
versions.append(('Loggerhead', loggerhead.__version__))
153
python_version = bzrlib._format_version_tuple(sys.version_info)
154
versions.append(('Python', python_version))
156
versions.append(('Bazaar', bzrlib.__version__))
158
Paste = pkg_resources.get_distribution('Paste')
159
versions.append(('Paste', Paste.version))
162
PasteDeploy = pkg_resources.get_distribution('PasteDeploy')
163
except pkg_resources.DistributionNotFound:
166
versions.append(('PasteDeploy', PasteDeploy.version))
169
versions.append(('SimpleTAL', simpletal.__version__))
176
versions.append(('Pygments', pygments.__version__))
179
from bzrlib.plugins import search
183
bzr_search_version = bzrlib._format_version_tuple(
185
versions.append(('bzr-search', bzr_search_version))
187
# TODO: On old Python versions, elementtree may be used.
194
versions.append(('simplejson', simplejson.__version__))
197
Dozer = pkg_resources.get_distribution('Dozer')
198
except pkg_resources.DistributionNotFound:
201
versions.append(('Dozer', Dozer.version))
203
version_strings = ("%s/%s" % t for t in versions)
204
_cached_generator_string = ' '.join(version_strings)
205
return _cached_generator_string