[PATCH 03 of 11 (19 more to go)] push: feed pushoperation object to _pushobsolete function
pierre-yves.david at ens-lyon.org
pierre-yves.david at ens-lyon.org
Mon Feb 10 18:01:31 CST 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1391133369 28800
# Thu Jan 30 17:56:09 2014 -0800
# Node ID 8a7dcb97d9d07f09e9cf7780005ab1ab814b086d
# Parent 34c68d39d14886e07b7e4a924a8b5c63dd9f7acf
push: feed pushoperation object to _pushobsolete function
This will allow the bookmark 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
@@ -245,25 +245,27 @@ def push(repo, remote, force=False, revs
str(phases.public))
if not r:
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()
finally:
if locallock is not None:
locallock.release()
_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 = []
remotedata = repo.listkeys('obsolete')
for key in sorted(remotedata, reverse=True):
More information about the Mercurial-devel
mailing list