/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-03-28 06:42:20 UTC
  • mfrom: (3287.6.9 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080328064220-ongijg78bfqhvbay
Deprecate a number of VersionedFile method calls,
        and Repository.get_revision_graph. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
from bzrlib.revision import NULL_REVISION
46
46
from bzrlib.smart import server, medium
47
47
from bzrlib.smart.client import _SmartClient
 
48
from bzrlib.symbol_versioning import one_four
48
49
from bzrlib.transport.memory import MemoryTransport
49
50
from bzrlib.transport.remote import RemoteTransport
50
51
 
707
708
        transport_path = 'empty'
708
709
        repo, client = self.setup_fake_client_and_repository(
709
710
            responses, transport_path)
710
 
        result = repo.get_revision_graph(NULL_REVISION)
 
711
        result = self.applyDeprecated(one_four, repo.get_revision_graph,
 
712
            NULL_REVISION)
711
713
        self.assertEqual([], client._calls)
712
714
        self.assertEqual({}, result)
713
715
 
722
724
        transport_path = 'sinhala'
723
725
        repo, client = self.setup_fake_client_and_repository(
724
726
            responses, transport_path)
725
 
        result = repo.get_revision_graph()
 
727
        result = self.applyDeprecated(one_four, repo.get_revision_graph)
726
728
        self.assertEqual(
727
729
            [('call_expecting_body', 'Repository.get_revision_graph',
728
730
             ('sinhala/', ''))],
742
744
        transport_path = 'sinhala'
743
745
        repo, client = self.setup_fake_client_and_repository(
744
746
            responses, transport_path)
745
 
        result = repo.get_revision_graph(r2)
 
747
        result = self.applyDeprecated(one_four, repo.get_revision_graph, r2)
746
748
        self.assertEqual(
747
749
            [('call_expecting_body', 'Repository.get_revision_graph',
748
750
             ('sinhala/', r2))],
757
759
            responses, transport_path)
758
760
        # also check that the right revision is reported in the error
759
761
        self.assertRaises(errors.NoSuchRevision,
760
 
            repo.get_revision_graph, revid)
 
762
            self.applyDeprecated, one_four, repo.get_revision_graph, revid)
761
763
        self.assertEqual(
762
764
            [('call_expecting_body', 'Repository.get_revision_graph',
763
765
             ('sinhala/', revid))],