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

Prevent deep recursion if the shamap is out of date.

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
    def from_repository(cls, repository):
160
160
        return cls(os.path.join(repository._transport.local_abspath("."), "git.db"))
161
161
 
162
 
    def _parent_lookup(self, revid):
 
162
    def lookup_commit(self, revid):
163
163
        row = self.db.execute("select sha1 from commits where revid = ?", (revid,)).fetchone()
164
164
        if row is not None:
165
165
            return row[0].encode("utf-8")
281
281
            from bzrlib.config import config_dir
282
282
            return cls(os.path.join(config_dir(), "remote-git.tdb"))
283
283
 
284
 
    def _parent_lookup(self, revid):
 
284
    def lookup_commit(self, revid):
285
285
        return self.db["commit %s" % revid].split(" ")[0]
286
286
 
287
287
    def commit(self):