/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: 2017-07-19 22:41:28 UTC
  • mfrom: (6729.5.1 move-errors-patches)
  • Revision ID: jelmer@jelmer.uk-20170719224128-720a34aumkzv3t3u
Merge lp:~jelmer/brz/move-errors-patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3089
3089
        self.format = format
3090
3090
 
3091
3091
 
3092
 
class PatchSyntax(BzrError):
3093
 
    """Base class for patch syntax errors."""
3094
 
 
3095
 
 
3096
 
class BinaryFiles(BzrError):
3097
 
 
3098
 
    _fmt = 'Binary files section encountered.'
3099
 
 
3100
 
    def __init__(self, orig_name, mod_name):
3101
 
        self.orig_name = orig_name
3102
 
        self.mod_name = mod_name
3103
 
 
3104
 
 
3105
 
class MalformedPatchHeader(PatchSyntax):
3106
 
 
3107
 
    _fmt = "Malformed patch header.  %(desc)s\n%(line)r"
3108
 
 
3109
 
    def __init__(self, desc, line):
3110
 
        self.desc = desc
3111
 
        self.line = line
3112
 
 
3113
 
 
3114
 
class MalformedHunkHeader(PatchSyntax):
3115
 
 
3116
 
    _fmt = "Malformed hunk header.  %(desc)s\n%(line)r"
3117
 
 
3118
 
    def __init__(self, desc, line):
3119
 
        self.desc = desc
3120
 
        self.line = line
3121
 
 
3122
 
 
3123
 
class MalformedLine(PatchSyntax):
3124
 
 
3125
 
    _fmt = "Malformed line.  %(desc)s\n%(line)r"
3126
 
 
3127
 
    def __init__(self, desc, line):
3128
 
        self.desc = desc
3129
 
        self.line = line
3130
 
 
3131
 
 
3132
 
class PatchConflict(BzrError):
3133
 
 
3134
 
    _fmt = ('Text contents mismatch at line %(line_no)d.  Original has '
3135
 
            '"%(orig_line)s", but patch says it should be "%(patch_line)s"')
3136
 
 
3137
 
    def __init__(self, line_no, orig_line, patch_line):
3138
 
        self.line_no = line_no
3139
 
        self.orig_line = orig_line.rstrip('\n')
3140
 
        self.patch_line = patch_line.rstrip('\n')
3141
 
 
3142
 
 
3143
3092
class FeatureAlreadyRegistered(BzrError):
3144
3093
 
3145
3094
    _fmt = 'The feature %(feature)s has already been registered.'