215
215
class UnsupportedFormatError(BzrError):
216
"""Specified path is a bzr branch that we cannot read."""
216
"""Specified path is a bzr branch that we recognize but cannot read."""
217
217
def __str__(self):
218
218
return 'unsupported branch format: %s' % self.args[0]
221
class UnknownFormatError(BzrError):
222
"""Specified path is a bzr branch whose format we do not recognize."""
224
return 'unknown branch format: %s' % self.args[0]
221
227
class NotVersionedError(BzrNewError):
222
228
"""%(path)s is not versioned"""
223
229
def __init__(self, path):
257
263
class PointlessCommit(BzrNewError):
258
264
"""No changes to commit"""
267
class UpgradeReadonly(BzrNewError):
268
"""Upgrade URL cannot work with readonly URL's."""
260
271
class StrictCommitFailed(Exception):
261
272
"""Commit refused because there are unknowns in the tree."""
263
275
class NoSuchRevision(BzrError):
264
276
def __init__(self, branch, revision):
265
277
self.branch = branch
376
388
"""Text did not match it's checksum: %(message)s"""
391
class WeaveTextDiffers(WeaveError):
392
"""Weaves differ on text content. Revision: {%(revision_id)s}, %(weave_a)s, %(weave_b)s"""
394
def __init__(self, revision_id, weave_a, weave_b):
395
WeaveError.__init__(self)
396
self.revision_id = revision_id
397
self.weave_a = weave_a
398
self.weave_b = weave_b
379
401
class NoSuchExportFormat(BzrNewError):
380
402
"""Export format %(format)r not supported"""
381
403
def __init__(self, format):
477
500
class BzrBadParameter(BzrNewError):
478
"""Parameter %(param)s is neither unicode nor utf8."""
501
"""A bad parameter : %(param)s is not usable.
503
This exception should never be thrown, but it is a base class for all
504
parameter-to-function errors.
480
506
def __init__(self, param):
481
507
BzrNewError.__init__(self)
482
508
self.param = param
511
class BzrBadParameterNotUnicode(BzrBadParameter):
512
"""Parameter %(param)s is neither unicode nor utf8."""
515
class BzrBadParameterNotString(BzrBadParameter):
516
"""Parameter %(param)s is not a string or unicode string."""
519
class DependencyNotPresent(BzrNewError):
520
"""Unable to import library: %(library)s, %(error)s"""
522
def __init__(self, library, error):
523
BzrNewError.__init__(self, library=library, error=error)
526
class ParamikoNotPresent(DependencyNotPresent):
527
"""Unable to import paramiko (required for sftp support): %(error)s"""
529
def __init__(self, error):
530
DependencyNotPresent.__init__(self, 'paramiko', error)
533
class UninitializableFormat(BzrNewError):
534
"""Format %(format)s cannot be initialised by this version of bzr."""
536
def __init__(self, format):
537
BzrNewError.__init__(self)