~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

merge in lsdiff/filterdiff friendliness

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
        BzrError.__init__(self, msg)
93
93
 
94
94
 
 
95
class DivergedBranches(BzrError):
 
96
    def __init__(self, branch1, branch2):
 
97
        self.branch1 = branch1
 
98
        self.branch2 = branch2
 
99
        BzrError.__init__(self, "These branches have diverged.")
 
100
 
95
101
class UnrelatedBranches(BzrCommandError):
96
102
    def __init__(self):
97
103
        msg = "Branches have no common ancestor, and no base revision"\
99
105
        BzrCommandError.__init__(self, msg)
100
106
 
101
107
 
 
108
class NotAncestor(BzrError):
 
109
    def __init__(self, rev_id, not_ancestor_id):
 
110
        self.rev_id = rev_id
 
111
        self.not_ancestor_id = not_ancestor_id
 
112
        msg = "Revision %s is not an ancestor of %s" % (not_ancestor_id, 
 
113
                                                        rev_id)
 
114
        BzrError.__init__(self, msg)
 
115
 
 
116
 
 
117
class NotAncestor(BzrError):
 
118
    def __init__(self, rev_id, not_ancestor_id):
 
119
        self.rev_id = rev_id
 
120
        self.not_ancestor_id = not_ancestor_id
 
121
        msg = "Revision %s is not an ancestor of %s" % (not_ancestor_id, 
 
122
                                                        rev_id)
 
123
        BzrError.__init__(self, msg)
 
124
 
 
125
 
 
126
class NotAncestor(BzrError):
 
127
    def __init__(self, rev_id, not_ancestor_id):
 
128
        self.rev_id = rev_id
 
129
        self.not_ancestor_id = not_ancestor_id
 
130
        msg = "Revision %s is not an ancestor of %s" % (not_ancestor_id, 
 
131
                                                        rev_id)
 
132
        BzrError.__init__(self, msg)
 
133
 
 
134
 
102
135
class InstallFailed(BzrError):
103
136
    def __init__(self, revisions):
104
137
        self.revisions = revisions
105
138
        msg = "Could not install revisions:\n%s" % " ,".join(revisions)
106
139
        BzrError.__init__(self, msg)
 
140
 
 
141
 
 
142
class AmbiguousBase(BzrError):
 
143
    def __init__(self, bases):
 
144
        msg = "The correct base is unclear, becase %s are all equally close" %\
 
145
            ", ".join(bases)
 
146
        BzrError.__init__(self, msg)
 
147
        self.bases = bases
 
148