~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store.py

  • Committer: Robert Collins
  • Date: 2005-09-06 09:47:19 UTC
  • mfrom: (1092.1.45)
  • mto: (1185.1.10) (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: robertc@robertcollins.net-20050906094719-a7e1f8ed80fe4280
mergeĀ fromĀ upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
        if isinstance(other, ImmutableStore):
127
127
            return self.copy_multi_immutable(other, to_copy, pb)
128
128
        count = 0
129
 
        failed = set()
130
129
        for id in to_copy:
131
130
            count += 1
132
131
            pb.update('copy', count, len(to_copy))
136
135
                try:
137
136
                    entry = other[id]
138
137
                except IndexError:
139
 
                    failed.add(id)
 
138
                    failures.add(id)
140
139
                    continue
141
140
                self.add(entry, id)
142
141
                
143
 
        if not permit_failure:
144
 
            assert count == len(to_copy)
 
142
        assert count == len(to_copy)
145
143
        pb.clear()
146
 
        return count, failed
 
144
        return count, []
147
145
 
148
146
    def copy_multi_immutable(self, other, to_copy, pb, permit_failure=False):
149
147
        from shutil import copyfile