/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/branch.py

  • Committer: Robey Pointer
  • Date: 2006-09-02 22:21:55 UTC
  • mto: This revision was merged to the branch mainline in revision 1996.
  • Revision ID: robey@lag.net-20060902222155-1d1ed3d3c31120ee
be explicit about the deprecation of setup_caching and remove no-op destructor

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
        """
139
139
        return bzrdir.BzrDir.create_standalone_workingtree(base).branch
140
140
 
 
141
    @deprecated_function(zero_eight)
141
142
    def setup_caching(self, cache_root):
142
143
        """Subclasses that care about caching should override this, and set
143
144
        up cached stores located under cache_root.
 
145
        
 
146
        NOTE: This is unused.
144
147
        """
145
 
        # seems to be unused, 2006-01-13 mbp
146
 
        warn('%s is deprecated' % self.setup_caching)
147
 
        self.cache_root = cache_root
 
148
        pass
148
149
 
149
150
    def get_config(self):
150
151
        return bzrlib.config.BranchConfig(self)
958
959
 
959
960
    __repr__ = __str__
960
961
 
961
 
    def __del__(self):
962
 
        # TODO: It might be best to do this somewhere else,
963
 
        # but it is nice for a Branch object to automatically
964
 
        # cache it's information.
965
 
        # Alternatively, we could have the Transport objects cache requests
966
 
        # See the earlier discussion about how major objects (like Branch)
967
 
        # should never expect their __del__ function to run.
968
 
        # XXX: cache_root seems to be unused, 2006-01-13 mbp
969
 
        if hasattr(self, 'cache_root') and self.cache_root is not None:
970
 
            try:
971
 
                osutils.rmtree(self.cache_root)
972
 
            except:
973
 
                pass
974
 
            self.cache_root = None
975
 
 
976
962
    def _get_base(self):
977
963
        return self._base
978
964