/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

Merge bzr.dev 4032. Resolve the new streaming fetch.

XXX: We cheat a bit for CHK fetching. CHK serializers happen to still
have legacy 'read_inventory_from_string' and 'write_inventory_to_string'
functions that convert the paged representation to a single-string XML
representation.

So when converting between formats, we just go down to the
whole-inventory XML form.

At least it works for now. Even if it is grossly innefficient.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2965
2965
 
2966
2966
    def __init__(self, format, url):
2967
2967
        BzrError.__init__(self, format=format, url=url)
 
2968
 
 
2969
 
 
2970
class NoSuchView(BzrError):
 
2971
    """A view does not exist.
 
2972
    """
 
2973
 
 
2974
    _fmt = u"No such view: %(view_name)s."
 
2975
 
 
2976
    def __init__(self, view_name):
 
2977
        self.view_name = view_name
 
2978
 
 
2979
 
 
2980
class ViewsNotSupported(BzrError):
 
2981
    """Views are not supported by a tree format.
 
2982
    """
 
2983
 
 
2984
    _fmt = ("Views are not supported by %(tree)s;"
 
2985
            " use 'bzr upgrade' to change your tree to a later format.")
 
2986
 
 
2987
    def __init__(self, tree):
 
2988
        self.tree = tree
 
2989
 
 
2990
 
 
2991
class FileOutsideView(BzrError):
 
2992
 
 
2993
    _fmt = ('Specified file "%(file_name)s" is outside the current view: '
 
2994
            '%(view_str)s')
 
2995
 
 
2996
    def __init__(self, file_name, view_files):
 
2997
        self.file_name = file_name
 
2998
        self.view_str = ", ".join(view_files)
 
2999
 
 
3000
 
 
3001
class UnresumableWriteGroup(BzrError):
 
3002
    
 
3003
    _fmt = ("Repository %(repository)s cannot resume write group "
 
3004
            "%(write_groups)r: %(reason)s")
 
3005
 
 
3006
    internal_error = True
 
3007
 
 
3008
    def __init__(self, repository, write_groups, reason):
 
3009
        self.repository = repository
 
3010
        self.write_groups = write_groups
 
3011
        self.reason = reason
 
3012
 
 
3013
 
 
3014
class UnsuspendableWriteGroup(BzrError):
 
3015
    
 
3016
    _fmt = ("Repository %(repository)s cannot suspend a write group.")
 
3017
 
 
3018
    internal_error = True
 
3019
 
 
3020
    def __init__(self, repository):
 
3021
        self.repository = repository