~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_annotate.py

  • Committer: Martin Packman
  • Date: 2012-01-05 09:50:04 UTC
  • mfrom: (6424 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6426.
  • Revision ID: martin.packman@canonical.com-20120105095004-mia9xb7y0efmto0v
Merge bzr.dev to resolve conflicts in bzrlib.builtins

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    tests,
30
30
    )
31
31
 
 
32
from bzrlib.tests.matchers import ContainsNoVfsCalls
32
33
from bzrlib.urlutils import joinpath
33
34
 
34
35
 
307
308
        wt.commit('commit', committer='test@user')
308
309
        out, err = self.run_bzr(['annotate', '-d', 'a', 'hello.txt'])
309
310
        self.assertEqualDiff('1   test@us | my helicopter\n', out)
 
311
 
 
312
 
 
313
class TestSmartServerAnnotate(tests.TestCaseWithTransport):
 
314
 
 
315
    def test_simple_annotate(self):
 
316
        self.setup_smart_server_with_call_log()
 
317
        wt = self.make_branch_and_tree('branch')
 
318
        self.build_tree_contents([('branch/hello.txt', 'my helicopter\n')])
 
319
        wt.add(['hello.txt'])
 
320
        wt.commit('commit', committer='test@user')
 
321
        self.reset_smart_call_log()
 
322
        out, err = self.run_bzr(['annotate', "-d", self.get_url('branch'),
 
323
            "hello.txt"])
 
324
        # This figure represent the amount of work to perform this use case. It
 
325
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
326
        # being too low. If rpc_count increases, more network roundtrips have
 
327
        # become necessary for this use case. Please do not adjust this number
 
328
        # upwards without agreement from bzr's network support maintainers.
 
329
        self.assertLength(16, self.hpss_calls)
 
330
        self.assertLength(1, self.hpss_connections)
 
331
        self.expectFailure("annotate accesses inventories, which require VFS access",
 
332
            self.assertThat, self.hpss_calls, ContainsNoVfsCalls)