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

In .testr.conf; run all git-relevant tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
        """
121
121
        raise NotImplementedError(self.lookup_tree_id)
122
122
 
 
123
    def lookup_commit(self, revid):
 
124
        """Retrieve a Git commit SHA by Bazaar revision id.
 
125
        """
 
126
        raise NotImplementedError(self.lookup_commit)
 
127
 
123
128
    def revids(self):
124
129
        """List the revision ids known."""
125
130
        raise NotImplementedError(self.revids)
516
521
 
517
522
    def open(self, transport):
518
523
        try:
519
 
            basepath = transport.local_abspath(".")
 
524
            basepath = transport.local_abspath(".").encode(osutils._fs_enc)
520
525
        except bzrlib.errors.NotLocalUrl:
521
526
            basepath = get_cache_dir()
 
527
        assert isinstance(basepath, str)
522
528
        try:
523
529
            return TdbBzrGitCache(os.path.join(basepath, "idmap.tdb"))
524
530
        except ImportError:
547
553
        if path is None:
548
554
            self.db = {}
549
555
        else:
 
556
            assert isinstance(path, str)
550
557
            if not mapdbs().has_key(path):
551
558
                mapdbs()[path] = tdb.Tdb(path, self.TDB_HASH_SIZE, tdb.DEFAULT,
552
559
                                          os.O_RDWR|os.O_CREAT)