~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/branchview.py

  • Committer: Michael Hudson
  • Date: 2007-11-19 08:48:54 UTC
  • mfrom: (128.2.34 loggerhead.robey)
  • mto: This revision was merged to the branch mainline in revision 142.
  • Revision ID: michael.hudson@canonical.com-20071119084854-b1r1fqwzwve1hcgt
[merge conflict] from robey

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
            h.check_rebuild()
160
160
    
161
161
    def url(self, elements, **kw):
 
162
        "build an url relative to this branch"
162
163
        if not isinstance(elements, list):
163
164
            elements = [elements]
164
165
        if elements[0].startswith('/'):
166
167
        elements = [urllib.quote(x) for x in elements]
167
168
        return turbogears.url([ '/' + self.group_name, self.name ] + elements, **kw)
168
169
 
 
170
    def context_url(self, elements, **kw):
 
171
        "build an url relative to this branch, bringing along browsing context"
 
172
        return self.url(elements, **util.get_context(**kw))
 
173
    
169
174
    def last_updated(self):
170
175
        h = self.get_history()
171
176
        change = h.get_changes([ h.last_revid ])[0]