~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

MergeĀ JAMĀ Integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
301
301
            " specified."
302
302
        BzrCommandError.__init__(self, msg)
303
303
 
 
304
 
304
305
class NoCommonAncestor(BzrError):
305
306
    def __init__(self, revision_a, revision_b):
306
307
        msg = "Revisions have no common ancestor: %s %s." \
307
308
            % (revision_a, revision_b) 
308
309
        BzrError.__init__(self, msg)
309
310
 
 
311
 
310
312
class NoCommonRoot(BzrError):
311
313
    def __init__(self, revision_a, revision_b):
312
314
        msg = "Revisions are not derived from the same root: %s %s." \
313
315
            % (revision_a, revision_b) 
314
316
        BzrError.__init__(self, msg)
315
317
 
 
318
 
316
319
class NotAncestor(BzrError):
317
320
    def __init__(self, rev_id, not_ancestor_id):
318
321
        msg = "Revision %s is not an ancestor of %s" % (not_ancestor_id, 
336
339
        BzrError.__init__(self, msg)
337
340
        self.bases = bases
338
341
 
 
342
 
339
343
class NoCommits(BzrError):
340
344
    def __init__(self, branch):
341
345
        msg = "Branch %s has no commits." % branch
342
346
        BzrError.__init__(self, msg)
343
347
 
 
348
 
344
349
class UnlistableStore(BzrError):
345
350
    def __init__(self, store):
346
351
        BzrError.__init__(self, "Store %s is not listable" % store)
347
352
 
 
353
 
348
354
class UnlistableBranch(BzrError):
349
355
    def __init__(self, br):
350
356
        BzrError.__init__(self, "Stores for branch %s are not listable" % br)
388
394
    """Text did not match it's checksum: %(message)s"""
389
395
 
390
396
 
 
397
class WeaveTextDiffers(WeaveError):
 
398
    """Weaves differ on text content. Revision: {%(revision_id)s}, %(weave_a)s, %(weave_b)s"""
 
399
 
 
400
    def __init__(self, revision_id, weave_a, weave_b):
 
401
        WeaveError.__init__(self)
 
402
        self.revision_id = revision_id
 
403
        self.weave_a = weave_a
 
404
        self.weave_b = weave_b
 
405
 
 
406
 
391
407
class NoSuchExportFormat(BzrNewError):
392
408
    """Export format %(format)r not supported"""
393
409
    def __init__(self, format):
406
422
        self.msg = msg
407
423
        self.orig_error = orig_error
408
424
 
 
425
 
409
426
# A set of semi-meaningful errors which can be thrown
410
427
class TransportNotPossible(TransportError):
411
428
    """This is for transports where a specific function is explicitly not
427
444
    """The connection has been closed."""
428
445
    pass
429
446
 
 
447
 
430
448
class ConflictsInTree(BzrError):
431
449
    def __init__(self):
432
450
        BzrError.__init__(self, "Working tree has conflicts.")
433
451
 
 
452
 
434
453
class ParseConfigError(BzrError):
435
454
    def __init__(self, errors, filename):
436
455
        if filename is None:
439
458
            (filename, ('\n'.join(e.message for e in errors)))
440
459
        BzrError.__init__(self, message)
441
460
 
 
461
 
442
462
class SigningFailed(BzrError):
443
463
    def __init__(self, command_line):
444
464
        BzrError.__init__(self, "Failed to gpg sign data with command '%s'"
445
465
                               % command_line)
446
466
 
 
467
 
447
468
class WorkingTreeNotRevision(BzrError):
448
469
    def __init__(self, tree):
449
470
        BzrError.__init__(self, "The working tree for %s has changed since"
450
471
                          " last commit, but weave merge requires that it be"
451
472
                          " unchanged." % tree.basedir)
452
473
 
 
474
 
453
475
class CantReprocessAndShowBase(BzrNewError):
454
476
    """Can't reprocess and show base.
455
477
Reprocessing obscures relationship of conflicting lines to base."""
456
478
 
 
479
 
457
480
class GraphCycleError(BzrNewError):
458
481
    """Cycle in graph %(graph)r"""
459
482
    def __init__(self, graph):