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

  • Committer: Aaron Bentley
  • Date: 2008-07-24 16:08:28 UTC
  • mto: (3363.14.4 intertree)
  • mto: This revision was merged to the branch mainline in revision 3715.
  • Revision ID: aaron@aaronbentley.com-20080724160828-3r380riih4b0xt7c
Remove new implementation of paths2ids, implement has_id

Show diffs side-by-side

added added

removed removed

Lines of Context:
1496
1496
    def __iter__(self):
1497
1497
        return iter(self.all_file_ids())
1498
1498
 
1499
 
    def paths2ids(self, specific_files, trees=None, require_versioned=False):
1500
 
        """See Tree.paths2ids"""
1501
 
        to_find = set(specific_files)
1502
 
        result = set()
1503
 
        for (file_id, paths, changed, versioned, parent, name, kind,
1504
 
             executable) in self._transform.iter_changes():
1505
 
            if paths[1] in to_find:
1506
 
                result.add(file_id)
1507
 
                to_find.remove(paths[1])
1508
 
        result.update(self._transform._tree.paths2ids(to_find,
1509
 
                      trees=[], require_versioned=require_versioned))
1510
 
        return result
 
1499
    def has_id(self, file_id):
 
1500
        if file_id in self._transform._r_new_id:
 
1501
            return True
 
1502
        elif file_id in self._transform._removed_id:
 
1503
            return False
 
1504
        else:
 
1505
            return self._transform._tree.has_id(file_id)
1511
1506
 
1512
1507
    def _path2trans_id(self, path):
1513
1508
        segments = splitpath(path)