~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to errors.py

  • Committer: Aaron Bentley
  • Date: 2006-03-25 05:37:45 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20060325053745-6b17a7909866abcb
Fixed robustness issues in branches command

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
class PatchFailed(Exception):
28
28
    """Failed applying patch!"""
29
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
30
class NotCheckout(CommandError):
40
31
    """Specified path is not a checkout."""
41
32
    def __init__(self, path):
45
36
    """This checkout contains uncommitted changes"""
46
37
    def __init__(self):
47
38
        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.")