~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Martin Pool
  • Date: 2010-07-21 09:58:42 UTC
  • mfrom: (4797.58.7 2.1)
  • mto: (5050.3.13 2.2)
  • mto: This revision was merged to the branch mainline in revision 5365.
  • Revision ID: mbp@canonical.com-20100721095842-hz0obu8gl0x05nty
merge up 2.1 to 2.2

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 = False
 
683
    internal_error = True
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)))
787
785
    def __init__(self, branch, path):
788
786
        BzrError.__init__(self)
789
787
        self.branch = branch
1177
1175
class InvalidRevisionSpec(BzrError):
1178
1176
 
1179
1177
    _fmt = ("Requested revision: '%(spec)s' does not exist in branch:"
1180
 
            " %(branch_url)s%(extra)s")
 
1178
            " %(branch)s%(extra)s")
1181
1179
 
1182
1180
    def __init__(self, spec, branch, extra=None):
1183
1181
        BzrError.__init__(self, branch=branch, spec=spec)
1184
 
        self.branch_url = getattr(branch, 'user_url', str(branch))
1185
1182
        if extra:
1186
1183
            self.extra = '\n' + str(extra)
1187
1184
        else:
1984
1981
        "Use --keep to not delete them, or --force to delete them regardless.")
1985
1982
 
1986
1983
    def __init__(self, tree_delta):
1987
 
        symbol_versioning.warn(symbol_versioning.deprecated_in((2, 3, 0)) %
1988
 
            "BzrRemoveChangedFilesError", DeprecationWarning, stacklevel=2)
1989
1984
        BzrError.__init__(self)
1990
1985
        self.changes_as_text = tree_delta.get_changes_as_text()
1991
1986
        #self.paths_as_string = '\n'.join(changed_files)
2845
2840
        else:
2846
2841
            more = ' ' + more
2847
2842
        import bzrlib.urlutils as urlutils
2848
 
        user_url = getattr(tree, "user_url", None)
2849
 
        if user_url is None:
2850
 
            display_url = str(tree)
2851
 
        else:
2852
 
            display_url = urlutils.unescape_for_display(user_url, 'ascii')
 
2843
        display_url = urlutils.unescape_for_display(
 
2844
            tree.user_url, 'ascii')
2853
2845
        BzrError.__init__(self, tree=tree, display_url=display_url, more=more)
2854
2846
 
2855
2847