/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 bzrlib/tests/blackbox/test_branch.py

  • Committer: John Arbash Meinel
  • Date: 2007-07-11 23:45:20 UTC
  • mfrom: (2601 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2643.
  • Revision ID: john@arbash-meinel.com-20070711234520-do3h7zw8skbathpz
[merge] bzr.dev 2601

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):
81
81
 
82
82
        # Now that we have a repository with shared files, make sure
83
83
        # that things aren't copied out by a 'branch'
84
 
        self.run_bzr('branch', 'repo/b', 'branch-b')
 
84
        self.run_bzr('branch repo/b branch-b')
85
85
        pushed_tree = WorkingTree.open('branch-b')
86
86
        pushed_repo = pushed_tree.branch.repository
87
87
        self.assertFalse(pushed_repo.has_revision('a-1'))