~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/filter_tree.py

  • Committer: Patch Queue Manager
  • Date: 2015-12-17 18:39:00 UTC
  • mfrom: (6606.1.2 fix-float)
  • Revision ID: pqm@pqm.ubuntu.com-20151217183900-0719du2uv1kwu3lc
(vila) Inline testtools private method to fix an issue in xenial (the
 private implementation has changed in an backward incompatible way).
 (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Content-filtered view of any tree.
18
18
"""
19
19
 
 
20
from __future__ import absolute_import
20
21
 
21
22
from bzrlib import (
22
23
    tree,
23
24
    )
24
25
from bzrlib.filters import (
25
 
    ContentFilter,
26
26
    ContentFilterContext,
27
 
    filtered_input_file,
28
27
    filtered_output_bytes,
29
 
    _get_filter_stack_for,
30
 
    _get_registered_names,
31
 
    internal_size_sha_file_byname,
32
 
    register_filter_stack_map,
33
28
    )
34
29
 
35
30
 
51
46
 
52
47
    def get_file_text(self, file_id, path=None):
53
48
        chunks = self.backing_tree.get_file_lines(file_id, path)
54
 
        filters = self.filter_stack_callback(path)
55
49
        if path is None:
56
50
            path = self.backing_tree.id2path(file_id)
 
51
        filters = self.filter_stack_callback(path)
57
52
        context = ContentFilterContext(path, self, None)
58
53
        contents = filtered_output_bytes(chunks, filters, context)
59
54
        content = ''.join(contents)