105
104
% (branch, object_type, object_id))
107
class DivergedBranches(BzrError):
108
def __init__(self, branch1, branch2):
109
BzrError.__init__(self, "These branches have diverged.")
110
self.branch1 = branch1
111
self.branch2 = branch2
108
114
class UnrelatedBranches(BzrCommandError):
109
115
def __init__(self):
110
116
msg = "Branches have no common ancestor, and no base revision"\
112
118
BzrCommandError.__init__(self, msg)
120
class NoCommonAncestor(BzrError):
121
def __init__(self, revision_a, revision_b):
122
msg = "Revisions have no common ancestor: %s %s." \
123
% (revision_a, revision_b)
124
BzrError.__init__(self, msg)
126
class NoCommonRoot(BzrError):
127
def __init__(self, revision_a, revision_b):
128
msg = "Revisions are not derived from the same root: %s %s." \
129
% (revision_a, revision_b)
130
BzrError.__init__(self, msg)
115
132
class NotAncestor(BzrError):
116
133
def __init__(self, rev_id, not_ancestor_id):
134
msg = "Revision %s is not an ancestor of %s" % (not_ancestor_id,
136
BzrError.__init__(self, msg)
117
137
self.rev_id = rev_id
118
138
self.not_ancestor_id = not_ancestor_id
119
msg = "Revision %s is not an ancestor of %s" % (not_ancestor_id,
121
BzrError.__init__(self, msg)
124
141
class InstallFailed(BzrError):
125
142
def __init__(self, revisions):
143
msg = "Could not install revisions:\n%s" % " ,".join(revisions)
144
BzrError.__init__(self, msg)
126
145
self.revisions = revisions
127
msg = "Could not install revisions:\n%s" % " ,".join(revisions)
128
BzrError.__init__(self, msg)
131
148
class AmbiguousBase(BzrError):
135
152
BzrError.__init__(self, msg)
136
153
self.bases = bases
155
class NoCommits(BzrError):
156
def __init__(self, branch):
157
msg = "Branch %s has no commits." % branch
158
BzrError.__init__(self, msg)