Rev 2712: Remove Transport.should_cache. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Aug 16 05:42:34 BST 2007


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

------------------------------------------------------------
revno: 2712
revision-id: pqm at pqm.ubuntu.com-20070816044231-k9pvlics7hlhxuw5
parent: pqm at pqm.ubuntu.com-20070816031716-d03a5nwezxb96z0c
parent: mbp at sourcefrog.net-20070816010410-92814aa40xf7lja4
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-08-16 05:42:31 +0100
message:
  Remove Transport.should_cache.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/repofmt/weaverepo.py    presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
  bzrlib/tests/test_transport.py testtransport.py-20050718175618-e5cdb99f4555ddce
  bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
  bzrlib/transport/decorator.py  decorator.py-20060402223305-e913a0f25319ab42
  bzrlib/transport/ftp.py        ftp.py-20051116161804-58dc9506548c2a53
  bzrlib/transport/http/_pycurl.py pycurlhttp.py-20060110060940-4e2a705911af77a6
  bzrlib/transport/http/_urllib.py _urlgrabber.py-20060113083826-0bbf7d992fbf090c
  bzrlib/transport/local.py      local_transport.py-20050711165921-9b1f142bfe480c24
  bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
    ------------------------------------------------------------
    revno: 2701.1.3
    merged: mbp at sourcefrog.net-20070816010410-92814aa40xf7lja4
    parent: mbp at sourcefrog.net-20070816010217-oja4sj0bsjsnrbkv
    parent: pqm at pqm.ubuntu.com-20070816000043-v5y51f50iolj5he7
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: remove-should-cache
    timestamp: Thu 2007-08-16 11:04:10 +1000
    message:
      Merge trunk
    ------------------------------------------------------------
    revno: 2701.1.2
    merged: mbp at sourcefrog.net-20070816010217-oja4sj0bsjsnrbkv
    parent: mbp at sourcefrog.net-20070815045608-tlvib7b67j6ymfj9
    parent: mbp at sourcefrog.net-20070815064633-hd595hj131ygfi0f
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: remove-should-cache
    timestamp: Thu 2007-08-16 11:02:17 +1000
    message:
      Merge removal of deprecations
    ------------------------------------------------------------
    revno: 2701.1.1
    merged: mbp at sourcefrog.net-20070815045608-tlvib7b67j6ymfj9
    parent: pqm at pqm.ubuntu.com-20070815035159-9hn3rewqcmibgvwq
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: remove-should-cache
    timestamp: Wed 2007-08-15 14:56:08 +1000
    message:
      Remove Transport.should_cache.
      
      Transports don't really know whether data should be cached or not, and this
      method was no longer used.
=== modified file 'NEWS'
--- a/NEWS	2007-08-15 21:40:36 +0000
+++ b/NEWS	2007-08-16 01:04:10 +0000
@@ -1,5 +1,10 @@
 IN DEVELOPMENT
 
+  FEATURES:
+
+    * New option ``--author`` in ``bzr commit`` to specify the author of the
+      change, if it's different from the committer.  (Lukáš Lalinský)
+
   IMPROVEMENTS:
 
     * ``pull`` and ``merge`` are much faster at installing bundle format 4.
@@ -8,8 +13,10 @@
     * ``pull -v`` no longer includes deltas, making it much faster.
       (Aaron Bentley)
 
-    * New option ``--author`` in ``bzr commit`` to specify the author of the
-      change, if it's different from the committer.  (Lukáš Lalinský)
+  API CHANGES:
+
+    * ``Transport.should_cache`` has been removed.  It was not called in the
+      previous release.  (Martin Pool)
 
 bzr 0.90rc1 2007-08-14
 

=== modified file 'bzrlib/repofmt/weaverepo.py'
--- a/bzrlib/repofmt/weaverepo.py	2007-04-01 06:19:16 +0000
+++ b/bzrlib/repofmt/weaverepo.py	2007-08-15 04:56:08 +0000
@@ -58,10 +58,6 @@
                               prefixed=prefixed, compressed=compressed,
                               dir_mode=dir_mode,
                               file_mode=file_mode)
-            #if self._transport.should_cache():
-            #    cache_path = os.path.join(self.cache_root, name)
-            #    os.mkdir(cache_path)
-            #    store = bzrlib.store.CachedStore(store, cache_path)
             return store
 
         # not broken out yet because the controlweaves|inventory_store

=== modified file 'bzrlib/tests/test_transport.py'
--- a/bzrlib/tests/test_transport.py	2007-07-22 15:44:59 +0000
+++ b/bzrlib/tests/test_transport.py	2007-08-15 04:56:08 +0000
@@ -298,7 +298,6 @@
     def test_parameters(self):
         transport = MemoryTransport()
         self.assertEqual(True, transport.listable())
-        self.assertEqual(False, transport.should_cache())
         self.assertEqual(False, transport.is_readonly())
 
     def test_iter_files_recursive(self):
@@ -414,7 +413,6 @@
         # connect to . in readonly mode
         transport = readonly.ReadonlyTransportDecorator('readonly+.')
         self.assertEqual(True, transport.listable())
-        self.assertEqual(False, transport.should_cache())
         self.assertEqual(True, transport.is_readonly())
 
     def test_http_parameters(self):
@@ -428,7 +426,6 @@
             self.failUnless(isinstance(transport,
                                        readonly.ReadonlyTransportDecorator))
             self.assertEqual(False, transport.listable())
-            self.assertEqual(True, transport.should_cache())
             self.assertEqual(True, transport.is_readonly())
         finally:
             server.tearDown()
@@ -443,15 +440,14 @@
         return fakenfs.FakeNFSTransportDecorator('fakenfs+' + url)
 
     def test_local_parameters(self):
-        # the listable, should_cache and is_readonly parameters
+        # the listable and is_readonly parameters
         # are not changed by the fakenfs decorator
         transport = self.get_nfs_transport('.')
         self.assertEqual(True, transport.listable())
-        self.assertEqual(False, transport.should_cache())
         self.assertEqual(False, transport.is_readonly())
 
     def test_http_parameters(self):
-        # the listable, should_cache and is_readonly parameters
+        # the listable and is_readonly parameters
         # are not changed by the fakenfs decorator
         from bzrlib.tests.HttpServer import HttpServer
         # connect to . via http which is not listable
@@ -462,7 +458,6 @@
             self.assertIsInstance(
                 transport, bzrlib.transport.fakenfs.FakeNFSTransportDecorator)
             self.assertEqual(False, transport.listable())
-            self.assertEqual(True, transport.should_cache())
             self.assertEqual(True, transport.is_readonly())
         finally:
             server.tearDown()

=== modified file 'bzrlib/transport/__init__.py'
--- a/bzrlib/transport/__init__.py	2007-08-15 04:33:34 +0000
+++ b/bzrlib/transport/__init__.py	2007-08-16 01:02:17 +0000
@@ -351,11 +351,6 @@
         """
         raise NotImplementedError(self.external_url)
 
-    def should_cache(self):
-        """Return True if the data pulled across should be cached locally.
-        """
-        return False
-
     def _pump(self, from_file, to_file):
         """Most children will need to copy from one file-like 
         object or string to another one.

=== modified file 'bzrlib/transport/decorator.py'
--- a/bzrlib/transport/decorator.py	2007-07-20 03:20:20 +0000
+++ b/bzrlib/transport/decorator.py	2007-08-15 04:56:08 +0000
@@ -137,10 +137,6 @@
         """See Transport.rmdir."""
         return self._decorated.rmdir(relpath)
 
-    def should_cache(self):
-        """See Transport.should_cache()."""
-        return self._decorated.should_cache()
-
     def stat(self, relpath):
         """See Transport.stat()."""
         return self._decorated.stat(relpath)

=== modified file 'bzrlib/transport/ftp.py'
--- a/bzrlib/transport/ftp.py	2007-07-20 18:59:29 +0000
+++ b/bzrlib/transport/ftp.py	2007-08-15 04:56:08 +0000
@@ -183,11 +183,6 @@
         #raise TransportError(msg='Error for path: %s' % (path,), orig_error=e)
         raise
 
-    def should_cache(self):
-        """Return True if the data pulled across should be cached locally.
-        """
-        return True
-
     def _remote_path(self, relpath):
         # XXX: It seems that ftplib does not handle Unicode paths
         # at the same time, medusa won't handle utf8 paths So if

=== modified file 'bzrlib/transport/http/_pycurl.py'
--- a/bzrlib/transport/http/_pycurl.py	2007-07-20 16:57:41 +0000
+++ b/bzrlib/transport/http/_pycurl.py	2007-08-15 04:56:08 +0000
@@ -110,11 +110,6 @@
             self._set_connection(connection, None)
         return connection
 
-    def should_cache(self):
-        """Return True if the data pulled across should be cached locally.
-        """
-        return True
-
     def has(self, relpath):
         """See Transport.has()"""
         # We set NO BODY=0 in _get_full, so it should be safe

=== modified file 'bzrlib/transport/http/_urllib.py'
--- a/bzrlib/transport/http/_urllib.py	2007-07-20 16:57:41 +0000
+++ b/bzrlib/transport/http/_urllib.py	2007-08-15 04:56:08 +0000
@@ -156,11 +156,6 @@
         self._get_connection().fake_close()
         return code, data
 
-    def should_cache(self):
-        """Return True if the data pulled across should be cached locally.
-        """
-        return True
-
     def _head(self, relpath):
         """Request the HEAD of a file.
 

=== modified file 'bzrlib/transport/local.py'
--- a/bzrlib/transport/local.py	2007-08-02 03:17:46 +0000
+++ b/bzrlib/transport/local.py	2007-08-15 04:56:08 +0000
@@ -65,9 +65,6 @@
         super(LocalTransport, self).__init__(base)
         self._local_base = urlutils.local_path_from_url(base)
 
-    def should_cache(self):
-        return False
-
     def clone(self, offset=None):
         """Return a new LocalTransport with root at self.base + offset
         Because the local filesystem does not require a connection, 

=== modified file 'bzrlib/transport/sftp.py'
--- a/bzrlib/transport/sftp.py	2007-08-09 03:23:04 +0000
+++ b/bzrlib/transport/sftp.py	2007-08-15 04:56:08 +0000
@@ -205,13 +205,6 @@
             self._set_connection(connection, credentials)
         return connection
 
-
-    def should_cache(self):
-        """
-        Return True if the data pulled across should be cached locally.
-        """
-        return True
-
     def has(self, relpath):
         """
         Does the target location exist?




More information about the bazaar-commits mailing list