[PATCH V2] exchange: add oparg to push so that extensions can wrap pushop
Sean Farley
sean at farley.io
Thu Oct 15 20:20:02 UTC 2015
# HG changeset patch
# User Sean Farley <sean at farley.io>
# Date 1444802693 25200
# Tue Oct 13 23:04:53 2015 -0700
# Node ID 4e97de9a18fd8d23692bc428339846960eeaad8a
# Parent 83b738235f1bfc33a943a63a5d0f5527ac2da736
exchange: add oparg to push so that extensions can wrap pushop
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -258,20 +258,24 @@ bookmsgmap = {'update': (_("updating boo
'delete': (_("deleting remote bookmark %s\n"),
_('deleting remote bookmark %s failed!\n')),
}
-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
- 0 means HTTP error
- 1 means we pushed and remote head count is unchanged *or*
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)
if missing:
msg = _("required features are not"
More information about the Mercurial-devel
mailing list