/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 breezy/errors.py

  • Committer: Jelmer Vernooij
  • Date: 2020-01-11 17:41:33 UTC
  • mto: This revision was merged to the branch mainline in revision 7440.
  • Revision ID: jelmer@jelmer.uk-20200111174133-ob2p0twwsmvw5ut7
Don't lazy-import errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2027
2027
        self.revision_id = revision_id
2028
2028
 
2029
2029
 
2030
 
class IllegalUseOfScopeReplacer(InternalBzrError):
2031
 
 
2032
 
    _fmt = ("ScopeReplacer object %(name)r was used incorrectly:"
2033
 
            " %(msg)s%(extra)s")
2034
 
 
2035
 
    def __init__(self, name, msg, extra=None):
2036
 
        BzrError.__init__(self)
2037
 
        self.name = name
2038
 
        self.msg = msg
2039
 
        if extra:
2040
 
            self.extra = ': ' + str(extra)
2041
 
        else:
2042
 
            self.extra = ''
2043
 
 
2044
 
 
2045
 
class InvalidImportLine(InternalBzrError):
2046
 
 
2047
 
    _fmt = "Not a valid import statement: %(msg)\n%(text)s"
2048
 
 
2049
 
    def __init__(self, text, msg):
2050
 
        BzrError.__init__(self)
2051
 
        self.text = text
2052
 
        self.msg = msg
2053
 
 
2054
 
 
2055
 
class ImportNameCollision(InternalBzrError):
2056
 
 
2057
 
    _fmt = ("Tried to import an object to the same name as"
2058
 
            " an existing object. %(name)s")
2059
 
 
2060
 
    def __init__(self, name):
2061
 
        BzrError.__init__(self)
2062
 
        self.name = name
2063
 
 
2064
 
 
2065
2030
class NotAMergeDirective(BzrError):
2066
2031
    """File starting with %(firstline)r is not a merge directive"""
2067
2032