~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: v.ladeuil+lp at free
  • Date: 2007-01-09 15:33:36 UTC
  • mto: (2323.7.1 redirection)
  • mto: This revision was merged to the branch mainline in revision 2390.
  • Revision ID: v.ladeuil+lp@free.fr-20070109153336-8iucozbcxmpb1az6
First implementation of transport hints.

* bzrlib/tests/test_transport_hints.py: 
New file.

* bzrlib/transport/__init__.py:
(TransportHints, TransportGetHints): New hints classes.
(Transport.create_get_hints): New method creating a suitable hints
object.

* bzrlib/tests/__init__.py:
(test_suite): Add test_transport_hints.

* bzrlib/errors.py:
(RedirectRequested.__init__): Fix typo.
(UnknownHint): New exception class.

* bzrlib/bzrdir.py:
(BzrDirFormat.probe_transport): Pass a hints object to
transport.get.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1106
1106
        else:
1107
1107
            self.permanently = ''
1108
1108
        self.is_permament = is_permament
1109
 
        TransportError.__init__(self, source)
 
1109
        TransportError.__init__(self)
 
1110
 
 
1111
 
 
1112
class UnknownHint(TransportError):
 
1113
 
 
1114
    _fmt = '%(hint) is not known'
 
1115
 
 
1116
    def __init_(self, source, hint):
 
1117
        self.hint = hint
1110
1118
 
1111
1119
 
1112
1120
class ConflictsInTree(BzrError):