comparison tests/test_rebuildmeta.py @ 930:5bacb9c63e3e

Fix more peer breakage with old hg versions
author Patrick Mezard <patrick@mezard.eu>
date Mon, 10 Sep 2012 22:42:49 +0200
parents 7e9d805a0e1f
children 3b43b1c45e2e
comparison
equal deleted inserted replaced
929:8417be758047 930:5bacb9c63e3e
32 layout=layout) 32 layout=layout)
33 assert len(self.repo) > 0 33 assert len(self.repo) > 0
34 wc2_path = self.wc_path + '_clone' 34 wc2_path = self.wc_path + '_clone'
35 u = ui.ui() 35 u = ui.ui()
36 src, dest = test_util.hgclone(u, self.wc_path, wc2_path, update=False) 36 src, dest = test_util.hgclone(u, self.wc_path, wc2_path, update=False)
37 src = getattr(src, 'local', lambda: src)() 37 src = test_util.getlocalpeer(src)
38 dest = getattr(dest, 'local', lambda: dest)() 38 dest = test_util.getlocalpeer(dest)
39 39
40 # insert a wrapper that prevents calling changectx.children() 40 # insert a wrapper that prevents calling changectx.children()
41 def failfn(orig, ctx): 41 def failfn(orig, ctx):
42 self.fail('calling %s is forbidden; it can cause massive slowdowns ' 42 self.fail('calling %s is forbidden; it can cause massive slowdowns '
43 'when rebuilding large repositories' % orig) 43 'when rebuilding large repositories' % orig)
59 src, dest = test_util.hgclone(u, 59 src, dest = test_util.hgclone(u,
60 self.wc_path, 60 self.wc_path,
61 wc3_path, 61 wc3_path,
62 update=False, 62 update=False,
63 rev=[0]) 63 rev=[0])
64 srcrepo = getattr(src, 'local', lambda: src)() 64 srcrepo = test_util.getlocalpeer(src)
65 dest = getattr(dest, 'local', lambda: dest)() 65 dest = test_util.getlocalpeer(dest)
66 66
67 # insert a wrapper that prevents calling changectx.children() 67 # insert a wrapper that prevents calling changectx.children()
68 extensions.wrapfunction(context.changectx, 'children', failfn) 68 extensions.wrapfunction(context.changectx, 'children', failfn)
69 69
70 try: 70 try: