Comment 3 for bug 1018628

Revision history for this message
John A Meinel (jameinel) wrote :

This isn't because of the '-r' as it can be reproduced with 'bzr switch .'

The issue is that you have a full branch, which you then issue 'bzr switch' which makes us try to change your branch into a checkout. However, since you haven't specified a location, we use the local branch as the target of the switch. Which leaves us with a branch reference pointing at itself (and thus infinite recursion).

We seem to intentionally be changing a regular branch into a branch reference during 'bzr switch', to make it easier for people to switch to 'some other' branch.

1) We could stop doing that entirely. If someone is in a regular branch, require something else in order to turn their tree into a checkout of a 3rd branch.

2) Add a check that the target of the switch is, indeed, a different branch. If it is the same location, refuse.

3) Add a check that if only '-r' is given, then the local tree is already a checkout (has a branch reference) and not a full branch.