~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-02-21 07:21:10 UTC
  • mfrom: (4029.1.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090221072110-uf8tjt38l6r3vo6o
Filtered views (Ian Clatworthy)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2967
2967
        BzrError.__init__(self, format=format, url=url)
2968
2968
 
2969
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
 
2970
3001
class UnresumableWriteGroup(BzrError):
2971
3002
    
2972
3003
    _fmt = ("Repository %(repository)s cannot resume write group "
2988
3019
 
2989
3020
    def __init__(self, repository):
2990
3021
        self.repository = repository
2991