/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: Andrew Bennetts
  • Date: 2008-10-27 06:14:45 UTC
  • mfrom: (3793 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3795.
  • Revision ID: andrew.bennetts@canonical.com-20081027061445-eqt9lz6uw1mbvq4g
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
from bzrlib.inter import InterObject
38
38
from bzrlib.osutils import fingerprint_file
39
39
import bzrlib.revision
 
40
from bzrlib.symbol_versioning import deprecated_function, deprecated_in
40
41
from bzrlib.trace import mutter, note
41
42
 
42
43
 
132
133
    def has_id(self, file_id):
133
134
        return self.inventory.has_id(file_id)
134
135
 
135
 
    __contains__ = has_id
 
136
    def __contains__(self, file_id):
 
137
        return self.has_id(file_id)
136
138
 
137
139
    def has_or_had_id(self, file_id):
138
140
        if file_id == self.inventory.root.file_id:
648
650
    return 'wtf?'
649
651
 
650
652
    
651
 
 
 
653
@deprecated_function(deprecated_in((1, 9, 0)))
652
654
def find_renames(old_inv, new_inv):
653
655
    for file_id in old_inv:
654
656
        if file_id not in new_inv:
657
659
        new_name = new_inv.id2path(file_id)
658
660
        if old_name != new_name:
659
661
            yield (old_name, new_name)
660
 
            
 
662
 
661
663
 
662
664
def find_ids_across_trees(filenames, trees, require_versioned=True):
663
665
    """Find the ids corresponding to specified filenames.
835
837
        else:
836
838
            all_unversioned = deque()
837
839
        to_paths = {}
838
 
        from_entries_by_dir = list(self.source.inventory.iter_entries_by_dir(
 
840
        from_entries_by_dir = list(self.source.iter_entries_by_dir(
839
841
            specific_file_ids=specific_file_ids))
840
842
        from_data = dict((e.file_id, (p, e)) for p, e in from_entries_by_dir)
841
 
        to_entries_by_dir = list(self.target.inventory.iter_entries_by_dir(
 
843
        to_entries_by_dir = list(self.target.iter_entries_by_dir(
842
844
            specific_file_ids=specific_file_ids))
843
845
        num_entries = len(from_entries_by_dir) + len(to_entries_by_dir)
844
846
        entry_count = 0
936
938
            if file_id in to_paths:
937
939
                # already returned
938
940
                continue
939
 
            if not file_id in self.target.inventory:
 
941
            if not file_id in self.target.all_file_ids():
940
942
                # common case - paths we have not emitted are not present in
941
943
                # target.
942
944
                to_path = None