~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: John Arbash Meinel
  • Date: 2010-01-13 16:23:07 UTC
  • mto: (4634.119.7 2.0)
  • mto: This revision was merged to the branch mainline in revision 4959.
  • Revision ID: john@arbash-meinel.com-20100113162307-0bs82td16gzih827
Update the MANIFEST.in file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
793
793
 
794
794
 
795
795
class IncompatibleRepositories(BzrError):
 
796
    """Report an error that two repositories are not compatible.
 
797
 
 
798
    Note that the source and target repositories are permitted to be strings:
 
799
    this exception is thrown from the smart server and may refer to a
 
800
    repository the client hasn't opened.
 
801
    """
796
802
 
797
803
    _fmt = "%(target)s\n" \
798
804
            "is not compatible with\n" \
2006
2012
 
2007
2013
class BadConversionTarget(BzrError):
2008
2014
 
2009
 
    _fmt = "Cannot convert to format %(format)s.  %(problem)s"
 
2015
    _fmt = "Cannot convert from format %(from_format)s to format %(format)s." \
 
2016
            "    %(problem)s"
2010
2017
 
2011
 
    def __init__(self, problem, format):
 
2018
    def __init__(self, problem, format, from_format=None):
2012
2019
        BzrError.__init__(self)
2013
2020
        self.problem = problem
2014
2021
        self.format = format
 
2022
        self.from_format = from_format or '(unspecified)'
2015
2023
 
2016
2024
 
2017
2025
class NoDiffFound(BzrError):
2918
2926
    _fmt = 'Cannot bind address "%(host)s:%(port)i": %(orig_error)s.'
2919
2927
 
2920
2928
    def __init__(self, host, port, orig_error):
 
2929
        # nb: in python2.4 socket.error doesn't have a useful repr
2921
2930
        BzrError.__init__(self, host=host, port=port,
2922
 
            orig_error=orig_error[1])
 
2931
            orig_error=repr(orig_error.args))
2923
2932
 
2924
2933
 
2925
2934
class UnknownRules(BzrError):