comparison mercurial/exchange.py @ 25445:1457c1f28c92

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 02 Jun 2015 00:43:11 -0700
parents 1d1fd5d44f57
children b5311068077e
comparison
equal deleted inserted replaced
25444:1d1fd5d44f57 25445:1457c1f28c92
884 def release(self): 884 def release(self):
885 """release transaction if created""" 885 """release transaction if created"""
886 if self._tr is not None: 886 if self._tr is not None:
887 self._tr.release() 887 self._tr.release()
888 888
889 def pull(repo, remote, heads=None, force=False, bookmarks=()): 889 def pull(repo, remote, heads=None, force=False, bookmarks=(), opargs=None):
890 pullop = pulloperation(repo, remote, heads, force, bookmarks=bookmarks) 890 if opargs is None:
891 opargs = {}
892 pullop = pulloperation(repo, remote, heads, force, bookmarks=bookmarks,
893 **opargs)
891 if pullop.remote.local(): 894 if pullop.remote.local():
892 missing = set(pullop.remote.requirements) - pullop.repo.supported 895 missing = set(pullop.remote.requirements) - pullop.repo.supported
893 if missing: 896 if missing:
894 msg = _("required features are not" 897 msg = _("required features are not"
895 " supported in the destination:" 898 " supported in the destination:"