~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revision.py

first cut at merge from integration.

Show diffs side-by-side

added added

removed removed

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