/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_annotate.py

  • Committer: Jelmer Vernooij
  • Date: 2019-03-04 00:16:27 UTC
  • mfrom: (7293 work)
  • mto: This revision was merged to the branch mainline in revision 7318.
  • Revision ID: jelmer@jelmer.uk-20190304001627-v6u7o6pf97tukhek
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
                                  ('nomail.txt', b'nomail\n')])
44
44
        wt.add(['hello.txt'])
45
45
        self.revision_id_1 = wt.commit('add hello',
46
 
                              committer='test@user',
47
 
                              timestamp=1165960000.00, timezone=0)
 
46
                                       committer='test@user',
 
47
                                       timestamp=1165960000.00, timezone=0)
48
48
        wt.add(['nomail.txt'])
49
49
        self.revision_id_2 = wt.commit('add nomail',
50
 
                              committer='no mail',
51
 
                              timestamp=1165970000.00, timezone=0)
 
50
                                       committer='no mail',
 
51
                                       timestamp=1165970000.00, timezone=0)
52
52
        self.build_tree_contents([('hello.txt', b'my helicopter\n'
53
53
                                                b'your helicopter\n')])
54
54
        self.revision_id_3 = wt.commit('mod hello',
55
 
                              committer='user@test',
56
 
                              timestamp=1166040000.00, timezone=0)
 
55
                                       committer='user@test',
 
56
                                       timestamp=1166040000.00, timezone=0)
57
57
        self.build_tree_contents([('hello.txt', b'my helicopter\n'
58
58
                                                b'your helicopter\n'
59
59
                                                b'all of\n'
60
60
                                                b'our helicopters\n'
61
 
                                  )])
 
61
                                   )])
62
62
        self.revision_id_4 = wt.commit('mod hello',
63
 
                              committer='user@test',
64
 
                              timestamp=1166050000.00, timezone=0)
 
63
                                       committer='user@test',
 
64
                                       timestamp=1166050000.00, timezone=0)
65
65
 
66
66
    def test_help_annotate(self):
67
67
        """Annotate command exists"""
109
109
%*s | all of
110
110
%*s | our helicopters
111
111
''' % (max_len, self.revision_id_1.decode('utf-8'),
112
 
       max_len, self.revision_id_3.decode('utf-8'),
113
 
       max_len, self.revision_id_4.decode('utf-8'),
114
 
       max_len, '',
115
 
      )
116
 
, out)
 
112
            max_len, self.revision_id_3.decode('utf-8'),
 
113
            max_len, self.revision_id_4.decode('utf-8'),
 
114
            max_len, '',
 
115
       ), out)
117
116
 
118
117
    def test_no_mail(self):
119
118
        out, err = self.run_bzr('annotate nomail.txt')
192
191
        self.overrideEnv('BRZ_EMAIL', None)
193
192
        # Also, make sure that it's not inferred from mailname.
194
193
        self.overrideAttr(config, '_auto_user_id',
195
 
            lambda: (None, None))
 
194
                          lambda: (None, None))
196
195
        tree = self._setup_edited_file()
197
196
        out, err = self.run_bzr('annotate file')
198
197
        self.assertEqual(
321
320
        wt.commit('commit', committer='test@user')
322
321
        self.reset_smart_call_log()
323
322
        out, err = self.run_bzr(['annotate', "-d", self.get_url('branch'),
324
 
            "hello.txt"])
 
323
                                 "hello.txt"])
325
324
        # This figure represent the amount of work to perform this use case. It
326
325
        # is entirely ok to reduce this number if a test fails due to rpc_count
327
326
        # being too low. If rpc_count increases, more network roundtrips have