/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-12-20 14:20:04 UTC
  • mfrom: (2974.2.3 fast_diff_versus_empty)
  • Revision ID: pqm@pqm.ubuntu.com-20071220142004-tw2cffgn9fxq5ra0
(jam) re-enable the fast _iter_changes versus the null revision.

Show diffs side-by-side

added added

removed removed

Lines of Context:
281
281
        else:
282
282
            self.case_sensitive = False
283
283
 
 
284
        self._setup_directory_is_tree_reference()
 
285
 
284
286
    branch = property(
285
287
        fget=lambda self: self._branch,
286
288
        doc="""The branch this WorkingTree is connected to.
990
992
            other_tree.unlock()
991
993
        other_tree.bzrdir.retire_bzrdir()
992
994
 
993
 
    def _directory_is_tree_reference(self, relpath):
 
995
    def _setup_directory_is_tree_reference(self):
 
996
        if self._branch.repository._format.supports_tree_reference:
 
997
            self._directory_is_tree_reference = \
 
998
                self._directory_may_be_tree_reference
 
999
        else:
 
1000
            self._directory_is_tree_reference = \
 
1001
                self._directory_is_never_tree_reference
 
1002
 
 
1003
    def _directory_is_never_tree_reference(self, relpath):
 
1004
        return False
 
1005
 
 
1006
    def _directory_may_be_tree_reference(self, relpath):
994
1007
        # as a special case, if a directory contains control files then 
995
1008
        # it's a tree reference, except that the root of the tree is not
996
1009
        return relpath and osutils.isdir(self.abspath(relpath) + u"/.bzr")