/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/plugins/git/cache.py

  • Committer: Jelmer Vernooij
  • Date: 2018-07-01 21:13:21 UTC
  • mto: This revision was merged to the branch mainline in revision 7027.
  • Revision ID: jelmer@jelmer.uk-20180701211321-dazu15ry3tcvny2l
Fix some git tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
694
694
                ret.add(revid)
695
695
        return ret
696
696
 
 
697
    def _keys(self):
 
698
        try:
 
699
            return self.db.keys()
 
700
        except AttributeError:  # python < 3
 
701
            return self.db.iterkeys()
 
702
 
697
703
    def revids(self):
698
704
        """List the revision ids known."""
699
 
        for key in self.db.keys():
 
705
        for key in self._keys():
700
706
            if key.startswith(b"commit\0"):
701
707
                yield key[7:]
702
708
 
703
709
    def sha1s(self):
704
710
        """List the SHA1s."""
705
 
        for key in self.db.iterkeys():
 
711
        for key in self._keys():
706
712
            if key.startswith(b"git\0"):
707
713
                yield sha_to_hex(key[4:])
708
714