~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Ian Clatworthy
  • Date: 2008-04-17 08:21:14 UTC
  • mto: (4171.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 4173.
  • Revision ID: ian.clatworthy@canonical.com-20080417082114-76imbiarcbj16ov3
first cut at working tree content filtering

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    )
32
32
from bzrlib.decorators import needs_read_lock
33
33
from bzrlib.errors import BzrError, BzrCheckError
 
34
from bzrlib.filters import filtered_writelines, filters_for_path
34
35
from bzrlib import errors
35
36
from bzrlib.inventory import Inventory, InventoryFile
36
37
from bzrlib.inter import InterObject
426
427
    def print_file(self, file_id):
427
428
        """Print file with id `file_id` to stdout."""
428
429
        import sys
429
 
        sys.stdout.write(self.get_file_text(file_id))
 
430
        filtered_writelines(sys.stdout, self.get_file_lines(file_id),
 
431
            filters_for_path(self.id2path(file_id)))
430
432
 
431
433
    def lock_read(self):
432
434
        pass
821
823
            if kind[0] != kind[1]:
822
824
                changed_content = True
823
825
            elif from_kind == 'file':
824
 
                from_size = self.source._file_size(from_entry, from_stat)
825
 
                to_size = self.target._file_size(to_entry, to_stat)
826
 
                if from_size != to_size:
827
 
                    changed_content = True
828
 
                elif (self.source.get_file_sha1(file_id, from_path, from_stat) !=
 
826
                if (self.source.get_file_sha1(file_id, from_path, from_stat) !=
829
827
                    self.target.get_file_sha1(file_id, to_path, to_stat)):
830
828
                    changed_content = True
831
829
            elif from_kind == 'symlink':