~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/controldir.py

  • Committer: Andrew Bennetts
  • Date: 2010-12-06 02:42:26 UTC
  • mto: This revision was merged to the branch mainline in revision 5648.
  • Revision ID: andrew.bennetts@canonical.com-20101206024226-gpcin9qr2yzyv74y
Remove XXX, add some test coverage to prove it works.

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
            else:
150
150
                heads_to_fetch.add(self.source_branch.last_revision())
151
151
        if self.target_repo_kind == _TargetRepoKinds.EMPTY:
152
 
            if not tags_to_fetch:
153
 
                return graph.PendingAncestryResult(heads_to_fetch, self.source_repo)
154
 
            else:
155
 
                # XXX: add if_present_ids feature to PendingAncestryResult
156
 
                pass
 
152
            # PendingAncestryResult does not raise errors if a requested head
 
153
            # is absent.  Ideally it would support the
 
154
            # required_ids/if_present_ids distinction, but in practice
 
155
            # heads_to_fetch will almost certainly be present so this doesn't
 
156
            # matter much.
 
157
            all_heads = heads_to_fetch.union(tags_to_fetch)
 
158
            return graph.PendingAncestryResult(all_heads, self.source_repo)
157
159
        return graph.NotInOtherForRevs(self.target_repo, self.source_repo,
158
160
            required_ids=heads_to_fetch, if_present_ids=tags_to_fetch)
159
161