/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

[merge] update from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
213
213
 
214
214
 
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]
219
219
 
220
220
 
 
221
class UnknownFormatError(BzrError):
 
222
    """Specified path is a bzr branch whose format we do not recognize."""
 
223
    def __str__(self):
 
224
        return 'unknown branch format: %s' % self.args[0]
 
225
 
 
226
 
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"""
259
265
 
 
266
 
 
267
class UpgradeReadonly(BzrNewError):
 
268
    """Upgrade URL cannot work with readonly URL's."""
 
269
 
 
270
 
260
271
class StrictCommitFailed(Exception):
261
272
    """Commit refused because there are unknowns in the tree."""
262
273
 
 
274
 
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"""
377
389
 
378
390
 
 
391
class WeaveTextDiffers(WeaveError):
 
392
    """Weaves differ on text content. Revision: {%(revision_id)s}, %(weave_a)s, %(weave_b)s"""
 
393
 
 
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
 
399
 
 
400
 
379
401
class NoSuchExportFormat(BzrNewError):
380
402
    """Export format %(format)r not supported"""
381
403
    def __init__(self, format):
463
485
    This should never escape bzr, so does not need to be printable.
464
486
    """
465
487
 
 
488
 
466
489
class MissingText(BzrNewError):
467
490
    """Branch %(base)s is missing revision %(text_revision)s of %(file_id)s"""
468
491
 
475
498
 
476
499
 
477
500
class BzrBadParameter(BzrNewError):
478
 
    """Parameter %(param)s is neither unicode nor utf8."""
 
501
    """A bad parameter : %(param)s is not usable.
479
502
    
 
503
    This exception should never be thrown, but it is a base class for all
 
504
    parameter-to-function errors.
 
505
    """
480
506
    def __init__(self, param):
481
507
        BzrNewError.__init__(self)
482
508
        self.param = param
 
509
 
 
510
 
 
511
class BzrBadParameterNotUnicode(BzrBadParameter):
 
512
    """Parameter %(param)s is neither unicode nor utf8."""
 
513
 
 
514
 
 
515
class BzrBadParameterNotString(BzrBadParameter):
 
516
    """Parameter %(param)s is not a string or unicode string."""
 
517
 
 
518
 
 
519
class DependencyNotPresent(BzrNewError):
 
520
    """Unable to import library: %(library)s, %(error)s"""
 
521
 
 
522
    def __init__(self, library, error):
 
523
        BzrNewError.__init__(self, library=library, error=error)
 
524
 
 
525
 
 
526
class ParamikoNotPresent(DependencyNotPresent):
 
527
    """Unable to import paramiko (required for sftp support): %(error)s"""
 
528
 
 
529
    def __init__(self, error):
 
530
        DependencyNotPresent.__init__(self, 'paramiko', error)
 
531
 
 
532
 
 
533
class UninitializableFormat(BzrNewError):
 
534
    """Format %(format)s cannot be initialised by this version of bzr."""
 
535
 
 
536
    def __init__(self, format):
 
537
        BzrNewError.__init__(self)
 
538
        self.format = format