Mercurial > hgsubversion
comparison tests/comprehensive/test_rebuildmeta.py @ 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 | d62c53c7a37d |
children | c6b01fd34694 |
comparison
equal
deleted
inserted
replaced
1248:2d1f6687980b | 1249:11c8de73b48a |
---|---|
11 import test_util | 11 import test_util |
12 | 12 |
13 from mercurial import context | 13 from mercurial import context |
14 from mercurial import extensions | 14 from mercurial import extensions |
15 from mercurial import hg | 15 from mercurial import hg |
16 from mercurial import localrepo | |
16 from mercurial import ui | 17 from mercurial import ui |
18 from mercurial import util as hgutil | |
17 | 19 |
18 from hgsubversion import compathacks | 20 from hgsubversion import compathacks |
19 from hgsubversion import svncommands | 21 from hgsubversion import svncommands |
20 from hgsubversion import svnmeta | 22 from hgsubversion import svnmeta |
21 from hgsubversion import util | 23 from hgsubversion import util |
83 subdir), ]) | 85 subdir), ]) |
84 finally: | 86 finally: |
85 # remove the wrapper | 87 # remove the wrapper |
86 context.changectx.children = origchildren | 88 context.changectx.children = origchildren |
87 | 89 |
88 dest.pull(src) | 90 if hgutil.safehasattr(localrepo.localrepository, 'pull'): |
91 dest.pull(src) | |
92 else: | |
93 # Mercurial >= 3.2 | |
94 from mercurial import exchange | |
95 exchange.pull(dest, src) | |
89 | 96 |
90 # insert a wrapper that prevents calling changectx.children() | 97 # insert a wrapper that prevents calling changectx.children() |
91 extensions.wrapfunction(context.changectx, 'children', failfn) | 98 extensions.wrapfunction(context.changectx, 'children', failfn) |
92 try: | 99 try: |
93 svncommands.updatemeta(u, dest, | 100 svncommands.updatemeta(u, dest, |