/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

Use InterRepo directly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
623
623
class InterToGitBranch(branch.InterBranch):
624
624
    """InterBranch implementation that pulls from Git into bzr."""
625
625
 
 
626
    def __init__(self, source, target):
 
627
        super(InterToGitBranch, self).__init__(source, target)
 
628
        self.interrepo = repository.InterRepository.get(source.repository,
 
629
                                           target.repository)
 
630
 
626
631
    @staticmethod
627
632
    def _get_branch_formats_to_test():
628
633
        return None, None
656
661
        refs = dict(old_refs)
657
662
        new_refs, main_ref = self._get_new_refs(stop_revision)
658
663
        refs.update(new_refs)
659
 
        self.target.repository.fetch_refs(self.source.repository, refs)
 
664
        self.interrepo.fetch_refs(refs)
660
665
        result.old_revid = self.target.lookup_foreign_revision_id(
661
666
            old_refs.get(main_ref, ZERO_SHA))
662
667
        result.new_revid = refs[main_ref]
673
678
        refs = dict(old_refs)
674
679
        new_refs, main_ref = self._get_new_refs(stop_revision)
675
680
        refs.update(new_refs)
676
 
        self.target.repository.fetch_refs(self.source.repository, refs)
 
681
        self.interrepo.fetch_refs(refs)
677
682
        result.old_revid = self.target.lookup_foreign_revision_id(
678
683
            old_refs.get(main_ref, ZERO_SHA))
679
684
        result.new_revid = refs[main_ref]
686
691
        result.target_branch = self.target
687
692
        # FIXME: Check for diverged branches
688
693
        refs, main_ref = self._get_new_refs(stop_revision)
689
 
        result.revidmap, old_refs, new_refs = self.target.repository.dfetch_refs(
690
 
            self.source.repository, refs)
 
694
        result.revidmap, old_refs, new_refs = self.interrepo.dfetch_refs(refs)
691
695
        result.old_revid = self.target.lookup_foreign_revision_id(
692
696
            old_refs.get(self.target.ref, ZERO_SHA))
693
697
        result.new_revid = self.target.lookup_foreign_revision_id(