~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/controllers/inventory_ui.py

[rs=igc] update to lp:loggerhead trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import posixpath
23
23
import urllib
24
24
 
25
 
from paste.httpexceptions import HTTPNotFound, HTTPMovedPermanently
 
25
from paste.httpexceptions import HTTPNotFound
26
26
 
27
27
from bzrlib import errors
28
28
from bzrlib.revision import is_null as is_null_rev
31
31
from loggerhead.controllers import TemplatedBranchView
32
32
 
33
33
 
 
34
log = logging.getLogger("loggerhead.controllers")
 
35
 
34
36
 
35
37
def dirname(path):
36
38
    if path is not None:
43
45
 
44
46
    template_path = 'loggerhead.templates.inventory'
45
47
 
46
 
    def get_filelist(self, inv, path, sort_type, revno_url):
 
48
    def get_filelist(self, inv, path, sort_type):
47
49
        """
48
50
        return the list of all files (and their attributes) within a given
49
51
        path subtree.
56
58
        dir_ie = inv[file_id]
57
59
        file_list = []
58
60
 
59
 
        if dir_ie.kind != 'directory':
60
 
            raise HTTPMovedPermanently(self._branch.context_url(['/view', revno_url, path]))
61
 
 
62
61
        revid_set = set()
63
62
 
64
63
        for filename, entry in dir_ie.children.iteritems():
151
150
 
152
151
            # Create breadcrumb trail for the path within the branch
153
152
            branch_breadcrumbs = util.branch_breadcrumbs(path, rev_tree, 'files')
154
 
            filelist = self.get_filelist(rev_tree.inventory, path, sort_type, revno_url)
 
153
            filelist = self.get_filelist(rev_tree.inventory, path, sort_type)
155
154
        else:
156
155
            start_revid = None
157
156
            change = None