Skip to content
Snippets Groups Projects
Commit c85c28fb authored by Sean Farley's avatar Sean Farley
Browse files

hggit: adapt push wrapper function for recent hg

We can just accept-and-forward kwargs, which should be nicely
futureproof for a while.
parent e1117014
No related branches found
No related tags found
No related merge requests found
......@@ -347,6 +347,6 @@
# 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,
......@@ -351,6 +351,6 @@
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:
......@@ -354,7 +354,8 @@
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment