/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

Update with new parent-ids patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
161
161
 
162
162
class InvalidRevisionId(BzrNewError):
163
163
    """Invalid revision-id {%(revision_id)s} in %(branch)s"""
 
164
 
164
165
    def __init__(self, revision_id, branch):
165
166
        # branch can be any string or object with __str__ defined
166
167
        BzrNewError.__init__(self)
304
305
(use bzr checkout if you wish to build a working tree): %(path)s"""
305
306
 
306
307
 
 
308
class AtomicFileAlreadyClosed(PathError):
 
309
    """'%(function)s' called on an AtomicFile after it was closed: %(path)s"""
 
310
 
 
311
    def __init__(self, path, function):
 
312
        PathError.__init__(self, path=path, extra=None)
 
313
        self.function = function
 
314
 
 
315
 
 
316
class InaccessibleParent(PathError):
 
317
    """Parent not accessible given base %(base)s and relative path %(path)s"""
 
318
 
 
319
    def __init__(self, path, base):
 
320
        PathError.__init__(self, path)
 
321
        self.base = base
 
322
 
 
323
 
307
324
class NoRepositoryPresent(BzrNewError):
308
325
    """No repository present: %(path)r"""
309
326
    def __init__(self, bzrdir):
1045
1062
    """Not a bzr revision-bundle: %(text)r"""
1046
1063
 
1047
1064
    def __init__(self, text):
1048
 
        self.text = text
1049
 
 
1050
 
 
1051
 
class BadBundle(Exception): pass
1052
 
 
1053
 
 
1054
 
class MalformedHeader(BadBundle): pass
1055
 
 
1056
 
 
1057
 
class MalformedPatches(BadBundle): pass
1058
 
 
1059
 
 
1060
 
class MalformedFooter(BadBundle): pass
 
1065
        BzrNewError.__init__(self)
 
1066
        self.text = text
 
1067
 
 
1068
 
 
1069
class BadBundle(BzrNewError): 
 
1070
    """Bad bzr revision-bundle: %(text)r"""
 
1071
 
 
1072
    def __init__(self, text):
 
1073
        BzrNewError.__init__(self)
 
1074
        self.text = text
 
1075
 
 
1076
 
 
1077
class MalformedHeader(BadBundle): 
 
1078
    """Malformed bzr revision-bundle header: %(text)r"""
 
1079
 
 
1080
    def __init__(self, text):
 
1081
        BzrNewError.__init__(self)
 
1082
        self.text = text
 
1083
 
 
1084
 
 
1085
class MalformedPatches(BadBundle): 
 
1086
    """Malformed patches in bzr revision-bundle: %(text)r"""
 
1087
 
 
1088
    def __init__(self, text):
 
1089
        BzrNewError.__init__(self)
 
1090
        self.text = text
 
1091
 
 
1092
 
 
1093
class MalformedFooter(BadBundle): 
 
1094
    """Malformed footer in bzr revision-bundle: %(text)r"""
 
1095
 
 
1096
    def __init__(self, text):
 
1097
        BzrNewError.__init__(self)
 
1098
        self.text = text
 
1099
 
 
1100
 
 
1101
class UnsupportedEOLMarker(BadBundle):
 
1102
    """End of line marker was not \\n in bzr revision-bundle"""    
 
1103
 
 
1104
    def __init__(self):
 
1105
        BzrNewError.__init__(self)
 
1106
 
 
1107
 
 
1108
class GhostRevision(BzrNewError):
 
1109
    """Revision {%(revision_id)s} is a ghost."""
 
1110
 
 
1111
    def __init__(self, revision_id):
 
1112
        BzrNewError.__init__(self)
 
1113
        self.revision_id = revision_id