~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: John Arbash Meinel
  • Date: 2005-12-30 23:22:16 UTC
  • mto: (1587.1.6 bound-branches)
  • mto: This revision was merged to the branch mainline in revision 1590.
  • Revision ID: john@arbash-meinel.com-20051230232216-8f4ca70c6af10a40
Whitespace cleanup of bzrlib.errors

Show diffs side-by-side

added added

removed removed

Lines of Context:
289
289
            " specified."
290
290
        BzrCommandError.__init__(self, msg)
291
291
 
 
292
 
292
293
class NoCommonAncestor(BzrError):
293
294
    def __init__(self, revision_a, revision_b):
294
295
        msg = "Revisions have no common ancestor: %s %s." \
295
296
            % (revision_a, revision_b) 
296
297
        BzrError.__init__(self, msg)
297
298
 
 
299
 
298
300
class NoCommonRoot(BzrError):
299
301
    def __init__(self, revision_a, revision_b):
300
302
        msg = "Revisions are not derived from the same root: %s %s." \
301
303
            % (revision_a, revision_b) 
302
304
        BzrError.__init__(self, msg)
303
305
 
 
306
 
304
307
class NotAncestor(BzrError):
305
308
    def __init__(self, rev_id, not_ancestor_id):
306
309
        msg = "Revision %s is not an ancestor of %s" % (not_ancestor_id, 
324
327
        BzrError.__init__(self, msg)
325
328
        self.bases = bases
326
329
 
 
330
 
327
331
class NoCommits(BzrError):
328
332
    def __init__(self, branch):
329
333
        msg = "Branch %s has no commits." % branch
330
334
        BzrError.__init__(self, msg)
331
335
 
 
336
 
332
337
class UnlistableStore(BzrError):
333
338
    def __init__(self, store):
334
339
        BzrError.__init__(self, "Store %s is not listable" % store)
335
340
 
 
341
 
336
342
class UnlistableBranch(BzrError):
337
343
    def __init__(self, br):
338
344
        BzrError.__init__(self, "Stores for branch %s are not listable" % br)
390
396
        self.msg = msg
391
397
        self.orig_error = orig_error
392
398
 
 
399
 
393
400
# A set of semi-meaningful errors which can be thrown
394
401
class TransportNotPossible(TransportError):
395
402
    """This is for transports where a specific function is explicitly not
411
418
    """The connection has been closed."""
412
419
    pass
413
420
 
 
421
 
414
422
class ConflictsInTree(BzrError):
415
423
    def __init__(self):
416
424
        BzrError.__init__(self, "Working tree has conflicts.")
417
425
 
 
426
 
418
427
class ParseConfigError(BzrError):
419
428
    def __init__(self, errors, filename):
420
429
        if filename is None:
423
432
            (filename, ('\n'.join(e.message for e in errors)))
424
433
        BzrError.__init__(self, message)
425
434
 
 
435
 
426
436
class SigningFailed(BzrError):
427
437
    def __init__(self, command_line):
428
438
        BzrError.__init__(self, "Failed to gpg sign data with command '%s'"
429
439
                               % command_line)
430
440
 
 
441
 
431
442
class WorkingTreeNotRevision(BzrError):
432
443
    def __init__(self, tree):
433
444
        BzrError.__init__(self, "The working tree for %s has changed since"
434
445
                          " last commit, but weave merge requires that it be"
435
446
                          " unchanged." % tree.basedir)
436
447
 
 
448
 
437
449
class CantReprocessAndShowBase(BzrNewError):
438
450
    """Can't reprocess and show base.
439
451
Reprocessing obscures relationship of conflicting lines to base."""
440
452
 
 
453
 
441
454
class GraphCycleError(BzrNewError):
442
455
    """Cycle in graph %(graph)r"""
443
456
    def __init__(self, graph):
444
457
        BzrNewError.__init__(self)
445
458
        self.graph = graph
446
459
 
 
460
 
447
461
class NotConflicted(BzrNewError):
448
462
    """File %(filename)s is not conflicted."""
449
463
    def __init__(self, filename):
450
464
        BzrNewError.__init__(self)
451
465
        self.filename = filename
452
466
 
 
467
 
453
468
class MustUseDecorated(Exception):
454
469
    """A decorating function has requested its original command be used.
455
470
    
456
471
    This should never escape bzr, so does not need to be printable.
457
472
    """
458
473
 
 
474
 
459
475
class MissingText(BzrNewError):
460
476
    """Branch %(base)s is missing revision %(text_revision)s of %(file_id)s"""
461
477
    def __init__(self, branch, text_revision, file_id):
463
479
        self.base = branch.base
464
480
        self.text_revision = text_revision
465
481
        self.file_id = file_id
 
482
 
 
483