149
149
old = b.repository.revision_tree(b.get_rev_id(1))
150
150
new = b.repository.revision_tree(b.get_rev_id(2))
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')
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))
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')
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))
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')
176
170
# TODO: factor out some kind of assert_tree_state() method