[MERGE][#238227] Fix the tree.branch returned by make_branch_and_tree

Andrew Bennetts andrew at canonical.com
Thu Jun 12 02:33:56 BST 2008


Andrew Bennetts wrote:
> John Arbash Meinel wrote:
> [...]
> >
> > I'm really happy to see this, and we need to get the rest of the tests passing.
> > (It also effected the "bzr pull" in a lightweight checkout of a bzr+ssh:// branch).
> >
> >
> > +                if b._format.get_format_string() == 'Remote BZR Branch':
> >
> > ^- Is this really the best way to detect that you are using a remote branch?
> > Could we do something like:
> >
> > if wt.branch._format != b._format, or something along those lines?
> 
> I'm equally happy with that.  It's probably better, I forget why I hesistated
> from doing that in the first place.  You could even test for "wt.branch is not
> b" directly.

Here's an updated patch.  It makes the change suggested by John, and also fixes
all the test failures in the *_implementations tests, so it's now a genuine
candidate for merging to bzr.dev.

One of the fixes required adding another (optional) parameter to Branch.pull.
I've noted it in the API CHANGES section of the NEWS file, but I'm highlighting
it here because I expect it will break bzr-svn.

This patch based off the remote_is_at_least changes submitted a while ago
because it's now part of a loom for my smart push work, but I can extract the
relevant changes and submit them separately if necessary.

-Andrew.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: make-branch-and-tree-fix.patch
Type: text/x-diff
Size: 9960 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080612/479d0d42/attachment-0001.bin 


More information about the bazaar mailing list