Comment 1 for bug 285055

Revision history for this message
Justyn Butler (justyn) wrote :

It looks like this is the problem, in bzrlib/switch.py.

In the function _check_pending_merges:

    try:
        tree = control.open_workingtree()
    except errors.NotBranchError, ex:
        # Lightweight checkout and branch is no longer there
        if force:
            return
        else:
            raise ex

It always attempts to open the working tree to check for pending merges. If it finds the branch has disappeared and this is a lightweight checkout, it either raises an exception or if --force is used, just ignores it.

The problem is that if the working tree is remote and the server is no longer there/whatever, it fails at the connecting stage. ie with:
"ERROR: Unable to connect to SSH host XXX.XXX.XXX.XXX"