changeset 26729:16e69e6b357b

exchange: add oparg to push so that extensions can wrap pushop
author Sean Farley <sean@farley.io>
date Tue, 13 Oct 2015 23:04:53 -0700
parents e8f1b7285917
children a1e43e85d294
files mercurial/exchange.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Thu Oct 15 03:15:54 2015 +0100
+++ b/mercurial/exchange.py	Tue Oct 13 23:04:53 2015 -0700
@@ -260,7 +260,8 @@
               }
 
 
-def push(repo, remote, force=False, revs=None, newbranch=False, bookmarks=()):
+def push(repo, remote, force=False, revs=None, newbranch=False, bookmarks=(),
+         opargs=None):
     '''Push outgoing changesets (limited by revs) from a local
     repository to remote. Return an integer:
       - None means nothing to push
@@ -269,7 +270,10 @@
         we have outgoing changesets but refused to push
       - other values as described by addchangegroup()
     '''
-    pushop = pushoperation(repo, remote, force, revs, newbranch, bookmarks)
+    if opargs is None:
+        opargs = {}
+    pushop = pushoperation(repo, remote, force, revs, newbranch, bookmarks,
+                           **opargs)
     if pushop.remote.local():
         missing = (set(pushop.repo.requirements)
                    - pushop.remote.local().supported)