pull: allow a generic way to pass parameters to the pull operation
We have been feeling the need for this in extensions for quite some time. This
will be used to pass remote bookmark information around in the next changesets.
--- a/mercurial/commands.py Mon Jun 01 22:29:49 2015 -0700
+++ b/mercurial/commands.py Tue Jun 02 00:43:11 2015 -0700
@@ -5120,6 +5120,7 @@
opts.get('rev'))
+ pullopargs = {}
if opts.get('bookmark'):
if not revs:
revs = []
@@ -5152,7 +5153,8 @@
modheads = exchange.pull(repo, other, heads=revs,
force=opts.get('force'),
- bookmarks=opts.get('bookmark', ())).cgresult
+ bookmarks=opts.get('bookmark', ()),
+ opargs=pullopargs).cgresult
if checkout:
checkout = str(repo.changelog.rev(checkout))
repo._subtoppath = source
--- a/mercurial/exchange.py Mon Jun 01 22:29:49 2015 -0700
+++ b/mercurial/exchange.py Tue Jun 02 00:43:11 2015 -0700
@@ -886,8 +886,11 @@
if self._tr is not None:
self._tr.release()
-def pull(repo, remote, heads=None, force=False, bookmarks=()):
- pullop = pulloperation(repo, remote, heads, force, bookmarks=bookmarks)
+def pull(repo, remote, heads=None, force=False, bookmarks=(), opargs=None):
+ if opargs is None:
+ opargs = {}
+ pullop = pulloperation(repo, remote, heads, force, bookmarks=bookmarks,
+ **opargs)
if pullop.remote.local():
missing = set(pullop.remote.requirements) - pullop.repo.supported
if missing: