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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-03 05:02:40 UTC
  • mfrom: (4012.3.2 remove-emptytree)
  • Revision ID: pqm@pqm.ubuntu.com-20090303050240-nkz12llmbepj8oo5
(mbp) remove obsolete EmptyTree class

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Canonical Ltd
 
1
# Copyright (C) 2005, 2009 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
654
654
        return searcher
655
655
 
656
656
 
657
 
class EmptyTree(Tree):
658
 
 
659
 
    def __init__(self):
660
 
        self._inventory = Inventory(root_id=None)
661
 
        symbol_versioning.warn('EmptyTree is deprecated as of bzr 0.9 please'
662
 
                               ' use repository.revision_tree instead.',
663
 
                               DeprecationWarning, stacklevel=2)
664
 
 
665
 
    def get_parent_ids(self):
666
 
        return []
667
 
 
668
 
    def get_symlink_target(self, file_id):
669
 
        return None
670
 
 
671
 
    def has_filename(self, filename):
672
 
        return False
673
 
 
674
 
    def kind(self, file_id):
675
 
        return "directory"
676
 
 
677
 
    def list_files(self, include_root=False):
678
 
        return iter([])
679
 
 
680
 
    def __contains__(self, file_id):
681
 
        return (file_id in self._inventory)
682
 
 
683
 
    def get_file_sha1(self, file_id, path=None, stat_value=None):
684
 
        return None
685
 
 
686
 
 
687
657
######################################################################
688
658
# diff
689
659