~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

Merge pt1 hooks branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1960
1960
 
1961
1961
class BzrMoveFailedError(BzrError):
1962
1962
 
1963
 
    _fmt = "Could not move %(from_path)s%(operator)s %(to_path)s%(extra)s"
 
1963
    _fmt = ("Could not move %(from_path)s%(operator)s %(to_path)s"
 
1964
        "%(_has_extra)s%(extra)s")
1964
1965
 
1965
1966
    def __init__(self, from_path='', to_path='', extra=None):
1966
1967
        from bzrlib.osutils import splitpath
1967
1968
        BzrError.__init__(self)
1968
1969
        if extra:
1969
 
            self.extra = ': ' + str(extra)
 
1970
            self.extra, self._has_extra = extra, ': '
1970
1971
        else:
1971
 
            self.extra = ''
 
1972
            self.extra = self._has_extra = ''
1972
1973
 
1973
1974
        has_from = len(from_path) > 0
1974
1975
        has_to = len(to_path) > 0
1995
1996
 
1996
1997
class BzrRenameFailedError(BzrMoveFailedError):
1997
1998
 
1998
 
    _fmt = "Could not rename %(from_path)s%(operator)s %(to_path)s%(extra)s"
 
1999
    _fmt = ("Could not rename %(from_path)s%(operator)s %(to_path)s"
 
2000
        "%(_has_extra)s%(extra)s")
1999
2001
 
2000
2002
    def __init__(self, from_path, to_path, extra=None):
2001
2003
        BzrMoveFailedError.__init__(self, from_path, to_path, extra)
2002
2004
 
 
2005
 
2003
2006
class BzrRemoveChangedFilesError(BzrError):
2004
2007
    """Used when user is trying to remove changed files."""
2005
2008