/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 bzrlib/errors.py

  • Committer: Martin Pool
  • Date: 2005-09-05 09:27:11 UTC
  • Revision ID: mbp@sourcefrog.net-20050905092711-f9f5bded3fd82605
- more disentangling of xml storage format from objects

- remove pack_xml and unpack_xml function in favor of 
  serializer object

- test unpacking canned revision xml

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
        BzrError.__init__(self, msg)
93
93
 
94
94
 
 
95
class UnrelatedBranches(BzrCommandError):
 
96
    def __init__(self):
 
97
        msg = "Branches have no common ancestor, and no base revision"\
 
98
            " specified."
 
99
        BzrCommandError.__init__(self, msg)
 
100
 
 
101
 
 
102
class NotAncestor(BzrError):
 
103
    def __init__(self, rev_id, not_ancestor_id):
 
104
        self.rev_id = rev_id
 
105
        self.not_ancestor_id = not_ancestor_id
 
106
        msg = "Revision %s is not an ancestor of %s" % (not_ancestor_id, 
 
107
                                                        rev_id)
 
108
        BzrError.__init__(self, msg)
 
109
 
 
110
 
 
111
class InstallFailed(BzrError):
 
112
    def __init__(self, revisions):
 
113
        self.revisions = revisions
 
114
        msg = "Could not install revisions:\n%s" % " ,".join(revisions)
 
115
        BzrError.__init__(self, msg)
 
116
 
 
117
 
 
118
class AmbiguousBase(BzrError):
 
119
    def __init__(self, bases):
 
120
        msg = "The correct base is unclear, becase %s are all equally close" %\
 
121
            ", ".join(bases)
 
122
        BzrError.__init__(self, msg)
 
123
        self.bases = bases
 
124