~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

  • Committer: Ian Clatworthy
  • Date: 2008-04-17 14:10:33 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-20080417141033-0fnc7oe07535rw90
make content filter lookup a tree responsibility

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
                           ReusingTransform, NotVersionedError, CantMoveRoot,
33
33
                           ExistingLimbo, ImmortalLimbo, NoFinalPath,
34
34
                           UnableCreateSymlink)
35
 
from bzrlib.filters import filtered_output_lines, filters_for_path
 
35
from bzrlib.filters import filtered_output_lines
36
36
from bzrlib.inventory import InventoryEntry
37
37
from bzrlib.osutils import (file_kind, supports_executable, pathjoin, lexists,
38
38
                            delete_any, has_symlinks)
328
328
                os.unlink(name)
329
329
                raise
330
330
 
331
 
            f.writelines(filtered_output_lines(contents,
332
 
                filters_for_path(name)))
 
331
            # Is this the best way to get the relative path?
 
332
            # (The +1 adjusts for the path separator.)
 
333
            relpath = name[len(self._limbodir) + 1:]
 
334
            filters = self._tree._content_filter_stack(relpath)
 
335
            f.writelines(filtered_output_lines(contents, filters))
333
336
        finally:
334
337
            f.close()
335
338
        self._set_mode(trans_id, mode_id, S_ISREG)