/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-05-13 22:54:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6968.
  • Revision ID: jelmer@jelmer.uk-20180513225428-5ysu0bs9rtk7045h
Initial work to support brz-git on python3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
    try:
87
87
        import sqlite3
88
88
        check_pysqlite_version(sqlite3)
89
 
    except (ImportError, bzr_errors.BzrError), e:
 
89
    except (ImportError, bzr_errors.BzrError) as e:
90
90
        from pysqlite2 import dbapi2 as sqlite3
91
91
        check_pysqlite_version(sqlite3)
92
92
except:
396
396
class SqliteGitCacheFormat(BzrGitCacheFormat):
397
397
 
398
398
    def get_format_string(self):
399
 
        return 'bzr-git sha map version 1 using sqlite\n'
 
399
        return b'bzr-git sha map version 1 using sqlite\n'
400
400
 
401
401
    def open(self, transport):
402
402
        try:
577
577
    """Cache format for tdb-based caches."""
578
578
 
579
579
    def get_format_string(self):
580
 
        return 'bzr-git sha map version 3 using tdb\n'
 
580
        return b'bzr-git sha map version 3 using tdb\n'
581
581
 
582
582
    def open(self, transport):
583
583
        try:
763
763
class IndexGitCacheFormat(BzrGitCacheFormat):
764
764
 
765
765
    def get_format_string(self):
766
 
        return 'bzr-git sha map with git object cache version 1\n'
 
766
        return b'bzr-git sha map with git object cache version 1\n'
767
767
 
768
768
    def initialize(self, transport):
769
769
        super(IndexGitCacheFormat, self).initialize(transport)