~bzr/bzr/bzr.1.5

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revision.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-05-07 07:27:16 UTC
  • mfrom: (3408.2.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080507072716-lr54bdt55km4feso
(mbp) Remove code deprecated prior to 1.1 and its tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from bzrlib.deprecated_graph import Graph
28
28
from bzrlib.revision import (find_present_ancestors, combined_graph,
29
29
                             common_ancestor,
30
 
                             is_ancestor, MultipleRevisionSources,
 
30
                             MultipleRevisionSources,
31
31
                             NULL_REVISION)
32
 
from bzrlib.symbol_versioning import one_zero, one_three
 
32
from bzrlib.symbol_versioning import one_three
33
33
from bzrlib.tests import TestCase, TestCaseWithTransport
34
34
from bzrlib.trace import mutter
35
35
from bzrlib.workingtree import WorkingTree
127
127
                self.assertEquals(result, [None] + sorted(anc))
128
128
    
129
129
    
130
 
    def test_is_ancestor(self):
131
 
        """Test checking whether a revision is an ancestor of another revision"""
132
 
        br1, br2 = make_branches(self)
133
 
        revisions = br1.revision_history()
134
 
        revisions_2 = br2.revision_history()
135
 
        sources = br1
136
 
 
137
 
        br1.lock_read()
138
 
        br2.lock_read()
139
 
        self.addCleanup(br1.unlock)
140
 
        br2.lock_read()
141
 
        self.addCleanup(br2.unlock)
142
 
 
143
 
        self.assertTrue(self.applyDeprecated(one_zero,
144
 
                        is_ancestor, revisions[0], revisions[0], br1))
145
 
        self.assertTrue(self.applyDeprecated(one_zero,
146
 
                        is_ancestor, revisions[1], revisions[0], sources))
147
 
        self.assertFalse(self.applyDeprecated(one_zero,
148
 
                         is_ancestor, revisions[0], revisions[1], sources))
149
 
        self.assertTrue(self.applyDeprecated(one_zero,
150
 
                        is_ancestor, revisions_2[3], revisions[0], sources))
151
 
        # disabled mbp 20050914, doesn't seem to happen anymore
152
 
        ## self.assertRaises(NoSuchRevision, is_ancestor, revisions_2[3],
153
 
        ##                  revisions[0], br1)
154
 
        self.assertTrue(self.applyDeprecated(one_zero,
155
 
                        is_ancestor, revisions[3], revisions_2[4], sources))
156
 
        self.assertTrue(self.applyDeprecated(one_zero,
157
 
                        is_ancestor, revisions[3], revisions_2[4], br1))
158
 
        self.assertTrue(self.applyDeprecated(one_zero,
159
 
                        is_ancestor, revisions[3], revisions_2[3], sources))
160
 
        ## self.assert_(not is_ancestor(revisions[3], revisions_2[3], br1))
161
 
 
162
 
 
163
130
class TestIntermediateRevisions(TestCaseWithTransport):
164
131
 
165
132
    def setUp(self):