/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 breezy/bzr/workingtree.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-10-13 17:31:55 UTC
  • mfrom: (7397.4.9 remove-unused)
  • Revision ID: breezy.the.bot@gmail.com-20191013173155-yoiokny4mknxb3um
Remove Tree.has_id.

Merged from https://code.launchpad.net/~jelmer/brz/remove-unused/+merge/373320

Show diffs side-by-side

added added

removed removed

Lines of Context:
658
658
            self._set_inventory(result, dirty=False)
659
659
            return result
660
660
 
661
 
    def has_id(self, file_id):
662
 
        # files that have been deleted are excluded
663
 
        inv, inv_file_id = self._unpack_file_id(file_id)
664
 
        if not inv.has_id(inv_file_id):
665
 
            return False
666
 
        path = inv.id2path(inv_file_id)
667
 
        return osutils.lexists(self.abspath(path))
668
 
 
669
661
    def all_file_ids(self):
670
662
        """Iterate through file_ids for this tree.
671
663
 
1368
1360
                if after:
1369
1361
                    basis = self.basis_tree()
1370
1362
                    with basis.lock_read():
1371
 
                        if not basis.has_id(to_id):
 
1363
                        try:
 
1364
                            basis.id2path(to_id)
 
1365
                        except errors.NoSuchId:
1372
1366
                            rename_entry.change_id = True
1373
1367
                            allowed = True
1374
1368
                if not allowed: