D5252: share: avoid a now-unnecessary reload of the repo
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Nov 9 19:29:36 UTC 2018
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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.)
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5252
AFFECTED FILES
mercurial/hg.py
CHANGE DETAILS
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -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)
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list