Mercurial > hg
changeset 40576:85bf93def065
share: avoid a now-unnecessary reload of the repo
hg.share() now returns an already-reloaded repo, so let's just use
that. (This would have failed test-subrepo-recursion.t without the
previous patch.)
Differential Revision: https://phab.mercurial-scm.org/D5252
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 09 Nov 2018 11:28:05 -0800 |
parents | fb490d798be0 |
children | 157f0e29eaa3 |
files | mercurial/hg.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hg.py Fri Nov 09 10:46:02 2018 -0800 +++ b/mercurial/hg.py Fri Nov 09 11:28:05 2018 -0800 @@ -452,15 +452,14 @@ defaultpath = source sharerepo = repository(ui, path=sharepath) - share(ui, sharerepo, dest=dest, update=False, bookmarks=False, - defaultpath=defaultpath) + destrepo = share(ui, sharerepo, dest=dest, update=False, bookmarks=False, + defaultpath=defaultpath) # We need to perform a pull against the dest repo to fetch bookmarks # and other non-store data that isn't shared by default. In the case of # non-existing shared repo, this means we pull from the remote twice. This # is a bit weird. But at the time it was implemented, there wasn't an easy # way to pull just non-changegroup data. - destrepo = repository(ui, path=dest) exchange.pull(destrepo, srcpeer, heads=revs) _postshareupdate(destrepo, update)