~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-04-19 08:31:08 UTC
  • mfrom: (1666.1.5 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060419083108-fab2970f4575b010
Change the default branch format to be metadir. (Robert Collins, Aaron Bentley).

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
import shutil
41
41
import sys
42
42
 
 
43
import bzrlib
43
44
from bzrlib.branch import Branch
44
45
import bzrlib.bzrdir as bzrdir
45
46
from bzrlib.errors import BzrCommandError
63
64
    def test_whoami_branch(self):
64
65
        """branch specific user identity works."""
65
66
        self.runbzr('init')
66
 
        f = file('.bzr/email', 'wt')
67
 
        f.write('Branch Identity <branch@identi.ty>')
68
 
        f.close()
 
67
        b = bzrlib.branch.Branch.open('.')
 
68
        b.control_files.put_utf8('email', 'Branch Identity <branch@identi.ty>')
69
69
        bzr_email = os.environ.get('BZREMAIL')
70
70
        if bzr_email is not None:
71
71
            del os.environ['BZREMAIL']
279
279
        self.example_branch()
280
280
        os.chdir('..')
281
281
        self.runbzr('branch a b')
282
 
        self.assertFileEqual('b\n', 'b/.bzr/branch-name')
 
282
        b = bzrlib.branch.Branch.open('b')
 
283
        self.assertEqual('b\n', b.control_files.get_utf8('branch-name').read())
283
284
        self.runbzr('branch a c -r 1')
284
285
        os.chdir('b')
285
286
        self.runbzr('commit -m foo --unchanged')