~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/repository.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Server-side repository related request implmentations."""
18
18
 
 
19
import os
19
20
import sys
20
21
import tempfile
21
22
import tarfile
223
224
            temp.close()
224
225
 
225
226
    def _tarball_of_dir(self, dirname, compression, ofile):
226
 
        tarball = tarfile.open(fileobj=ofile, mode='w|' + compression)
 
227
        filename = os.path.basename(ofile.name)
 
228
        tarball = tarfile.open(fileobj=ofile, name=filename,
 
229
            mode='w|' + compression)
227
230
        try:
228
231
            # The tarball module only accepts ascii names, and (i guess)
229
232
            # packs them with their 8bit names.  We know all the files