/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
These check that it behaves properly when it's invoked through the regular
22
22
command-line interface. This doesn't actually run a new interpreter but
23
 
rather starts again from the run_bzr function.
 
23
rather starts again from the run_brz function.
24
24
"""
25
25
 
26
26
 
27
 
from bzrlib import (
 
27
from breezy import (
28
28
    config,
29
29
    tests,
30
30
    )
31
31
 
32
 
from bzrlib.tests.matchers import ContainsNoVfsCalls
33
 
from bzrlib.urlutils import joinpath
 
32
from breezy.tests.matchers import ContainsNoVfsCalls
 
33
from breezy.urlutils import joinpath
34
34
 
35
35
 
36
36
class TestAnnotate(tests.TestCaseWithTransport):
147
147
        out, err = self.run_bzr('annotate hello.txt -r1..2',
148
148
                                retcode=3)
149
149
        self.assertEqual('', out)
150
 
        self.assertEqual('bzr: ERROR: bzr annotate --revision takes'
 
150
        self.assertEqual('brz: ERROR: brz annotate --revision takes'
151
151
                         ' exactly one revision identifier\n',
152
152
                         err)
153
153
 
178
178
 
179
179
    def test_annotate_edited_file(self):
180
180
        tree = self._setup_edited_file()
181
 
        self.overrideEnv('BZR_EMAIL', 'current@host2')
 
181
        self.overrideEnv('BRZ_EMAIL', 'current@host2')
182
182
        out, err = self.run_bzr('annotate file')
183
183
        self.assertEqual(
184
184
            '1   test@ho | foo\n'
189
189
    def test_annotate_edited_file_no_default(self):
190
190
        # Ensure that when no username is available annotate still works.
191
191
        self.overrideEnv('EMAIL', None)
192
 
        self.overrideEnv('BZR_EMAIL', None)
 
192
        self.overrideEnv('BRZ_EMAIL', None)
193
193
        # Also, make sure that it's not inferred from mailname.
194
194
        self.overrideAttr(config, '_auto_user_id',
195
195
            lambda: (None, None))
203
203
 
204
204
    def test_annotate_edited_file_show_ids(self):
205
205
        tree = self._setup_edited_file()
206
 
        self.overrideEnv('BZR_EMAIL', 'current@host2')
 
206
        self.overrideEnv('BRZ_EMAIL', 'current@host2')
207
207
        out, err = self.run_bzr('annotate file --show-ids')
208
208
        self.assertEqual(
209
209
            '    rev1 | foo\n'
288
288
        tree.commit('add a file')
289
289
        out, err = self.run_bzr(['annotate', 'doesnotexist'], retcode=3)
290
290
        self.assertEqual('', out)
291
 
        self.assertEqual("bzr: ERROR: doesnotexist is not versioned.\n", err)
 
291
        self.assertEqual("brz: ERROR: doesnotexist is not versioned.\n", err)
292
292
 
293
293
    def test_annotate_without_workingtree(self):
294
294
        tree = self.make_branch_and_tree('.')