~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to errors.py

  • Committer: Aaron Bentley
  • Date: 2006-11-23 00:05:45 UTC
  • mfrom: (0.8.7 show_paths)
  • Revision ID: aaron.bentley@utoronto.ca-20061123000545-vk3id8fxuzzclvsh
Add show-paths command from Alexander Belchenko

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
 
30
39
class NotCheckout(CommandError):
31
40
    """Specified path is not a checkout."""
 
41
    def __init__(self, path):
 
42
        CommandError.__init__(self, "%s is not a checkout" % path)
32
43
 
33
44
class UncommittedCheckout(CommandError):
34
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.")