changeset 939:c85c28fbc8a5

hggit: adapt push wrapper function for recent hg We can just accept-and-forward kwargs, which should be nicely futureproof for a while.
author Sean Farley <sean@farley.io>
date Thu, 15 Oct 2015 13:55:30 -0700
parents e1117014036c
children 93d58b79d816
files hggit/__init__.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/__init__.py	Thu Oct 15 16:04:15 2015 -0700
+++ b/hggit/__init__.py	Thu Oct 15 13:55:30 2015 -0700
@@ -347,14 +347,15 @@
 # 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=()):
+                 bookmarks=(), **kwargs):
     if isinstance(remote, gitrepo.gitrepo):
         pushop = exchange.pushoperation(repo, remote, force, revs, newbranch,
-                                        bookmarks)
+                                        bookmarks, **kwargs)
         pushop.cgresult = repo.githandler.push(remote.path, revs, force)
         return pushop
     else:
-        return orig(repo, remote, force, revs, newbranch, bookmarks=bookmarks)
+        return orig(repo, remote, force, revs, newbranch, bookmarks=bookmarks,
+                    **kwargs)
 if not hgutil.safehasattr(localrepo.localrepository, 'push'):
     # Mercurial >= 3.2
     extensions.wrapfunction(exchange, 'push', exchangepush)