~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store.py

  • Committer: aaron.bentley at utoronto
  • Date: 2005-08-27 04:42:41 UTC
  • mfrom: (1092.1.43)
  • mto: (1185.3.4)
  • mto: This revision was merged to the branch mainline in revision 1178.
  • Revision ID: aaron.bentley@utoronto.ca-20050827044241-23d676133b9fc981
Merge of robertc@robertcollins.net-20050826013321-52eee1f1da679ee9

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 trace import mutter
28
27
from bzrlib.errors import BzrError
 
28
from bzrlib.trace import mutter
 
29
import bzrlib.ui
29
30
 
30
31
######################################################################
31
32
# stores
113
114
    def copy_multi(self, other, ids, permit_failure=False):
114
115
        """Copy texts for ids from other into self.
115
116
 
116
 
        If an id is present in self, it is skipped.  A count of copied
117
 
        ids is returned, which may be less than len(ids).
 
117
        If an id is present in self, it is skipped.
 
118
 
 
119
        Returns (count_copied, failed), where failed is a collection of ids
 
120
        that could not be copied.
118
121
        """
119
 
        from bzrlib.progress import ProgressBar
120
 
        pb = ProgressBar()
 
122
        pb = bzrlib.ui.ui_factory.progress_bar()
 
123
        
121
124
        pb.update('preparing to copy')
122
125
        to_copy = [id for id in ids if id not in self]
123
126
        if isinstance(other, ImmutableStore):
142
145
        pb.clear()
143
146
        return count, failed
144
147
 
145
 
 
146
148
    def copy_multi_immutable(self, other, to_copy, pb, permit_failure=False):
147
149
        from shutil import copyfile
148
150
        count = 0