~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2007-06-26 08:02:36 UTC
  • mto: This revision was merged to the branch mainline in revision 2555.
  • Revision ID: mbp@sourcefrog.net-20070626080236-14ihgomtffc9tezj
Cleanup old variations on run_bzr in the test suite

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
class TestBranch(ExternalBase):
29
29
 
30
30
    def example_branch(test):
31
 
        test.runbzr('init')
 
31
        test.run_bzr('init')
32
32
        file('hello', 'wt').write('foo')
33
 
        test.runbzr('add hello')
34
 
        test.runbzr('commit -m setup hello')
 
33
        test.run_bzr('add hello')
 
34
        test.run_bzr('commit -m setup hello')
35
35
        file('goodbye', 'wt').write('baz')
36
 
        test.runbzr('add goodbye')
37
 
        test.runbzr('commit -m setup goodbye')
 
36
        test.run_bzr('add goodbye')
 
37
        test.run_bzr('commit -m setup goodbye')
38
38
 
39
39
    def test_branch(self):
40
40
        """Branch from one branch to another."""
42
42
        os.chdir('a')
43
43
        self.example_branch()
44
44
        os.chdir('..')
45
 
        self.runbzr('branch a b')
 
45
        self.run_bzr('branch a b')
46
46
        b = branch.Branch.open('b')
47
47
        self.assertEqual('b\n', b.control_files.get_utf8('branch-name').read())
48
 
        self.runbzr('branch a c -r 1')
 
48
        self.run_bzr('branch a c -r 1')
49
49
        os.chdir('b')
50
 
        self.runbzr('commit -m foo --unchanged')
 
50
        self.run_bzr('commit -m foo --unchanged')
51
51
        os.chdir('..')
52
52
 
53
53
    def test_branch_only_copies_history(self):