~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-01-23 19:08:05 UTC
  • mfrom: (6437.3.20 2.5)
  • mto: This revision was merged to the branch mainline in revision 6450.
  • Revision ID: jelmer@samba.org-20120123190805-hlcuihkt2dep44cw
merge bzr 2.5.

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
 
177
178
 
178
179
    def test_annotate_edited_file(self):
179
180
        tree = self._setup_edited_file()
180
 
        tree.branch.get_config().set_user_option('email', 'current@host2')
 
181
        self.overrideEnv('BZR_EMAIL', 'current@host2')
181
182
        out, err = self.run_bzr('annotate file')
182
183
        self.assertEqual(
183
184
            '1   test@ho | foo\n'
202
203
 
203
204
    def test_annotate_edited_file_show_ids(self):
204
205
        tree = self._setup_edited_file()
205
 
        tree.branch.get_config().set_user_option('email', 'current@host2')
 
206
        self.overrideEnv('BZR_EMAIL', 'current@host2')
206
207
        out, err = self.run_bzr('annotate file --show-ids')
207
208
        self.assertEqual(
208
209
            '    rev1 | foo\n'
325
326
        # being too low. If rpc_count increases, more network roundtrips have
326
327
        # become necessary for this use case. Please do not adjust this number
327
328
        # upwards without agreement from bzr's network support maintainers.
328
 
        self.assertLength(19, self.hpss_calls)
 
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)