/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: Andrew Bennetts
  • Date: 2009-07-17 01:48:56 UTC
  • mfrom: (4543 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4545.
  • Revision ID: andrew.bennetts@canonical.com-20090717014856-c8igd2f9abbi3v30
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2093
2093
 
2094
2094
class OutOfDateTree(BzrError):
2095
2095
 
2096
 
    _fmt = "Working tree is out of date, please run 'bzr update'."
 
2096
    _fmt = "Working tree is out of date, please run 'bzr update'.%(more)s"
2097
2097
 
2098
 
    def __init__(self, tree):
 
2098
    def __init__(self, tree, more=None):
 
2099
        if more is None:
 
2100
            more = ''
 
2101
        else:
 
2102
            more = ' ' + more
2099
2103
        BzrError.__init__(self)
2100
2104
        self.tree = tree
 
2105
        self.more = more
2101
2106
 
2102
2107
 
2103
2108
class PublicBranchOutOfDate(BzrError):
2157
2162
        self.reason = reason
2158
2163
 
2159
2164
 
 
2165
class InconsistentDeltaDelta(InconsistentDelta):
 
2166
    """Used when we get a delta that is not valid."""
 
2167
 
 
2168
    _fmt = ("An inconsistent delta was supplied: %(delta)r"
 
2169
            "\nreason: %(reason)s")
 
2170
 
 
2171
    def __init__(self, delta, reason):
 
2172
        BzrError.__init__(self)
 
2173
        self.delta = delta
 
2174
        self.reason = reason
 
2175
 
 
2176
 
2160
2177
class UpgradeRequired(BzrError):
2161
2178
 
2162
2179
    _fmt = "To use this feature you must upgrade your branch at %(path)s."
2778
2795
 
2779
2796
class UncommittedChanges(BzrError):
2780
2797
 
2781
 
    _fmt = 'Working tree "%(display_url)s" has uncommitted changes.'
 
2798
    _fmt = ('Working tree "%(display_url)s" has uncommitted changes'
 
2799
            ' (See bzr status).%(more)s')
2782
2800
 
2783
 
    def __init__(self, tree):
 
2801
    def __init__(self, tree, more=None):
 
2802
        if more is None:
 
2803
            more = ''
 
2804
        else:
 
2805
            more = ' ' + more
2784
2806
        import bzrlib.urlutils as urlutils
2785
2807
        display_url = urlutils.unescape_for_display(
2786
2808
            tree.bzrdir.root_transport.base, 'ascii')
2787
 
        BzrError.__init__(self, tree=tree, display_url=display_url)
 
2809
        BzrError.__init__(self, tree=tree, display_url=display_url, more=more)
2788
2810
 
2789
2811
 
2790
2812
class MissingTemplateVariable(BzrError):