~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store/compressed_text.py

  • Committer: Robert Collins
  • Date: 2005-10-17 02:16:12 UTC
  • mto: This revision was merged to the branch mainline in revision 1459.
  • Revision ID: robertc@lifelesslap.robertcollins.net-20051017021612-1bc159c29da0e0fe
Teach store.copy_all about fileid suffixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
        sio.seek(0)
79
79
        self._transport.put(fn, sio)
80
80
 
81
 
    def _copy_one(self, fileid, other, pb):
 
81
    def _copy_one(self, fileid, suffix, other, pb):
82
82
        if not (isinstance(other, CompressedTextStore)
83
83
            and other._prefixed == self._prefixed):
84
 
            return super(CompressedTextStore, self)._copy_one(fileid, 
 
84
            return super(CompressedTextStore, self)._copy_one(fileid, suffix,
85
85
                                                              other, pb)
86
 
        path = self._relpath(fileid)
 
86
        if suffix is None or suffix == 'gz':
 
87
            path = self._relpath(fileid)
 
88
        else:
 
89
            path = self._relpath(fileid, [suffix])
87
90
        assert other._transport.copy_to([path], self._transport, pb=pb) == 1
88
91
 
89
92
    def __init__(self, transport, prefixed=False):