[MERGE REVIEW] Tweaks to bundle merging

Robert Collins robertc at robertcollins.net
Wed Jun 7 17:05:31 BST 2006


On Tue, 2006-06-06 at 22:33 +0100, Aaron Bentley wrote:
> --- bzrlib/errors.py
> +++ bzrlib/errors.py
> @@ -938,6 +938,12 @@
>          self.measured = measured
>  
>  
> +class NotABundle(BzrNewError):
> +    """Not a bzr revision-bundle: %(text)r"""

Needs an additional newline here please.

> +    def __init__(self, text):
> +        self.text = text
> +
> +
>  class BadBundle(Exception): pass
>  
>  
> 
> === modified file bzrlib/tests/blackbox/test_merge.py
> --- bzrlib/tests/blackbox/test_merge.py
> +++ bzrlib/tests/blackbox/test_merge.py
> @@ -23,6 +23,8 @@
>  
>  from bzrlib.branch import Branch
>  from bzrlib.bzrdir import BzrDir
> +from bzrlib.conflicts import ConflictList
> +from bzrlib.delta import compare_trees
>  from bzrlib.osutils import abspath
>  from bzrlib.tests.blackbox import ExternalBase
>  from bzrlib.workingtree import WorkingTree
> @@ -197,3 +199,10 @@
>                                                tree_b.last_revision())
>          self.assertEqualDiff(testament_a.as_text(),
>                           testament_b.as_text())
> +        tree_a.set_conflicts(ConflictList())
> +        tree_a.commit('message')
> +        # it is legal to attempt to merge an already-merged bundle
> +        self.runbzr('merge ../bundle')

What is the expected output ? And should it return 0 or 3 ? [what does
merge return on a no-op].

> +        # but it does nothing
> +        self.assertFalse(compare_trees(tree_a.basis_tree(), 
> +                                       tree_a).has_changed())

+1 with these concerns answered/addressed.

Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060608/ac6875c4/attachment.pgp 


More information about the bazaar mailing list