~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_parent.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-02-18 02:33:47 UTC
  • mfrom: (1534.1.24 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060218023347-0952c65f668bfd68
Merge Robert Collins integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
        url = 'http://bazaar-ng.org/bzr/bzr.dev'
39
39
        b.set_parent(url)
40
40
        self.assertEquals(b.get_parent(), url)
41
 
 
42
 
    def test_branch_sets_parent(self):
43
 
        """The branch command should set the new branch's parent"""
44
 
        from bzrlib.commands import run_bzr
45
 
 
46
 
        wt = self.make_branch_and_tree('from')
47
 
        branch_from = wt.branch
48
 
        file('from/foo', 'wt').write('contents of foo')
49
 
        wt.add('foo')
50
 
        wt.commit('initial commit')
51
 
        
52
 
        os.mkdir('to')
53
 
        branch_to = branch_from.clone('to', None)
54
 
        self.assertEquals(branch_to.get_parent(), branch_from.base)