/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/transport/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-30 19:16:23 UTC
  • mto: This revision was merged to the branch mainline in revision 6639.
  • Revision ID: jelmer@jelmer.uk-20170530191623-t9ls96vjy9wslpoo
Remove deprecated functionality.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
from breezy import (
39
39
    errors,
40
40
    osutils,
41
 
    symbol_versioning,
42
41
    ui,
43
42
    urlutils,
44
43
    )
48
47
    BytesIO,
49
48
    string_types,
50
49
    )
51
 
from ..symbol_versioning import (
52
 
    DEPRECATED_PARAMETER,
53
 
    )
54
50
from ..trace import (
55
51
    mutter,
56
52
    )
922
918
                     None means just use the default.
923
919
        :return: The length of the file that was written.
924
920
        """
925
 
        # We would like to mark this as NotImplemented, but most likely
926
 
        # transports have defined it in terms of the old api.
927
 
        symbol_versioning.warn('Transport %s should implement put_file,'
928
 
                               ' rather than implementing put() as of'
929
 
                               ' version 0.11.'
930
 
                               % (self.__class__.__name__,),
931
 
                               DeprecationWarning)
932
 
        return self.put(relpath, f, mode=mode)
933
 
        #raise NotImplementedError(self.put_file)
 
921
        raise NotImplementedError(self.put_file)
934
922
 
935
923
    def put_file_non_atomic(self, relpath, f, mode=None,
936
924
                            create_parent_dir=False,
1001
989
 
1002
990
        :returns: the length of relpath before the content was written to it.
1003
991
        """
1004
 
        symbol_versioning.warn('Transport %s should implement append_file,'
1005
 
                               ' rather than implementing append() as of'
1006
 
                               ' version 0.11.'
1007
 
                               % (self.__class__.__name__,),
1008
 
                               DeprecationWarning)
1009
 
        return self.append(relpath, f, mode=mode)
 
992
        raise NotImplementedError(self.append_file)
1010
993
 
1011
994
    def append_bytes(self, relpath, bytes, mode=None):
1012
995
        """Append bytes to a file at relpath.