~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-05-01 07:33:09 UTC
  • mfrom: (4307.2.6 push.roundtrips)
  • Revision ID: pqm@pqm.ubuntu.com-20090501073309-ysq34enbsw9avhyw
(robertc) Many less round trips on bzr push to a smart server.
        (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3092
3092
        """
3093
3093
        target_graph = self.target.get_graph()
3094
3094
        revision_ids = frozenset(revision_ids)
3095
 
        # Fast path for the case where all the revisions are already in the
3096
 
        # target repo.
3097
 
        # (Although this does incur an extra round trip for the
3098
 
        # fairly common case where the target doesn't already have the revision
3099
 
        # we're pushing.)
3100
 
        if set(target_graph.get_parent_map(revision_ids)) == revision_ids:
3101
 
            return graph.SearchResult(revision_ids, set(), 0, set())
3102
3095
        missing_revs = set()
3103
3096
        source_graph = self.source.get_graph()
3104
3097
        # ensure we don't pay silly lookup costs.