# HG changeset patch # User Siddharth Agarwal # Date 1413318992 25200 # Node ID 11c8de73b48a5c9b8aa102f6d1c32ca852766d7c # Parent 2d1f6687980ba69fec4fe1b2771290ea796d3681 test_rebuildmeta: call exchange.pull if localrepository.pull isn't available Mercurial rev 73b5b8312ce6 removed localrepository.pull. We don't do it the other way round (call exchange.pull if it is available) because that's been available with a different signature since Mercurial 3.0. diff --git a/tests/comprehensive/test_rebuildmeta.py b/tests/comprehensive/test_rebuildmeta.py --- a/tests/comprehensive/test_rebuildmeta.py +++ b/tests/comprehensive/test_rebuildmeta.py @@ -13,7 +13,9 @@ except ImportError: from mercurial import context from mercurial import extensions from mercurial import hg +from mercurial import localrepo from mercurial import ui +from mercurial import util as hgutil from hgsubversion import compathacks from hgsubversion import svncommands @@ -85,7 +87,12 @@ def _do_case(self, name, layout): # remove the wrapper context.changectx.children = origchildren - dest.pull(src) + if hgutil.safehasattr(localrepo.localrepository, 'pull'): + dest.pull(src) + else: + # Mercurial >= 3.2 + from mercurial import exchange + exchange.pull(dest, src) # insert a wrapper that prevents calling changectx.children() extensions.wrapfunction(context.changectx, 'children', failfn)