bzr shell: Prompt isn't updated when switching branches

Bug #948757 reported by Martin Stettner
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
BzrTools
New
Undecided
Unassigned

Bug Description

When using the "switch" command (in my case between different colocated branches) from the bzr shell, the prompt doesn't change. Imo it should always display the current branch's nickname/revno.

I think that the current working tree should be reloaded in 'set_prompt()' (in shell.py). Currently the current working tree is only loaded once in '__init__'.

 I've added a patch which works for me. I don't see how the prompt could be tested though, so I've no test cases for it...

Revision history for this message
Martin Stettner (martin-stettner) wrote :
Revision history for this message
Martin Stettner (martin-stettner) wrote :

Ok I've discovered https://bugs.launchpad.net/bzrtools/+bug/405736 (bzr shell accesses network to calculate prompt).
So I'm afraif my patch will not work properly, since the shell will access the network after every command just to get the branches name.

I'll try to have a look at 'bzr info' to see how to get the local nickname for a branch...

Revision history for this message
Martin Stettner (martin-stettner) wrote :

After a few tryouts it seems that the shell only needs network access, if no local branch nick is set. So, I think that the patch works after all.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.