~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ftp/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2010-08-28 11:20:13 UTC
  • mfrom: (5393 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5418.
  • Revision ID: jelmer@samba.org-20100828112013-oxcoyo71ggz2jul0
merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    osutils,
41
41
    urlutils,
42
42
    )
 
43
from bzrlib.symbol_versioning import (
 
44
    DEPRECATED_PARAMETER,
 
45
    deprecated_in,
 
46
    deprecated_passed,
 
47
    warn,
 
48
    )
43
49
from bzrlib.trace import mutter, warning
44
50
from bzrlib.transport import (
45
51
    AppendBasedFileStream,
235
241
            mutter("FTP has not: %s: %s", abspath, e)
236
242
            return False
237
243
 
238
 
    def get(self, relpath, decode=False, retries=0):
 
244
    def get(self, relpath, decode=DEPRECATED_PARAMETER, retries=0):
239
245
        """Get the file at the given relative path.
240
246
 
241
247
        :param relpath: The relative path to the file
245
251
        We're meant to return a file-like object which bzr will
246
252
        then read from. For now we do this via the magic of StringIO
247
253
        """
248
 
        # TODO: decode should be deprecated
 
254
        if deprecated_passed(decode):
 
255
            warn(deprecated_in((2,3,0)) %
 
256
                 '"decode" parameter to FtpTransport.get()',
 
257
                 DeprecationWarning, stacklevel=2)
249
258
        try:
250
259
            mutter("FTP get: %s", self._remote_path(relpath))
251
260
            f = self._get_FTP()