Merge lp:~spiv/bzr/spurious-stacking-warning into lp:~bzr/bzr/trunk-old

Proposed by Andrew Bennetts
Status: Merged
Approved by: Ian Clatworthy
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~spiv/bzr/spurious-stacking-warning
Merge into: lp:~bzr/bzr/trunk-old
Diff against target: None lines
To merge this branch: bzr merge lp:~spiv/bzr/spurious-stacking-warning
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+7791@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Andrew Bennetts (spiv) wrote :

This seems to fix bug 388908.

It's awkward to write a test directly for the symptom in that bug, because the
server will emit the warning anyway, and the server and client's logs are
mingled together in the test suite.

An alternative "fix" would be to change the default branch format to format 7...

Revision history for this message
Robert Collins (lifeless) wrote :

 review +1

I would test via blackbox I think; stderr and stdout are what we're
checking.

-Rob

review: Approve
Revision history for this message
Andrew Bennetts (spiv) wrote :

Robert Collins wrote:
> Review: Approve
> review +1
>
> I would test via blackbox I think; stderr and stdout are what we're
> checking.

Well, the test would have to be that “Source branch format does not support
stacking” only appears once rather than twice, because the server code (that
runs in the same process in selftest) will emit it to the fake stderr. That
doesn't seem like a very satisfying test to me, but maybe it will have to
do.

Of course, the server really shouldn't be trying to use stderr, but that's a
separate bug...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/bzrdir.py'
2--- bzrlib/bzrdir.py 2009-06-19 09:06:56 +0000
3+++ bzrlib/bzrdir.py 2009-06-23 05:58:02 +0000
4@@ -3270,6 +3270,7 @@
5 else:
6 remote_repo = None
7 policy = None
8+ bzrdir._format.set_branch_format(self.get_branch_format())
9 if require_stacking:
10 # The repo has already been created, but we need to make sure that
11 # we'll make a stackable branch.