Rev 2: Make sure we can merge into a subdirectory, not just a direct subdir of root in http://bzr.arbash-meinel.com/plugins/merge_into
John Arbash Meinel
john at arbash-meinel.com
Thu Feb 1 22:33:35 GMT 2007
At http://bzr.arbash-meinel.com/plugins/merge_into
------------------------------------------------------------
revno: 2
revision-id: john at arbash-meinel.com-20070201223334-muoke3e8j6w2urlv
parent: john at arbash-meinel.com-20070201222920-u2pk8hbozkli4lq0
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: merge_into
timestamp: Thu 2007-02-01 16:33:34 -0600
message:
Make sure we can merge into a subdirectory, not just a direct subdir of root
modified:
test_bb_merge_into.py test_bb_merge_into.p-20070131214328-dide73mgytkt6kk2-2
-------------- next part --------------
=== modified file 'test_bb_merge_into.py'
--- a/test_bb_merge_into.py 2007-02-01 22:29:20 +0000
+++ b/test_bb_merge_into.py 2007-02-01 22:33:34 +0000
@@ -79,6 +79,36 @@
finally:
project_wt.unlock()
+ def test_merge_into_subdir(self):
+ project_wt, lib_wt = self.setup_two_branches()
+
+ self.run_bzr('merge-into', '../lib1', 'dir/lib1',
+ working_dir='project')
+
+ # This shouldn't be necessary, but it seems required to get the
+ # inventory reloaded
+ project_wt.read_working_inventory()
+ project_wt.lock_read()
+ try:
+ # The lib-1 revision should be merged into this one
+ self.assertEqual(['project-1', 'lib-1'],
+ project_wt.get_parent_ids())
+ files = [(path, status, kind, file_id)
+ for path, status, kind, file_id, ie
+ in project_wt.list_files(include_root=True)]
+ exp_files = [('', 'V', 'directory', 'project-root-id'),
+ ('README', 'V', 'file', 'readme-id'),
+ ('dir', 'V', 'directory', 'dir-id'),
+ ('dir/file.c', 'V', 'file', 'file.c-id'),
+ ('dir/lib1', 'V', 'directory', 'lib1-root-id'),
+ ('dir/lib1/Makefile', 'V', 'file', 'makefile-lib-id'),
+ ('dir/lib1/README', 'V', 'file', 'readme-lib-id'),
+ ('dir/lib1/foo.c', 'V', 'file', 'foo.c-lib-id'),
+ ]
+ self.assertEqual(exp_files, files)
+ finally:
+ project_wt.unlock()
+
def test_merge_into_newdir_with_repeat_roots(self):
project_wt, lib_wt = self.setup_two_branches(custom_root_ids=False)
More information about the bazaar-commits
mailing list