~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to errors.py

  • Committer: Aaron Bentley
  • Date: 2006-08-07 03:07:35 UTC
  • mto: This revision was merged to the branch mainline in revision 425.
  • Revision ID: aaron.bentley@utoronto.ca-20060807030735-0a9f8330ce1a836a
Add --no-color option to shelf

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
class PatchFailed(Exception):
28
28
    """Failed applying patch!"""
 
29
 
 
30
 
 
31
class NoColor(Exception):
 
32
    """Color not available on this terminal."""
 
33
 
 
34
 
 
35
class NoBzrtoolsColor(Exception):
 
36
    """Bzrtools is required for color display"""
 
37
 
 
38
 
 
39
class NotCheckout(CommandError):
 
40
    """Specified path is not a checkout."""
 
41
    def __init__(self, path):
 
42
        CommandError.__init__(self, "%s is not a checkout" % path)
 
43
 
 
44
class UncommittedCheckout(CommandError):
 
45
    """This checkout contains uncommitted changes"""
 
46
    def __init__(self):
 
47
        CommandError.__init__(self, "This checkout has uncommitted changes")
 
48
 
 
49
class ParentMissingRevisions(CommandError):
 
50
    """The parent branch is missing revisions."""
 
51
    def __init__(self, parent):
 
52
        CommandError.__init__(self, 
 
53
            "The parent branch %s is missing revisions from this branch." % 
 
54
            parent)
 
55
        self.parent = parent
 
56
 
 
57
class NoParent(CommandError):
 
58
    def __init__(self):
 
59
        CommandError.__init__(self, "There is no parent, so deleting the"
 
60
                                    " branch could destroy data.")