[MERGE][1.6] Real --weave merge

John Arbash Meinel john at arbash-meinel.com
Wed Jul 16 05:38:37 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ian Clatworthy wrote:
| 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().

Yeah, I got tired of using add_version() so add_rev() came in rather
late. But I can switch things around if we want. It certainly made
writing the tests nicer. Multi-way apis are kind of a pain sometimes.
|
|> +    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.
|

The commit comments are indeed incorrect, I can double check that the
desired effect is still being tested. (This conflicts with --merge3, and
~ the new --weave, it doesn't conflicts with --lca or the old --weave).

| 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.
|

Not a problem. The next layer up starts stripping all the entries that
aren't actually changed, but I'm certainly willing to test all of that
more. I'm planning on changing entries3 anyway, to handle criss-cross
cases better. So no rush to get this in specifically.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkh9e00ACgkQJdeBCYSNAAOeJgCffDZhVd3bgLtT0KQU0xHq2Nex
7joAoJv/PVkV5ZuPQJg7CGWXHDNxm7T8
=ovi2
-----END PGP SIGNATURE-----



More information about the bazaar mailing list