/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 from integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
 
106
106
class BzrCheckError(BzrNewError):
107
107
    """Internal check failed: %(message)s"""
 
108
 
108
109
    def __init__(self, message):
109
110
        BzrNewError.__init__(self)
110
111
        self.message = message
326
327
            " specified."
327
328
        BzrCommandError.__init__(self, msg)
328
329
 
 
330
 
329
331
class NoCommonAncestor(BzrError):
330
332
    def __init__(self, revision_a, revision_b):
331
333
        msg = "Revisions have no common ancestor: %s %s." \
332
334
            % (revision_a, revision_b) 
333
335
        BzrError.__init__(self, msg)
334
336
 
 
337
 
335
338
class NoCommonRoot(BzrError):
336
339
    def __init__(self, revision_a, revision_b):
337
340
        msg = "Revisions are not derived from the same root: %s %s." \
338
341
            % (revision_a, revision_b) 
339
342
        BzrError.__init__(self, msg)
340
343
 
 
344
 
341
345
class NotAncestor(BzrError):
342
346
    def __init__(self, rev_id, not_ancestor_id):
343
347
        msg = "Revision %s is not an ancestor of %s" % (not_ancestor_id, 
361
365
        BzrError.__init__(self, msg)
362
366
        self.bases = bases
363
367
 
 
368
 
364
369
class NoCommits(BzrError):
365
370
    def __init__(self, branch):
366
371
        msg = "Branch %s has no commits." % branch
367
372
        BzrError.__init__(self, msg)
368
373
 
 
374
 
369
375
class UnlistableStore(BzrError):
370
376
    def __init__(self, store):
371
377
        BzrError.__init__(self, "Store %s is not listable" % store)
372
378
 
 
379
 
373
380
class UnlistableBranch(BzrError):
374
381
    def __init__(self, br):
375
382
        BzrError.__init__(self, "Stores for branch %s are not listable" % br)
441
448
        self.msg = msg
442
449
        self.orig_error = orig_error
443
450
 
 
451
 
444
452
# A set of semi-meaningful errors which can be thrown
445
453
class TransportNotPossible(TransportError):
446
454
    """This is for transports where a specific function is explicitly not
462
470
    """The connection has been closed."""
463
471
    pass
464
472
 
 
473
 
465
474
class ConflictsInTree(BzrError):
466
475
    def __init__(self):
467
476
        BzrError.__init__(self, "Working tree has conflicts.")
468
477
 
 
478
 
469
479
class ParseConfigError(BzrError):
470
480
    def __init__(self, errors, filename):
471
481
        if filename is None:
474
484
            (filename, ('\n'.join(e.message for e in errors)))
475
485
        BzrError.__init__(self, message)
476
486
 
 
487
 
477
488
class SigningFailed(BzrError):
478
489
    def __init__(self, command_line):
479
490
        BzrError.__init__(self, "Failed to gpg sign data with command '%s'"
480
491
                               % command_line)
481
492
 
 
493
 
482
494
class WorkingTreeNotRevision(BzrError):
483
495
    def __init__(self, tree):
484
496
        BzrError.__init__(self, "The working tree for %s has changed since"
485
497
                          " last commit, but weave merge requires that it be"
486
498
                          " unchanged." % tree.basedir)
487
499
 
 
500
 
488
501
class CantReprocessAndShowBase(BzrNewError):
489
502
    """Can't reprocess and show base.
490
503
Reprocessing obscures relationship of conflicting lines to base."""
491
504
 
 
505
 
492
506
class GraphCycleError(BzrNewError):
493
507
    """Cycle in graph %(graph)r"""
494
508
    def __init__(self, graph):
565
579
    def __init__(self, format):
566
580
        BzrNewError.__init__(self)
567
581
        self.format = format
 
582
 
 
583
 
 
584
class OutOfDateTree(BzrNewError):
 
585
    """Working tree is out of date, please run 'bzr update'."""
 
586
 
 
587
    def __init__(self, tree):
 
588
        BzrNewError.__init__(self)
 
589
        self.tree = tree