~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Aaron Bentley
  • Date: 2005-09-19 02:33:09 UTC
  • mfrom: (1185.3.27)
  • mto: (1185.1.29)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: aaron.bentley@utoronto.ca-20050919023309-24e8871f7f8b31cf
Merged latest from mpool

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /usr/bin/env python
2
1
# -*- coding: UTF-8 -*-
3
2
 
4
3
# This program is free software; you can redistribute it and/or modify
25
24
class BzrError(StandardError):
26
25
    pass
27
26
 
 
27
 
28
28
class BzrCheckError(BzrError):
29
29
    pass
30
30
 
92
92
        BzrError.__init__(self, msg)
93
93
 
94
94
 
 
95
class DivergedBranches(BzrError):
 
96
    def __init__(self, branch1, branch2):
 
97
        BzrError.__init__(self, "These branches have diverged.")
 
98
        self.branch1 = branch1
 
99
        self.branch2 = branch2
 
100
 
95
101
class UnrelatedBranches(BzrCommandError):
96
102
    def __init__(self):
97
103
        msg = "Branches have no common ancestor, and no base revision"\
112
118
 
113
119
class NotAncestor(BzrError):
114
120
    def __init__(self, rev_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)
115
124
        self.rev_id = rev_id
116
125
        self.not_ancestor_id = not_ancestor_id
117
 
        msg = "Revision %s is not an ancestor of %s" % (not_ancestor_id, 
118
 
                                                        rev_id)
119
 
        BzrError.__init__(self, msg)
120
126
 
121
127
 
122
128
class InstallFailed(BzrError):
123
129
    def __init__(self, revisions):
 
130
        msg = "Could not install revisions:\n%s" % " ,".join(revisions)
 
131
        BzrError.__init__(self, msg)
124
132
        self.revisions = revisions
125
 
        msg = "Could not install revisions:\n%s" % " ,".join(revisions)
126
 
        BzrError.__init__(self, msg)
127
133
 
128
134
 
129
135
class AmbiguousBase(BzrError):