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

More work on roundtrip push support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
 
115
115
    def set_tag(self, name, revid):
116
116
        self.repository._git.refs[tag_name_to_ref(name)], _ = \
117
 
            self.branch.mapping.revision_id_bzr_to_foreign(revid)
 
117
            self.branch.lookup_bzr_revision_id(revid)
118
118
 
119
119
 
120
120
class DictTagDict(LocalGitTagDict):
257
257
        return self.repository.lookup_foreign_revision_id(foreign_revid,
258
258
            self.mapping)
259
259
 
 
260
    def lookup_bzr_revision_id(self, revid):
 
261
        return self.repository.lookup_bzr_revision_id(
 
262
            revid, mapping=self.mapping)
 
263
 
260
264
 
261
265
class LocalGitBranch(GitBranch):
262
266
    """A local Git branch."""
697
701
            refs.update(new_refs)
698
702
            return refs
699
703
        old_refs, new_refs = self.interrepo.fetch_refs(update_refs)
700
 
        result.old_revid = self.target.lookup_foreign_revision_id(
701
 
            old_refs.get(main_ref, ZERO_SHA))
 
704
        (result.old_revid, old_sha1) = old_refs.get(main_ref, (ZERO_SHA, NULL_REVISION))
 
705
        if result.old_revid is None:
 
706
            result.old_revid = self.target.lookup_foreign_revision_id(old_sha1)
702
707
        result.new_revid = new_refs[main_ref]
703
708
        return result
704
709