D11674: path: keep the path instance in the `pulloperation`
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri Oct 15 08:19:47 UTC 2021
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This will allow more pull code to use the path options. Ideally we would modify
the peer API to keep the path instance. However that is much more churn that I
can deal with for my current goal: adjusting a user facing API for a new
feature before we release it in the 6.0 changesets. So I am taking a shortcut
that seems reasonable.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D11674
AFFECTED FILES
mercurial/commands.py
mercurial/exchange.py
CHANGE DETAILS
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,
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', ()),
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list