diff tests/test_util.py @ 816:86d124a8768e

Fix hg.clone() calls changed by d976542986d2
author Patrick Mezard <pmezard@gmail.com>
date Wed, 15 Jun 2011 14:44:14 +0200
parents f07bfd66db13
children e9af7eba88db
line wrap: on
line diff
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -236,6 +236,14 @@ def _verify_our_modules():
             'from the wrong path!'
         )
 
+def hgclone(ui, source, dest, update=True):
+    if getattr(hg, 'peer', None):
+        # Since 1.9 (d976542986d2)
+        src, dest = hg.clone(ui, {}, source, dest, update=update)
+    else:
+        src, dest = hg.clone(ui, source, dest, update=update)
+    return src, dest
+
 class TestBase(unittest.TestCase):
     def setUp(self):
         _verify_our_modules()