changeset 944:e1d343fdeba4

push: fix exchangepush for Mercurial 3.2
author Siddharth Agarwal <sid0@fb.com>
date Sun, 08 Nov 2015 21:37:48 -0800
parents d278f6d82a06
children bdd097524b88
files hggit/__init__.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/__init__.py
+++ b/hggit/__init__.py
@@ -347,8 +347,10 @@
 # TODO figure out something useful to do with the newbranch param
 @util.transform_notgit
 def exchangepush(orig, repo, remote, force=False, revs=None, newbranch=False,
-                 bookmarks=(), opargs=None, **kwargs):
+                 bookmarks=(), **kwargs):
     if isinstance(remote, gitrepo.gitrepo):
+        # opargs is in Mercurial >= 3.6
+        opargs = kwargs.get('opargs')
         if opargs is None:
             opargs = {}
         pushop = exchange.pushoperation(repo, remote, force, revs, newbranch,
@@ -357,7 +359,7 @@
         return pushop
     else:
         return orig(repo, remote, force, revs, newbranch, bookmarks=bookmarks,
-                    opargs=opargs, **kwargs)
+                    **kwargs)
 if not hgutil.safehasattr(localrepo.localrepository, 'push'):
     # Mercurial >= 3.2
     extensions.wrapfunction(exchange, 'push', exchangepush)