# HG changeset patch # User Pierre-Yves David # Date 2014-01-31 01:56:09 # Node ID 6af248474224a2fb0cb616610898fcebe025c5b3 # Parent 1b926f0bbf8afac1c3751980948787160d67f6d5 push: feed pushoperation object to _pushobsolete function This will allow the obsolete marker synchronisation to have full information on the ongoing push and pass information to other operation. diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -247,7 +247,7 @@ def push(repo, remote, force=False, revs pushop.ui.warn(_('updating %s to public failed!\n') % newremotehead) pushop.ui.debug('try to push obsolete markers to remote\n') - _pushobsolete(pushop.repo, pushop.remote) + _pushobsolete(pushop) finally: if lock is not None: lock.release() @@ -258,10 +258,12 @@ def push(repo, remote, force=False, revs _pushbookmark(pushop) return ret -def _pushobsolete(repo, remote): +def _pushobsolete(pushop): """utility function to push obsolete markers to a remote Exist mostly to allow overriding for experimentation purpose""" + repo = pushop.repo + remote = pushop.remote if (obsolete._enabled and repo.obsstore and 'obsolete' in remote.listkeys('namespaces')): rslts = []