164
164
num_file_ids = len(file_ids)
165
165
for file_id in file_ids:
166
self.pb.update("merge weave merge", count, num_file_ids)
166
self.pb.update("merge weaves", count, num_file_ids)
168
168
to_weave = self.to_weaves.get_weave_or_empty(file_id,
169
169
self.to_branch.get_transaction())
188
188
def _fetch_inventory_weave(self, revs):
189
self.pb.update("inventory merge", 0, 1)
189
self.pb.update("inventory fetch", 0, 2)
190
190
from_weave = self.from_repository.get_inventory_weave()
191
191
to_weave = self.to_repository.get_inventory_weave()
192
self.pb.update("inventory fetch", 1, 2)
193
to_weave = self.to_control.get_weave('inventory',
194
self.to_branch.get_transaction())
195
self.pb.update("inventory fetch", 2, 2)
193
197
if to_weave.numversions() > 0:
194
198
# destination has contents, must merge
196
to_weave.join(from_weave)
200
to_weave.join(from_weave, pb=self.pb, msg='merge inventory')
197
201
except errors.WeaveParentMismatch:
198
to_weave.reweave(from_weave)
202
to_weave.reweave(from_weave, pb=self.pb, msg='reweave inventory')
200
204
# destination is empty, just replace it
201
205
to_weave = from_weave.copy()