~bzr/loggerhead/daily-ppa

« back to all changes in this revision

Viewing changes to loggerhead/controllers/view_ui.py

  • Committer: Max Bowsher
  • Date: 2011-03-17 08:33:16 UTC
  • mfrom: (182.150.20 trunk-rich)
  • Revision ID: maxb@f2s.com-20110317083316-n5nq18tsaaxkskut
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
import bzrlib.textfile
26
26
import bzrlib.osutils
27
27
 
28
 
from paste.httpexceptions import HTTPBadRequest, HTTPServerError
 
28
from paste.httpexceptions import HTTPBadRequest, HTTPServerError, HTTPMovedPermanently
29
29
 
30
30
from loggerhead.controllers import TemplatedBranchView
31
31
try:
120
120
            raise HTTPServerError('Could not fetch changes')
121
121
        branch_breadcrumbs = util.branch_breadcrumbs(path, inv, 'files')
122
122
 
 
123
        if inv[file_id].kind == "directory":
 
124
            raise HTTPMovedPermanently(self._branch.context_url(['/files', revno_url, path]))
 
125
 
123
126
        return {
124
127
            # In AnnotateUI, "annotated" is a generator giving revision
125
128
            # numbers per lines, but the template checks if "annotated" is