~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/meta_store.py

  • Committer: John Arbash Meinel
  • Date: 2005-09-17 14:57:02 UTC
  • mto: (1393.2.1)
  • mto: This revision was merged to the branch mainline in revision 1396.
  • Revision ID: john@arbash-meinel.com-20050917145702-e8b475b293f68513
Cleaned up meta_store to handle the new store and transport layout.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
from trace import mutter
18
 
from bzrlib.store import Storage, CompressedTextStore
19
 
from bzrlib.local_transport import LocalTransport
 
18
from bzrlib.store import Store
 
19
from bzrlib.store.compressed_text import CompressedTextStore
 
20
from bzrlib.transport.local import LocalTransport
20
21
 
21
22
try:
22
23
    set
23
24
except NameError:
24
25
    from sets import Set as set
25
26
 
26
 
class CachedStore(Storage):
 
27
class CachedStore(Store):
27
28
    """A store that caches data locally, to avoid repeated downloads.
28
29
    The precacache method should be used to avoid server round-trips for
29
30
    every piece of data.
67
68
        mutter("Prefetch of ids %s" % ",".join(ids))
68
69
        self.cache_store.copy_multi(self.source_store, ids, 
69
70
                                    permit_failure=True)
 
71