~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Aaron Bentley
  • Date: 2008-12-10 19:56:42 UTC
  • mto: This revision was merged to the branch mainline in revision 3892.
  • Revision ID: aaron@aaronbentley.com-20081210195642-3y1d2azpt2tccgsh
Fix stacking bug

Show diffs side-by-side

added added

removed removed

Lines of Context:
465
465
 
466
466
    def get_graph(self, other_repository=None):
467
467
        """Return the graph for this repository format"""
468
 
        parents_provider = self._make_parents_provider()
469
 
        if (other_repository is not None and
470
 
            other_repository.bzrdir.transport.base !=
471
 
            self.bzrdir.transport.base):
472
 
            parents_provider = graph._StackedParentsProvider(
473
 
                [self._unstacked_provider,
474
 
                 other_repository._make_parents_provider()])
 
468
        parents_provider = self._make_parents_provider(other_repository)
475
469
        return graph.Graph(parents_provider)
476
470
 
477
471
    def gather_stats(self, revid=None, committers=None):
1181
1175
        self._ensure_real()
1182
1176
        return self._real_repository._check_for_inconsistent_revision_parents()
1183
1177
 
1184
 
    def _make_parents_provider(self):
 
1178
    def _make_parents_provider(self, other=None):
1185
1179
        providers = [self._unstacked_provider]
 
1180
        if other is not None:
 
1181
            providers.insert(0, other)
1186
1182
        providers.extend(r._make_parents_provider() for r in
1187
1183
                         self._fallback_repositories)
1188
1184
        return graph._StackedParentsProvider(providers)