~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/test_commit_merge.py

Move add from Branch to WorkingTree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
        self.assertEquals(rev.parent_ids,
63
63
                          ['y@u-0-1', 'x@u-0-1'])
64
64
 
65
 
 
66
 
 
67
65
    def test_merge_new_file(self):
68
66
        """Commit merge of two trees with no overlapping files."""
69
67
        self.build_tree(['x/', 'x/ecks', 'y/', 'y/why'])
70
68
 
71
69
        bx = Branch.initialize('x')
72
70
        by = Branch.initialize('y')
73
 
        bx.add(['ecks'], ['ecks-id'])
74
 
        by.add(['why'], ['why-id'])
 
71
        bx.working_tree().add(['ecks'], ['ecks-id'])
 
72
        by.working_tree().add(['why'], ['why-id'])
75
73
 
76
74
        commit(bx, 'commit one', rev_id='x@u-0-1', allow_pointless=True)
77
75
        commit(by, 'commit two', rev_id='y@u-0-1', allow_pointless=True)
79
77
        fetch(from_branch=bx, to_branch=by)
80
78
        # we haven't merged the texts, but let's fake it
81
79
        shutil.copyfile('x/ecks', 'y/ecks')
82
 
        by.add(['ecks'], ['ecks-id'])
 
80
        by.working_tree().add(['ecks'], ['ecks-id'])
83
81
        by.working_tree().add_pending_merge('x@u-0-1')
84
82
 
85
83
        # partial commit of merges is currently not allowed, because