/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/store.py

  • Committer: Aaron Bentley
  • Date: 2005-09-25 05:01:17 UTC
  • mto: (1185.14.1) (1393.1.21)
  • mto: This revision was merged to the branch mainline in revision 1391.
  • Revision ID: aaron.bentley@utoronto.ca-20050925050117-dc4b46505adfc0d7
Added --basis option to bzr branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
import os, tempfile, types, osutils, gzip, errno
25
25
from stat import ST_SIZE
26
26
from StringIO import StringIO
27
 
from bzrlib.errors import BzrError
 
27
from bzrlib.errors import BzrError, UnlistableStore
28
28
from bzrlib.trace import mutter
29
29
import bzrlib.ui
30
30
 
254
254
            os.remove(fpath)
255
255
        os.rmdir(self._basedir)
256
256
        mutter("%r destroyed" % self)
 
257
 
 
258
def copy_all(store_from, store_to):
 
259
    """Copy all ids from one store to another."""
 
260
    if not hasattr(store_from, "__iter__"):
 
261
        raise UnlistableStore(store_from)
 
262
    ids = [f for f in store_from]
 
263
    store_to.copy_multi(store_from, ids)