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

Add lookup_revision_id stub.

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
    def get_signature_text(self, revision_id):
112
112
        raise errors.NoSuchRevision(self, revision_id)
113
113
 
 
114
    def lookup_revision_id(self, revid):
 
115
        """Lookup a revision id.
 
116
        
 
117
        :param revid: Bazaar revision id.
 
118
        :return: Tuple with git revisionid and mapping.
 
119
        """
 
120
        # Yes, this doesn't really work, but good enough as a stub
 
121
        return osutils.sha(rev_id).hexdigest(), self.get_mapping()
 
122
 
114
123
    def has_signature_for_revision_id(self, revision_id):
115
124
        return False
116
125
 
120
129
            if revid == revision.NULL_REVISION:
121
130
                ret[revid] = ()
122
131
            else:
123
 
                commit = self._git.commit(self.lookup_git_revid(revid, default_mapping))
124
 
                ret[revid] = tuple([default_mapping.revision_id_foreign_to_bzr(p.id) for p in commit.parents])
 
132
                ret[revid] = tuple([self.get_mapping().revision_id_foreign_to_bzr(p.id) for p in commit.parents])
125
133
        return ret
126
134
 
127
135
    def lookup_git_revid(self, bzr_revid, mapping):