~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2007-06-28 23:18:09 UTC
  • mfrom: (2562 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2566.
  • Revision ID: john@arbash-meinel.com-20070628231809-pqbt7puoqj8bl07b
[merge] bzr.dev 2562

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):