[MERGE][1.6] Real --weave merge

Ian Clatworthy ian.clatworthy at canonical.com
Wed Jul 16 04:48:57 BST 2008


Ian Clatworthy wrote:

> Sorry I didn't get further on this review. I still need to look at
> test_merge.py in particular before I can vote on it.

bb:tweak

There are a several spots in test_merge where you could use
the new add_rev() helper instead of the more verbose add_version().

> +    def test_merge_move_and_change(self):
> +        this_tree = self.make_branch_and_tree('this')
> +        this_tree.lock_write()
> +        self.addCleanup(this_tree.unlock)
> +        self.build_tree_contents([
> +            ('this/file1', 'line 1\nline 2\nline 3\nline 4\n'),
> +        ])
> +        this_tree.add('file1',)
> +        this_tree.commit('Added file')
> +        other_tree = this_tree.bzrdir.sprout('other').open_workingtree()
> +        self.build_tree_contents([
> +            ('other/file1', 'line 1\nline 2 to 2.1\nline 3\nline 4\n'),
> +        ])
> +        other_tree.commit('Swapped 2 & 3')
> +        self.build_tree_contents([
> +            ('this/file1', 'line 1\nline 3\nline 2\nline 4\n'),
> +        ])
> +        this_tree.commit('Changed 2 to 2.1')

These commit comments look to be the wrong way around.

I'd also feel more comfortable if this change was submitted separately:

>          iterator = self.other_tree.iter_changes(self.base_tree,
> -                include_unchanged=True, specific_files=self.interesting_files,
> +                include_unchanged=False, specific_files=self.interesting_files,

I'm requesting that because I *think* is rest is benign - only impacting
merge --weave - while this change is independent and potentially has a wider
impact IIUIC.

Ian C.



More information about the bazaar mailing list