~benoit.pierre/bzrtools/shell_improvements

« back to all changes in this revision

Viewing changes to shell.py

  • Committer: Benoît Pierre
  • Date: 2008-11-30 16:03:11 UTC
  • Revision ID: benoit.pierre@gmail.com-20081130160311-oz0xbsh3g0i0h1u0
In shell, always update the prompt after a switch/reconfigure, even if
the result of the command is non 0 because in case of a complex command
we may actually not be testing the result of the switch/reconfigure
command itself, like for example: switch ../trunk | false.

Show diffs side-by-side

added added

removed removed

Lines of Context:
169
169
 
170
170
    def exec_and_update_tree(self, line):
171
171
        result = self.default(line)
172
 
        if 0 == result:
173
 
            try:
174
 
                self.tree = WorkingTree.open_containing(".")[0]
175
 
            except:
176
 
                self.tree = None
 
172
        try:
 
173
            self.tree = WorkingTree.open_containing(".")[0]
 
174
        except:
 
175
            self.tree = None
177
176
        return result
178
177
 
179
178
    def do_switch(self, line):