~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testworkingtree.py

  • Committer: Robert Collins
  • Date: 2005-11-07 20:29:51 UTC
  • mfrom: (1457.1.17)
  • Revision ID: robertc@robertcollins.net-20051107202951-6ae936c7a3e57f6f
Branch.commit() has moved to WorkingTree.commit(). (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
        self.build_tree(['from/', 'from/file', 'to/'])
98
98
        br_a = Branch.initialize('from')
99
99
        br_a.add('file')
100
 
        br_a.commit('foo', rev_id='A')
 
100
        br_a.working_tree().commit('foo', rev_id='A')
101
101
        br_b = Branch.initialize('to')
102
102
        return br_a, br_b
103
103
 
109
109
 
110
110
    def test_pull_overwrites(self):
111
111
        br_a, br_b = self.get_pullable_branches()
112
 
        br_b.commit('foo', rev_id='B')
 
112
        br_b.working_tree().commit('foo', rev_id='B')
113
113
        self.assertEqual(['B'], br_b.revision_history())
114
114
        br_b.working_tree().pull(br_a, overwrite=True)
115
115
        self.failUnless(br_b.has_revision('A'))
127
127
                          b.working_tree().revert, ['hello.txt'])
128
128
        
129
129
        b.add(['hello.txt'])
130
 
        b.commit('create initial hello.txt')
 
130
        b.working_tree().commit('create initial hello.txt')
131
131
 
132
132
        self.check_file_contents('hello.txt', 'initial hello')
133
133
        file('hello.txt', 'w').write('new hello')