~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revision.py

Dirty merge of the mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
                if rev_id in br2_only and not branch is br2:
113
113
                    continue
114
114
                mutter('ancestry of {%s}: %r',
115
 
                       rev_id, branch.get_ancestry(rev_id))
116
 
                self.assertEquals(sorted(branch.get_ancestry(rev_id)),
117
 
                                  [None] + sorted(anc))
 
115
                       rev_id, branch.repository.get_ancestry(rev_id))
 
116
                result = sorted(branch.repository.get_ancestry(rev_id))
 
117
                self.assertEquals(result, [None] + sorted(anc))
118
118
    
119
119
    
120
120
    def test_is_ancestor(self):
157
157
        self.br2.working_tree().commit("Commit fifteen", rev_id="b@u-0-10")
158
158
 
159
159
        from bzrlib.revision import MultipleRevisionSources
160
 
        self.sources = MultipleRevisionSources(self.br1, self.br2)
 
160
        self.sources = MultipleRevisionSources(self.br1.repository,
 
161
                                               self.br2.repository)
161
162
 
162
163
    def intervene(self, ancestor, revision, revision_history=None):
163
164
        from bzrlib.revision import get_intervening_revisions
214
215
        br1, br2 = make_branches(self)
215
216
        revisions = br1.revision_history()
216
217
        revisions_2 = br2.revision_history()
217
 
        sources = br1
 
218
        sources = br1.repository
218
219
 
219
220
        expected_ancestors_list = {revisions[3]:(0, 0), 
220
221
                                   revisions[2]:(1, 1),
253
254
        br1, br2 = make_branches(self)
254
255
        revisions = br1.revision_history()
255
256
        revisions_2 = br2.revision_history()
256
 
        sources = MultipleRevisionSources(br1, br2)
 
257
        sources = MultipleRevisionSources(br1.repository, br2.repository)
257
258
        expected_ancestors_list = {revisions[3]:(0, 0), 
258
259
                                   revisions[2]:(1, 1),
259
260
                                   revisions_2[4]:(2, 1), 
288
289
        Ensure it's not order-sensitive
289
290
        """
290
291
        br1, br2 = make_branches(self)
291
 
        source = MultipleRevisionSources(br1, br2)
 
292
        source = MultipleRevisionSources(br1.repository, br2.repository)
292
293
        combined_1 = combined_graph(br1.last_revision(), 
293
294
                                    br2.last_revision(), source)
294
295
        combined_2 = combined_graph(br2.last_revision(),