changeset 20433:6af248474224

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.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Thu, 30 Jan 2014 17:56:09 -0800
parents 1b926f0bbf8a
children e009e59e4566
files mercurial/exchange.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Thu Jan 30 17:54:47 2014 -0800
+++ b/mercurial/exchange.py	Thu Jan 30 17:56:09 2014 -0800
@@ -247,7 +247,7 @@
                         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 @@
     _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 = []