[Updated] [+- ] D11674: path: keep the path instance in the `pulloperation`
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Sun Oct 17 22:43:05 UTC 2021
marmoute updated this revision to Diff 30844.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11674?vs=30827&id=30844
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11674/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11674
AFFECTED FILES
hgext/convert/hg.py
mercurial/bundlerepo.py
mercurial/commands.py
mercurial/exchange.py
mercurial/hg.py
CHANGE DETAILS
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -942,7 +942,7 @@
exchange.pull(
local,
srcpeer,
- revs,
+ heads=revs,
streamclonerequested=stream,
includepats=storeincludepats,
excludepats=storeexcludepats,
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1378,6 +1378,7 @@
self,
repo,
remote,
+ path,
heads=None,
force=False,
bookmarks=(),
@@ -1391,6 +1392,10 @@
self.repo = repo
# repo we pull from
self.remote = remote
+ # path object used to build this remote
+ #
+ # Ideally, the remote peer would carry that directly.
+ self.remote_path = path
# revision we try to pull (None is "all")
self.heads = heads
# bookmark pulled explicitly
@@ -1556,6 +1561,7 @@
def pull(
repo,
remote,
+ path=None,
heads=None,
force=False,
bookmarks=(),
@@ -1611,8 +1617,9 @@
pullop = pulloperation(
repo,
remote,
- heads,
- force,
+ path=path,
+ heads=heads,
+ force=force,
bookmarks=bookmarks,
streamclonerequested=streamclonerequested,
includepats=includepats,
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5454,6 +5454,7 @@
modheads = exchange.pull(
repo,
other,
+ path=path,
heads=nodes,
force=opts.get(b'force'),
bookmarks=opts.get(b'bookmark', ()),
diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -699,7 +699,9 @@
},
).result()
- pullop = exchange.pulloperation(bundlerepo, peer, heads=reponodes)
+ pullop = exchange.pulloperation(
+ bundlerepo, peer, path=None, heads=reponodes
+ )
pullop.trmanager = bundletransactionmanager()
exchange._pullapplyphases(pullop, remotephases)
diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py
--- a/hgext/convert/hg.py
+++ b/hgext/convert/hg.py
@@ -145,7 +145,7 @@
_(b'pulling from %s into %s\n') % (pbranch, branch)
)
exchange.pull(
- self.repo, prepo, [prepo.lookup(h) for h in heads]
+ self.repo, prepo, heads=[prepo.lookup(h) for h in heads]
)
self.before()
To: marmoute, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20211017/34cd36ac/attachment-0002.html>
More information about the Mercurial-patches
mailing list