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()