~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: 2010-07-19 14:26:11 UTC
  • mfrom: (5346.4.6 cleanup)
  • Revision ID: pqm@pqm.ubuntu.com-20100719142611-fbhst4ivcngc32d5
(mbp) tree_files and internal_tree files moved to WorkingTree (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
680
680
 
681
681
    _fmt = 'Path "%(path)s" is not a child of path "%(base)s"%(extra)s'
682
682
 
683
 
    internal_error = True
 
683
    internal_error = False
684
684
 
685
685
    def __init__(self, path, base, extra=None):
686
686
        BzrError.__init__(self)
782
782
 
783
783
    _fmt = 'File "%(path)s" is not in branch %(branch_base)s.'
784
784
 
 
785
    # use PathNotChild instead
 
786
    @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 3, 0)))
785
787
    def __init__(self, branch, path):
786
788
        BzrError.__init__(self)
787
789
        self.branch = branch
1041
1043
class LockContention(LockError):
1042
1044
 
1043
1045
    _fmt = 'Could not acquire lock "%(lock)s": %(msg)s'
1044
 
    # TODO: show full url for lock, combining the transport and relative
1045
 
    # bits?
1046
1046
 
1047
1047
    internal_error = False
1048
1048
 
1925
1925
    _fmt = "Moving the root directory is not supported at this time"
1926
1926
 
1927
1927
 
 
1928
class TransformRenameFailed(BzrError):
 
1929
 
 
1930
    _fmt = "Failed to rename %(from_path)s to %(to_path)s: %(why)s"
 
1931
 
 
1932
    def __init__(self, from_path, to_path, why, errno):
 
1933
        self.from_path = from_path
 
1934
        self.to_path = to_path
 
1935
        self.why = why
 
1936
        self.errno = errno
 
1937
 
 
1938
 
1928
1939
class BzrMoveFailedError(BzrError):
1929
1940
 
1930
1941
    _fmt = "Could not move %(from_path)s%(operator)s %(to_path)s%(extra)s"
2839
2850
        BzrError.__init__(self, tree=tree, display_url=display_url, more=more)
2840
2851
 
2841
2852
 
 
2853
class ShelvedChanges(UncommittedChanges):
 
2854
 
 
2855
    _fmt = ('Working tree "%(display_url)s" has shelved changes'
 
2856
            ' (See bzr shelve --list).%(more)s')
 
2857
 
 
2858
 
2842
2859
class MissingTemplateVariable(BzrError):
2843
2860
 
2844
2861
    _fmt = 'Variable {%(name)s} is not available.'
3134
3151
    def __init__(self, bzrdir):
3135
3152
        self.bzrdir = bzrdir
3136
3153
 
 
3154
class NoWhoami(BzrError):
 
3155
 
 
3156
    _fmt = ('Unable to determine your name.\n'
 
3157
        "Please, set your name with the 'whoami' command.\n"
 
3158
        'E.g. bzr whoami "Your Name <name@example.com>"')
 
3159
 
 
3160
class InvalidPattern(BzrError):
 
3161
 
 
3162
    _fmt = ('Invalid pattern(s) found. %(msg)s')
 
3163
 
 
3164
    def __init__(self, msg):
 
3165
        self.msg = msg
 
3166