[MERGE][#238227] Fix the tree.branch returned by make_branch_and_tree
John Arbash Meinel
john at arbash-meinel.com
Tue Jun 10 14:51:09 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andrew Bennetts wrote:
| Currently TestCaseWithTransport.make_branch_and_tree returns the wrong thing in
| the branch_implementations tests for RemoteBranch. It should return a tree with
| a tree.branch that is a RemoteBranch, but instead it returns a BzrBranch6. This
| patch fixes that. Unfortunately, this causes a handful of tests to fail,
| because this flaw in the test coverage has allowed bugs to creep in, such as
| <https://bugs.launchpad.net/bzr/+bug/237067>.
|
| So it's not mergeable yet, but here's the fix I discussed with Robert on the
| phone, which seems like the right fix to me (twiddle tree._branch directly, and
| make sure it has the right effect on tree.branch just in case someone changes
| how tree._branch affects tree.branch). Also, to get things started, I've fixed
| one of the failing tests (test_branch.TestBranch.test_fetch_revisions). There
| are 4 others in branch_implementations, and possibly more in the full test
| suite.
|
| -Andrew.
|
|
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?
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkhOhs0ACgkQJdeBCYSNAANOKACfUfIEoXydrcZmcj35CY98iWbR
WkYAoJRkX3B5iKa7E0RdtTJZJ6eXWJKb
=zrMJ
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list