23
23
######################################################################
25
25
class BzrError(StandardError):
27
if len(self.args) == 1:
29
elif len(self.args) == 2:
30
# further explanation or suggestions
31
return '\n '.join([self.args[0]] + self.args[1])
36
28
class BzrCheckError(BzrError):
100
92
BzrError.__init__(self, msg)
103
class HistoryMissing(BzrError):
104
def __init__(self, branch, object_type, object_id):
106
BzrError.__init__(self,
107
'%s is missing %s {%s}'
108
% (branch, object_type, object_id))
111
95
class UnrelatedBranches(BzrCommandError):
112
96
def __init__(self):
113
97
msg = "Branches have no common ancestor, and no base revision"\
115
99
BzrCommandError.__init__(self, msg)
101
class NoCommonAncestor(BzrError):
102
def __init__(self, revision_a, revision_b):
103
msg = "Revisions have no common ancestor: %s %s." \
104
% (revision_a, revision_b)
105
BzrError.__init__(self, msg)
107
class NoCommonRoot(BzrError):
108
def __init__(self, revision_a, revision_b):
109
msg = "Revisions are not derived from the same root: %s %s." \
110
% (revision_a, revision_b)
111
BzrError.__init__(self, msg)
118
113
class NotAncestor(BzrError):
119
114
def __init__(self, rev_id, not_ancestor_id):
138
133
BzrError.__init__(self, msg)
139
134
self.bases = bases
136
class NoCommits(BzrError):
137
def __init__(self, branch):
138
msg = "Branch %s has no commits." % branch
139
BzrError.__init__(self, msg)