354 # Never update because working copies aren't necessary in share mode. |
354 # Never update because working copies aren't necessary in share mode. |
355 clone(ui, peeropts, source, dest=sharepath, pull=True, |
355 clone(ui, peeropts, source, dest=sharepath, pull=True, |
356 rev=rev, update=False, stream=stream) |
356 rev=rev, update=False, stream=stream) |
357 |
357 |
358 sharerepo = repository(ui, path=sharepath) |
358 sharerepo = repository(ui, path=sharepath) |
359 share(ui, sharerepo, dest=dest, update=update, bookmarks=False) |
359 share(ui, sharerepo, dest=dest, update=False, bookmarks=False) |
360 |
360 |
361 # We need to perform a pull against the dest repo to fetch bookmarks |
361 # We need to perform a pull against the dest repo to fetch bookmarks |
362 # and other non-store data that isn't shared by default. In the case of |
362 # and other non-store data that isn't shared by default. In the case of |
363 # non-existing shared repo, this means we pull from the remote twice. This |
363 # non-existing shared repo, this means we pull from the remote twice. This |
364 # is a bit weird. But at the time it was implemented, there wasn't an easy |
364 # is a bit weird. But at the time it was implemented, there wasn't an easy |
365 # way to pull just non-changegroup data. |
365 # way to pull just non-changegroup data. |
366 destrepo = repository(ui, path=dest) |
366 destrepo = repository(ui, path=dest) |
367 exchange.pull(destrepo, srcpeer, heads=revs) |
367 exchange.pull(destrepo, srcpeer, heads=revs) |
|
368 |
|
369 _postshareupdate(destrepo, update) |
368 |
370 |
369 return srcpeer, peer(ui, peeropts, dest) |
371 return srcpeer, peer(ui, peeropts, dest) |
370 |
372 |
371 def clone(ui, peeropts, source, dest=None, pull=False, rev=None, |
373 def clone(ui, peeropts, source, dest=None, pull=False, rev=None, |
372 update=True, stream=False, branch=None, shareopts=None): |
374 update=True, stream=False, branch=None, shareopts=None): |