~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

Merge with walkdirs

Show diffs side-by-side

added added

removed removed

Lines of Context:
774
774
 
775
775
class IncompatibleRepositories(BzrError):
776
776
 
777
 
    _fmt = "Repository %(target)s is not compatible with repository"\
778
 
        " %(source)s"
 
777
    _fmt = "%(target)s\n" \
 
778
            "is not compatible with\n" \
 
779
            "%(source)s\n" \
 
780
            "%(details)s"
779
781
 
780
 
    def __init__(self, source, target):
781
 
        BzrError.__init__(self, target=target, source=source)
 
782
    def __init__(self, source, target, details=None):
 
783
        if details is None:
 
784
            details = "(no details)"
 
785
        BzrError.__init__(self, target=target, source=source, details=details)
782
786
 
783
787
 
784
788
class IncompatibleRevision(BzrError):
2381
2385
        self.patch_type = patch_type
2382
2386
 
2383
2387
 
 
2388
class TargetNotBranch(BzrError):
 
2389
    """A merge directive's target branch is required, but isn't a branch"""
 
2390
 
 
2391
    _fmt = ("Your branch does not have all of the revisions required in "
 
2392
            "order to merge this merge directive and the target "
 
2393
            "location specified in the merge directive is not a branch: "
 
2394
            "%(location)s.")
 
2395
 
 
2396
    def __init__(self, location):
 
2397
        BzrError.__init__(self)
 
2398
        self.location = location
 
2399
 
 
2400
 
2384
2401
class UnsupportedInventoryKind(BzrError):
2385
2402
    
2386
2403
    _fmt = """Unsupported entry kind %(kind)s"""
2429
2446
class TagsNotSupported(BzrError):
2430
2447
 
2431
2448
    _fmt = ("Tags not supported by %(branch)s;"
2432
 
            " you may be able to use bzr upgrade --dirstate-tags.")
 
2449
            " you may be able to use bzr upgrade.")
2433
2450
 
2434
2451
    def __init__(self, branch):
2435
2452
        self.branch = branch