/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

  • Committer: John Arbash Meinel
  • Date: 2008-07-17 12:55:11 UTC
  • mfrom: (3556 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3557.
  • Revision ID: john@arbash-meinel.com-20080717125511-rjpil183ctky8l84
Merge bzr.dev 3556

Show diffs side-by-side

added added

removed removed

Lines of Context:
562
562
        PathError.__init__(self, base, reason)
563
563
 
564
564
 
 
565
class InvalidRebaseURLs(PathError):
 
566
 
 
567
    _fmt = "URLs differ by more than path: %(from_)r and %(to)r"
 
568
 
 
569
    def __init__(self, from_, to):
 
570
        self.from_ = from_
 
571
        self.to = to
 
572
        PathError.__init__(self, from_, 'URLs differ by more than path.')
 
573
 
 
574
 
565
575
class UnavailableRepresentation(InternalBzrError):
566
576
 
567
577
    _fmt = ("The encoding '%(wanted)s' is not available for key %(key)s which "
848
858
        BzrError.__init__(self, filename=filename, kind=kind)
849
859
 
850
860
 
 
861
class BadFilenameEncoding(BzrError):
 
862
 
 
863
    _fmt = ('Filename %(filename)r is not valid in your current filesystem'
 
864
            ' encoding %(fs_encoding)s')
 
865
 
 
866
    def __init__(self, filename, fs_encoding):
 
867
        BzrError.__init__(self)
 
868
        self.filename = filename
 
869
        self.fs_encoding = fs_encoding
 
870
 
 
871
 
851
872
class ForbiddenControlFileError(BzrError):
852
873
 
853
874
    _fmt = 'Cannot operate on "%(filename)s" because it is a control file'
2731
2752
        BzrError.__init__(self, alias_name=alias_name)
2732
2753
 
2733
2754
 
 
2755
class DirectoryLookupFailure(BzrError):
 
2756
    """Base type for lookup errors."""
 
2757
 
 
2758
    pass
 
2759
 
 
2760
 
 
2761
class InvalidLocationAlias(DirectoryLookupFailure):
 
2762
 
 
2763
    _fmt = '"%(alias_name)s" is not a valid location alias.'
 
2764
 
 
2765
    def __init__(self, alias_name):
 
2766
        DirectoryLookupFailure.__init__(self, alias_name=alias_name)
 
2767
 
 
2768
 
 
2769
class UnsetLocationAlias(DirectoryLookupFailure):
 
2770
 
 
2771
    _fmt = 'No %(alias_name)s location assigned.'
 
2772
 
 
2773
    def __init__(self, alias_name):
 
2774
        DirectoryLookupFailure.__init__(self, alias_name=alias_name[1:])
 
2775
 
 
2776
 
2734
2777
class CannotBindAddress(BzrError):
2735
2778
 
2736
2779
    _fmt = 'Cannot bind address "%(host)s:%(port)i": %(orig_error)s.'
2738
2781
    def __init__(self, host, port, orig_error):
2739
2782
        BzrError.__init__(self, host=host, port=port,
2740
2783
            orig_error=orig_error[1])
 
2784
 
 
2785
 
 
2786
class UnknownRules(BzrError):
 
2787
 
 
2788
    _fmt = ('Unknown rules detected: %(unknowns_str)s.')
 
2789
 
 
2790
    def __init__(self, unknowns):
 
2791
        BzrError.__init__(self, unknowns_str=", ".join(unknowns))