# HG changeset patch # User Pierre-Yves David # Date 1391159555 28800 # Node ID 80628d4069be724089ea487a300d62f4cbd8970d # Parent 2607a21bb40b251fa317b4821d9451534a871038 push: feed pulloperation object to _pullobsolete function We now have all necessary information in the `pulloperation` object itself. diff -r 2607a21bb40b -r 80628d4069be mercurial/exchange.py --- a/mercurial/exchange.py Fri Jan 31 01:04:05 2014 -0800 +++ b/mercurial/exchange.py Fri Jan 31 01:12:35 2014 -0800 @@ -484,8 +484,7 @@ # should be seen as public phases.advanceboundary(pullop.repo, phases.public, subset) - _pullobsolete(pullop.repo, pullop.remote, - pullop.gettransaction) + _pullobsolete(pullop) pullop.closetransaction() finally: pullop.releasetransaction() @@ -493,7 +492,7 @@ return result -def _pullobsolete(repo, remote, gettransaction): +def _pullobsolete(pullop): """utility function to pull obsolete markers from a remote The `gettransaction` is function that return the pull transaction, creating @@ -503,14 +502,14 @@ Exists mostly to allow overriding for experimentation purpose""" tr = None if obsolete._enabled: - repo.ui.debug('fetching remote obsolete markers\n') - remoteobs = remote.listkeys('obsolete') + pullop.repo.ui.debug('fetching remote obsolete markers\n') + remoteobs = pullop.remote.listkeys('obsolete') if 'dump0' in remoteobs: - tr = gettransaction() + tr = pullop.gettransaction() for key in sorted(remoteobs, reverse=True): if key.startswith('dump'): data = base85.b85decode(remoteobs[key]) - repo.obsstore.mergemarkers(tr, data) - repo.invalidatevolatilesets() + pullop.repo.obsstore.mergemarkers(tr, data) + pullop.repo.invalidatevolatilesets() return tr