Mercurial > hgsubversion
changeset 1249:11c8de73b48a
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.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 14 Oct 2014 13:36:32 -0700 |
parents | 2d1f6687980b |
children | 05aea77371a3 |
files | tests/comprehensive/test_rebuildmeta.py |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)