/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: Jelmer Vernooij
  • Date: 2019-06-29 13:16:26 UTC
  • mto: This revision was merged to the branch mainline in revision 7376.
  • Revision ID: jelmer@jelmer.uk-20190629131626-qioafloyemhdbm4w
Remove Tree.get_root_id() in favour of Tree.path2id('').

Show diffs side-by-side

added added

removed removed

Lines of Context:
339
339
                    todo.append((store, subpath, hexsha))
340
340
        return ret
341
341
 
342
 
    def get_root_id(self):
343
 
        if self.tree is None:
344
 
            return None
345
 
        return self.path2id("")
346
 
 
347
342
    def has_or_had_id(self, file_id):
348
343
        try:
349
344
            self.id2path(file_id)
491
486
            else:
492
487
                specific_files = set([p.encode('utf-8')
493
488
                                      for p in specific_files])
494
 
        todo = deque([(self.store, b"", self.tree, self.get_root_id())])
 
489
        todo = deque([(self.store, b"", self.tree, self.path2id(''))])
495
490
        if specific_files is None or u"" in specific_files:
496
491
            yield u"", self._get_dir_ie(b"", None)
497
492
        while todo:
998
993
    def _set_root_id(self, file_id):
999
994
        raise errors.UnsupportedOperation(self._set_root_id, self)
1000
995
 
1001
 
    def get_root_id(self):
1002
 
        return self.path2id(u"")
1003
 
 
1004
996
    def _add(self, files, ids, kinds):
1005
997
        for (path, file_id, kind) in zip(files, ids, kinds):
1006
998
            if file_id is not None: