~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-02-25 23:12:24 UTC
  • mfrom: (4048.1.2 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090225231224-r2fv2iqcgezje0zt
Make ls aware of views (Eduardo O. Padoan)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2304
2304
        if revision is not None or tree is None:
2305
2305
            tree = _get_one_revision_tree('ls', revision, branch=branch)
2306
2306
 
 
2307
        apply_view = False
 
2308
        if isinstance(tree, WorkingTree) and tree.supports_views():
 
2309
            view_files = tree.views.lookup_view()
 
2310
            if view_files:
 
2311
                apply_view = True
 
2312
                view_str = views.view_display_str(view_files)
 
2313
                note("ignoring files outside view: %s" % view_str)
 
2314
 
2307
2315
        tree.lock_read()
2308
2316
        try:
2309
2317
            for fp, fc, fkind, fid, entry in tree.list_files(include_root=False):
2315
2323
                        continue
2316
2324
                    if kind is not None and fkind != kind:
2317
2325
                        continue
 
2326
                    if apply_view:
 
2327
                        try:
 
2328
                            views.check_path_in_view(tree, fp)
 
2329
                        except errors.FileOutsideView:
 
2330
                            continue
2318
2331
                    kindch = entry.kind_character()
2319
2332
                    outstring = fp + kindch
2320
2333
                    if verbose: