~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Alexander Belchenko
  • Date: 2007-08-10 09:04:38 UTC
  • mto: This revision was merged to the branch mainline in revision 2694.
  • Revision ID: bialix@ukr.net-20070810090438-0835xdz0rl8825qv
fixes after Ian's review

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
 
149
149
        old = b.repository.revision_tree(b.get_rev_id(1))
150
150
        new = b.repository.revision_tree(b.get_rev_id(2))
151
 
        new.lock_read()
152
151
 
153
152
        eq(new.get_file_by_path('b/two').read(), 'old contents')
154
153
        eq(new.get_file_by_path('top').read(), 'old contents')
155
154
        eq(new.get_file_by_path('a/one').read(), 'new contents')
156
 
        new.unlock()
157
155
 
158
156
        os.chdir('a')
159
157
        # commit from here should do nothing
160
158
        run_bzr(['commit', '.', '-m', 'commit subdir only', '--unchanged'])
161
159
        v3 = b.repository.revision_tree(b.get_rev_id(3))
162
 
        v3.lock_read()
163
160
        eq(v3.get_file_by_path('b/two').read(), 'old contents')
164
161
        eq(v3.get_file_by_path('top').read(), 'old contents')
165
162
        eq(v3.get_file_by_path('a/one').read(), 'new contents')
166
 
        v3.unlock()
167
163
 
168
164
        # commit in subdirectory commits whole tree
169
165
        run_bzr(['commit', '-m', 'commit whole tree from subdir'])
170
166
        v4 = b.repository.revision_tree(b.get_rev_id(4))
171
 
        v4.lock_read()
172
167
        eq(v4.get_file_by_path('b/two').read(), 'new contents')
173
168
        eq(v4.get_file_by_path('top').read(), 'new contents')
174
 
        v4.unlock()
175
169
 
176
170
        # TODO: factor out some kind of assert_tree_state() method
177
171