Rev 2574: fix #123485 - selftest broken under Python 2.5.1 because of tafile API change in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Tue Jul 3 07:48:05 BST 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 2574
revision-id: pqm at pqm.ubuntu.com-20070703064804-tphz64uvb1bhdj78
parent: pqm at pqm.ubuntu.com-20070703055715-ij91yrkomctki31m
parent: ian.clatworthy at internode.on.net-20070703060731-vq1d8o0hwu2otkzm
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2007-07-03 07:48:04 +0100
message:
  fix #123485 - selftest broken under Python 2.5.1 because of tafile API change
modified:
  bzrlib/smart/repository.py     repository.py-20061128022038-vr5wy5bubyb8xttk-1
    ------------------------------------------------------------
    revno: 2573.1.1
    merged: ian.clatworthy at internode.on.net-20070703060731-vq1d8o0hwu2otkzm
    parent: pqm at pqm.ubuntu.com-20070703055715-ij91yrkomctki31m
    parent: ian.clatworthy at internode.on.net-20070703045545-1cxkxzh24wpo04uk
    committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
    branch nick: ianc-integration
    timestamp: Tue 2007-07-03 16:07:31 +1000
    message:
      fix #123485 - selftest broken under Python 2.5.1 because of tafile API change
    ------------------------------------------------------------
    revno: 2571.2.2
    merged: ian.clatworthy at internode.on.net-20070703045545-1cxkxzh24wpo04uk
    parent: ian.clatworthy at internode.on.net-20070703042914-ag3unoftav0en4tp
    committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
    branch nick: bzr.tar-on-py251
    timestamp: Tue 2007-07-03 14:55:45 +1000
    message:
      use basename as poolie recommended
    ------------------------------------------------------------
    revno: 2571.2.1
    merged: ian.clatworthy at internode.on.net-20070703042914-ag3unoftav0en4tp
    parent: pqm at pqm.ubuntu.com-20070702183615-qkiquhju4t2grtf9
    committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
    branch nick: bzr.tar-on-py251
    timestamp: Tue 2007-07-03 14:29:14 +1000
    message:
      fix #123485 - selftest broken under Python 2.5.1 because of tafile API change
=== modified file 'bzrlib/smart/repository.py'
--- a/bzrlib/smart/repository.py	2007-06-28 04:39:55 +0000
+++ b/bzrlib/smart/repository.py	2007-07-03 04:55:45 +0000
@@ -16,6 +16,7 @@
 
 """Server-side repository related request implmentations."""
 
+import os
 import sys
 import tempfile
 import tarfile
@@ -223,7 +224,9 @@
             temp.close()
 
     def _tarball_of_dir(self, dirname, compression, ofile):
-        tarball = tarfile.open(fileobj=ofile, mode='w|' + compression)
+        filename = os.path.basename(ofile.name)
+        tarball = tarfile.open(fileobj=ofile, name=filename,
+            mode='w|' + compression)
         try:
             # The tarball module only accepts ascii names, and (i guess)
             # packs them with their 8bit names.  We know all the files




More information about the bazaar-commits mailing list