101
101
class BzrCheckError(BzrNewError):
102
102
"""Internal check failed: %(message)s"""
103
103
def __init__(self, message):
104
BzrNewError.__init__(self)
104
105
self.message = message
107
108
class InvalidEntryName(BzrNewError):
108
109
"""Invalid entry name: %(name)s"""
109
110
def __init__(self, name):
111
BzrNewError.__init__(self)
113
115
class InvalidRevisionNumber(BzrNewError):
114
116
"""Invalid revision number %(revno)d"""
115
117
def __init__(self, revno):
118
BzrNewError.__init__(self)
116
119
self.revno = revno
119
122
class InvalidRevisionId(BzrNewError):
120
"""Invalid revision-id"""
123
"""Invalid revision-id {%(revision_id)s} in %(branch)s"""
124
def __init__(self, revision_id, branch):
125
BzrNewError.__init__(self)
126
self.revision_id = revision_id
123
130
class BzrCommandError(BzrError):
180
187
class PointlessCommit(BzrNewError):
181
188
"""No changes to commit"""
190
class StrictCommitFailed(Exception):
191
"""Commit refused because there are unknowns in the tree."""
184
193
class NoSuchRevision(BzrError):
185
194
def __init__(self, branch, revision):
268
277
BzrError.__init__(self, "Stores for branch %s are not listable" % br)
271
from bzrlib.weave import WeaveError, WeaveParentMismatch
280
class WeaveError(BzrNewError):
281
"""Error in processing weave: %(message)s"""
282
def __init__(self, message=None):
283
BzrNewError.__init__(self)
284
self.message = message
287
class WeaveRevisionAlreadyPresent(WeaveError):
288
"""Revision {%(revision_id)s} already present in %(weave)s"""
289
def __init__(self, revision_id, weave):
290
WeaveError.__init__(self)
291
self.revision_id = revision_id
295
class WeaveRevisionNotPresent(WeaveError):
296
"""Revision {%(revision_id)s} not present in %(weave)s"""
297
def __init__(self, revision_id, weave):
298
WeaveError.__init__(self)
299
self.revision_id = revision_id
303
class WeaveFormatError(WeaveError):
304
"""Weave invariant violated: %(what)s"""
305
def __init__(self, what):
306
WeaveError.__init__(self)
310
class WeaveParentMismatch(WeaveError):
311
"""Parents are mismatched between two revisions."""
273
314
class TransportError(BzrError):
274
315
"""All errors thrown by Transport implementations should derive
343
384
def __init__(self, command_line):
344
385
BzrError.__init__(self, "Failed to gpg sign data with command '%s'"
388
class WorkingTreeNotRevision(BzrError):
389
def __init__(self, tree):
390
BzrError.__init__(self, "The working tree for %s has changed since"
391
" last commit, but weave merge requires that it be"
392
" unchanged." % tree.basedir)
394
class GraphCycleError(BzrNewError):
395
"""Cycle in graph %(graph)r"""
396
def __init__(self, graph):
397
BzrNewError.__init__(self)