/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 breezy/tests/blackbox/test_revno.py

  • Committer: Breezy landing bot
  • Author(s): Gustav Hartvigsson
  • Date: 2021-01-10 18:46:30 UTC
  • mfrom: (7526.1.1 brz-removed-api-doc)
  • mto: This revision was merged to the branch mainline in revision 7532.
  • Revision ID: breezy.the.bot@gmail.com-20210110184630-dxu0g9dqq020uiw6
Drop documentation for removed API API.

Merged from https://code.launchpad.net/~gustav-hartvigsson/brz/removed-api-doc/+merge/396033

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from breezy import tests
24
24
from breezy.errors import NoSuchRevision
25
 
from breezy.tests.matchers import ContainsNoVfsCalls
 
25
from breezy.bzr.tests.matchers import ContainsNoVfsCalls
26
26
 
27
27
 
28
28
class TestRevno(tests.TestCaseWithTransport):
160
160
        self.assertEqual(
161
161
            'brz: ERROR: --tree and --revision can not be used together\n',
162
162
            err)
163
 
 
164
 
 
165
 
class TestSmartServerRevno(tests.TestCaseWithTransport):
166
 
 
167
 
    def test_simple_branch_revno(self):
168
 
        self.setup_smart_server_with_call_log()
169
 
        t = self.make_branch_and_tree('branch')
170
 
        self.build_tree_contents([('branch/foo', b'thecontents')])
171
 
        t.add("foo")
172
 
        revid = t.commit("message")
173
 
        self.reset_smart_call_log()
174
 
        out, err = self.run_bzr(['revno', self.get_url('branch')])
175
 
        # This figure represent the amount of work to perform this use case. It
176
 
        # is entirely ok to reduce this number if a test fails due to rpc_count
177
 
        # being too low. If rpc_count increases, more network roundtrips have
178
 
        # become necessary for this use case. Please do not adjust this number
179
 
        # upwards without agreement from bzr's network support maintainers.
180
 
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
181
 
        self.assertLength(1, self.hpss_connections)
182
 
        self.assertLength(6, self.hpss_calls)
183
 
 
184
 
    def test_simple_branch_revno_lookup(self):
185
 
        self.setup_smart_server_with_call_log()
186
 
        t = self.make_branch_and_tree('branch')
187
 
        self.build_tree_contents([('branch/foo', b'thecontents')])
188
 
        t.add("foo")
189
 
        revid1 = t.commit("message")
190
 
        revid2 = t.commit("message")
191
 
        self.reset_smart_call_log()
192
 
        out, err = self.run_bzr(['revno', '-rrevid:' + revid1.decode('utf-8'),
193
 
                                 self.get_url('branch')])
194
 
        # This figure represent the amount of work to perform this use case. It
195
 
        # is entirely ok to reduce this number if a test fails due to rpc_count
196
 
        # being too low. If rpc_count increases, more network roundtrips have
197
 
        # become necessary for this use case. Please do not adjust this number
198
 
        # upwards without agreement from bzr's network support maintainers.
199
 
        self.assertLength(5, self.hpss_calls)
200
 
        self.assertLength(1, self.hpss_connections)
201
 
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)