/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: Jelmer Vernooij
  • Date: 2011-03-13 21:30:33 UTC
  • mto: This revision was merged to the branch mainline in revision 5724.
  • Revision ID: jelmer@samba.org-20110313213033-ud9t11mm8e3idtti
Add test for per-file-timestamp zipfiles.

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
        """
158
158
        return self.inventory.id2path(file_id)
159
159
 
160
 
    def is_control_filename(self, filename):
161
 
        """True if filename is the name of a control file in this tree.
162
 
 
163
 
        :param filename: A filename within the tree. This is a relative path
164
 
        from the root of this tree.
165
 
 
166
 
        This is true IF and ONLY IF the filename is part of the meta data
167
 
        that bzr controls in this tree. I.E. a random .bzr directory placed
168
 
        on disk will not be a control file for this tree.
169
 
        """
170
 
        return self.bzrdir.is_control_filename(filename)
171
 
 
172
160
    @needs_read_lock
173
161
    def iter_entries_by_dir(self, specific_file_ids=None, yield_parents=False):
174
162
        """Walk the tree in 'by_dir' order.
520
508
            parent_keys = [(file_id, self._file_revision(t, file_id)) for t in
521
509
                self._iter_parent_trees()]
522
510
            vf.add_lines((file_id, last_revision), parent_keys,
523
 
                         self.get_file(file_id).readlines())
 
511
                         self.get_file_lines(file_id))
524
512
            repo = self.branch.repository
525
513
            base_vf = repo.texts
526
514
        else:
778
766
    return 'wtf?'
779
767
 
780
768
 
781
 
@deprecated_function(deprecated_in((1, 9, 0)))
782
 
def find_renames(old_inv, new_inv):
783
 
    for file_id in old_inv:
784
 
        if file_id not in new_inv:
785
 
            continue
786
 
        old_name = old_inv.id2path(file_id)
787
 
        new_name = new_inv.id2path(file_id)
788
 
        if old_name != new_name:
789
 
            yield (old_name, new_name)
790
 
 
791
 
 
792
769
def find_ids_across_trees(filenames, trees, require_versioned=True):
793
770
    """Find the ids corresponding to specified filenames.
794
771
 
1130
1107
            if file_id in to_paths:
1131
1108
                # already returned
1132
1109
                continue
1133
 
            if file_id not in self.target.all_file_ids():
 
1110
            if not self.target.has_id(file_id):
1134
1111
                # common case - paths we have not emitted are not present in
1135
1112
                # target.
1136
1113
                to_path = None