~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Robert Collins
  • Date: 2005-10-30 23:58:46 UTC
  • Revision ID: robertc@robertcollins.net-20051030235846-fda8b626748cce52
Move Branch.read_working_inventory to WorkingTree.

Branch.read_working_inventory has moved to
WorkingTree.read_working_inventory. This necessitated changes to
Branch.get_root_id, and a move of Branch.set_inventory to WorkingTree
as well. To make it clear that a WorkingTree cannot always be obtained
Branch.working_tree() will raise 'errors.NoWorkingTree' if one cannot
be obtained. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
127
127
        self.branch = branch
128
128
 
129
129
 
 
130
class NoWorkingTree(BzrNewError):
 
131
    """No WorkingTree exists for %s(base)."""
 
132
    
 
133
    def __init__(self, base):
 
134
        BzrNewError.__init__(self)
 
135
        self.base = base
 
136
        
 
137
 
130
138
class BzrCommandError(BzrError):
131
139
    # Error from malformed user command
132
140
    # This is being misused as a generic exception