~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/weave.py

Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
265
265
 
266
266
    def has_version(self, version_id):
267
267
        """See VersionedFile.has_version."""
268
 
        return self._name_map.has_key(version_id)
 
268
        return (version_id in self._name_map)
269
269
 
270
270
    __contains__ = has_version
271
271
 
1132
1132
        sio = StringIO()
1133
1133
        write_weave_v5(self, sio)
1134
1134
        sio.seek(0)
1135
 
        transport.put(name + WeaveFile.WEAVE_SUFFIX, sio, self._filemode)
 
1135
        transport.put_file(name + WeaveFile.WEAVE_SUFFIX, sio, self._filemode)
1136
1136
 
1137
1137
    def create_empty(self, name, transport, filemode=None):
1138
1138
        return WeaveFile(name, transport, filemode, create=True)
1143
1143
        sio = StringIO()
1144
1144
        write_weave_v5(self, sio)
1145
1145
        sio.seek(0)
1146
 
        self._transport.put(self._weave_name + WeaveFile.WEAVE_SUFFIX,
1147
 
                            sio,
1148
 
                            self._filemode)
 
1146
        self._transport.put_file(self._weave_name + WeaveFile.WEAVE_SUFFIX,
 
1147
                                 sio,
 
1148
                                 self._filemode)
1149
1149
 
1150
1150
    @staticmethod
1151
1151
    def get_suffixes():