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