~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

Don't make heads_to_fetch() take a stop_revision.

Show diffs side-by-side

added added

removed removed

Lines of Context:
375
375
    def add_revision_ids(self, revision_ids):
376
376
        """Add revision_ids to the set of revision_ids to be fetched."""
377
377
        self._explicit_rev_ids.update(revision_ids)
378
 
 
 
378
        
379
379
    def make_fetch_spec(self):
380
380
        """Build a SearchResult or PendingAncestryResult or etc."""
381
381
        if self.target_repo_kind is None or self.source_repo is None:
392
392
                    self.target_repo, self.source_repo).execute()
393
393
        heads_to_fetch = set(self._explicit_rev_ids)
394
394
        if self.source_branch is not None:
395
 
            must_fetch, if_present_fetch = self.source_branch.heads_to_fetch(
396
 
                stop_revision=self.source_branch_stop_revision_id)
 
395
            must_fetch, if_present_fetch = self.source_branch.heads_to_fetch()
 
396
            if self.source_branch_stop_revision_id is not None:
 
397
                # Replace the tip rev from must_fetch with the stop revision
 
398
                # XXX: this might be wrong if the tip rev is also in the
 
399
                # must_fetch set for other reasons (e.g. it's the tip of
 
400
                # multiple loom threads?), but then it's pretty unclear what it
 
401
                # should mean to specify a stop_revision in that case anyway.
 
402
                must_fetch.discard(self.source_branch.last_revision())
 
403
                must_fetch.add(self.source_branch_stop_revision_id)
397
404
            heads_to_fetch.update(must_fetch)
398
405
        else:
399
406
            if_present_fetch = set()