~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2011-11-24 15:48:29 UTC
  • mfrom: (6289 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6337.
  • Revision ID: v.ladeuil+lp@free.fr-20111124154829-avowjpsxdl8yp2vz
merge trunk resolving conflicts

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
33
32
from bzrlib.urlutils import joinpath
34
33
 
35
34
 
178
177
 
179
178
    def test_annotate_edited_file(self):
180
179
        tree = self._setup_edited_file()
181
 
        self.overrideEnv('BZR_EMAIL', 'current@host2')
 
180
        tree.branch.get_config().set_user_option('email', 'current@host2')
182
181
        out, err = self.run_bzr('annotate file')
183
182
        self.assertEqual(
184
183
            '1   test@ho | foo\n'
203
202
 
204
203
    def test_annotate_edited_file_show_ids(self):
205
204
        tree = self._setup_edited_file()
206
 
        self.overrideEnv('BZR_EMAIL', 'current@host2')
 
205
        tree.branch.get_config().set_user_option('email', 'current@host2')
207
206
        out, err = self.run_bzr('annotate file --show-ids')
208
207
        self.assertEqual(
209
208
            '    rev1 | foo\n'
233
232
    def test_annotated_edited_merged_file_revnos(self):
234
233
        wt = self._create_merged_file()
235
234
        out, err = self.run_bzr(['annotate', 'file'])
236
 
        email = config.extract_email_address(
237
 
            wt.branch.get_config_stack().get('email'))
 
235
        email = config.extract_email_address(wt.branch.get_config().username())
238
236
        self.assertEqual(
239
237
            '3?    %-7s | local\n'
240
238
            '1     test@ho | foo\n'
327
325
        # being too low. If rpc_count increases, more network roundtrips have
328
326
        # become necessary for this use case. Please do not adjust this number
329
327
        # upwards without agreement from bzr's network support maintainers.
330
 
        self.assertLength(16, self.hpss_calls)
331
 
        self.assertLength(1, self.hpss_connections)
332
 
        self.expectFailure("annotate accesses inventories, which require VFS access",
333
 
            self.assertThat, self.hpss_calls, ContainsNoVfsCalls)
 
328
        self.assertLength(19, self.hpss_calls)