~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store.py

  • Committer: Martin Pool
  • Date: 2005-09-01 11:27:20 UTC
  • Revision ID: mbp@sourcefrog.net-20050901112720-f5ccb6b6627991de
- work properly when $EDITOR contains multiple words

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
28
27
from bzrlib.trace import mutter
29
28
import bzrlib.ui
30
29
 
126
125
        if isinstance(other, ImmutableStore):
127
126
            return self.copy_multi_immutable(other, to_copy, pb)
128
127
        count = 0
129
 
        failed = set()
130
128
        for id in to_copy:
131
129
            count += 1
132
130
            pb.update('copy', count, len(to_copy))
136
134
                try:
137
135
                    entry = other[id]
138
136
                except IndexError:
139
 
                    failed.add(id)
 
137
                    failures.add(id)
140
138
                    continue
141
139
                self.add(entry, id)
142
140
                
143
 
        if not permit_failure:
144
 
            assert count == len(to_copy)
 
141
        assert count == len(to_copy)
145
142
        pb.clear()
146
 
        return count, failed
 
143
        return count, []
147
144
 
148
145
    def copy_multi_immutable(self, other, to_copy, pb, permit_failure=False):
149
146
        from shutil import copyfile