[MERGE] Fix for bug 285055
Justyn Butler
justynbutler at googlemail.com
Tue Nov 4 22:39:40 GMT 2008
Hi,
The test for this is very similar to the existing test called
test_switch_after_branch_moved in test_switch.py
Unfortunately I have been unable to work out how to create a branch on
smart_server after creating SmartTCPServer_for_testing.
I think I will have to leave this fix to someone more bzr-capable, I
have already spent all the time I can afford, sorry.
Justyn
2008/10/22 Andrew Bennetts <andrew.bennetts at canonical.com>:
>> 2008/10/22 Andrew Bennetts <andrew.bennetts at canonical.com>:
>> > The first test is to make sure that this patch actually works — i.e. that when
>> > the force flag is used that switch in a lightweight checkout will work anyway,
>> > normally. So, the test would do these steps, roughly:
>> >
>> > * make a branch (with at least one commit in it)
>> > * make a checkout of the branch
>> > * rename the branch
>> > * switch with force=True to the branch's new location
>> >
>> > That test should fail without your patch, but pass with it.
>>
>> I'm not sure about this - because the test will have to checkout from
>> a branch on the local machine and will therefore not be affected by
>> the bug, or the patch.
>
> Oh, right, I forgot about that. You can run a server in a test; for example
> bzrlib.smart.server has a SmartTCPServer_for_testing, so a test can do:
>
> smart_server = SmartTCPServer_for_testing()
> smart_server.setUp(self.get_server())
> addCleanup(self.smart_server.tearDown)
> url = smart_server.get_url()
>
> I've checked and a TCP bzr:// server such as the one that creates does reproduce
> your problem.
[snip]
More information about the bazaar
mailing list