/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

Fix fastexport-based tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
683
683
            refs.update(new_refs)
684
684
            return refs
685
685
        old_refs, new_refs = self.interrepo.fetch_refs(update_refs)
686
 
        result.old_revid = self.target.lookup_foreign_revision_id(
687
 
            old_refs.get(main_ref, ZERO_SHA))
688
 
        result.new_revid = new_refs[main_ref]
 
686
        (result.old_revid, old_sha1) = old_refs.get(main_ref, (ZERO_SHA, NULL_REVISION))
 
687
        if result.old_revid is None:
 
688
            result.old_revid = self.target.lookup_foreign_revision_id(old_sha1)
 
689
        result.new_revid = new_refs[main_ref][1]
689
690
        return result
690
691
 
691
692
    def push(self, overwrite=False, stop_revision=None,
704
705
        (result.old_revid, old_sha1) = old_refs.get(main_ref, (ZERO_SHA, NULL_REVISION))
705
706
        if result.old_revid is None:
706
707
            result.old_revid = self.target.lookup_foreign_revision_id(old_sha1)
707
 
        result.new_revid = new_refs[main_ref]
 
708
        result.new_revid = new_refs[main_ref][1]
708
709
        return result
709
710
 
710
711
    def lossy_push(self, stop_revision=None):