~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/controldir.py

  • Committer: Andrew Bennetts
  • Date: 2010-12-02 01:59:52 UTC
  • mto: This revision was merged to the branch mainline in revision 5648.
  • Revision ID: andrew.bennetts@canonical.com-20101202015952-4zdgxwi3975rscd1
Fix a bug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
       the target itself is new don't want to refetch existing revs)
104
104
 
105
105
    :ivar source_branch: the source branch if one specified, else None.
 
106
    :ivar source_branch_stop_revision: fetch up to this revision of
 
107
        source_branch, rather than its tip.
106
108
    :ivar source_repo: the source repository if one found, else None.
107
109
    :ivar target_repo: the target repository acquired by sprout.
108
110
    :ivar target_repo_kind: one of the _TargetRepoKinds constants.
111
113
    def __init__(self):
112
114
        self.explicit_rev_ids = set()
113
115
        self.source_branch = None
 
116
        self.source_branch_stop_revision = None
114
117
        self.source_repo = None
115
118
        self.target_repo = None
116
119
        self.target_repo_kind = None
141
144
                    self.source_branch.tags.get_reverse_tag_dict())
142
145
            except errors.TagsNotSupported:
143
146
                pass
144
 
            heads_to_fetch.add(self.source_branch.last_revision())
 
147
            if self.source_branch_stop_revision is not None:
 
148
                heads_to_fetch.add(self.source_branch_stop_revision)
 
149
            else:
 
150
                heads_to_fetch.add(self.source_branch.last_revision())
145
151
        if self.target_repo_kind == _TargetRepoKinds.EMPTY:
146
152
            if not tags_to_fetch:
147
153
                return graph.PendingAncestryResult(heads_to_fetch, self.source_repo)