/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/git/tree.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:
360
360
                    todo.append((store, subpath, hexsha))
361
361
        return ret
362
362
 
363
 
    def has_id(self, file_id):
364
 
        try:
365
 
            path = self.id2path(file_id)
366
 
        except errors.NoSuchId:
367
 
            return False
368
 
        return self.has_filename(path)
369
 
 
370
363
    def _lookup_path(self, path):
371
364
        if self.tree is None:
372
365
            raise errors.NoSuchFile(path)
1021
1014
                    osutils.safe_unicode(path))
1022
1015
            return None
1023
1016
 
1024
 
    def has_id(self, file_id):
1025
 
        try:
1026
 
            self.id2path(file_id)
1027
 
        except errors.NoSuchId:
1028
 
            return False
1029
 
        else:
1030
 
            return True
1031
 
 
1032
1017
    def id2path(self, file_id):
1033
1018
        if file_id is None:
1034
1019
            return ''