[test] make sure commits in data/project test hg reop are public,
authorDavid Douard <david.douard@logilab.fr>
Wed, 07 Aug 2013 17:17:40 +0200
changeset 1443 9d7e65b017f0
parent 1442 b4d88164cf62
child 1444 67ac48f1ad53
[test] make sure commits in data/project test hg reop are public,
test/test_functional.py
--- a/test/test_functional.py	Wed Aug 07 17:16:23 2013 +0200
+++ b/test/test_functional.py	Wed Aug 07 17:17:40 2013 +0200
@@ -8,9 +8,14 @@
 
 HERE = osp.abspath(osp.dirname(__file__))
 def setUpModule():
-    subprocess.check_call(['hg', 'init', '-q', osp.join(HERE, 'data', 'project')])
-    subprocess.check_call(['hg', 'addremove', '-q', '-R', osp.join(HERE, 'data', 'project')])
-    subprocess.check_call(['hg', 'commit', '-q', '-R', osp.join(HERE, 'data', 'project'), '-m', 'ze rev'])
+    ppath = osp.join(HERE, 'data', 'project')
+    if osp.isdir(osp.join(ppath, '.hg')):
+        shutil.rmtree(osp.join(ppath, '.hg'))
+    subprocess.check_call(['hg', 'init', '-q', ppath])
+    subprocess.check_call(['hg', 'addremove', '-q', '-R', ppath])
+    subprocess.check_call(['hg', 'commit', '-q', '-R', ppath, '-m', 'ze rev'])
+    subprocess.check_call(['hg', 'phase', '-p', '.', '-q', '-R', ppath])
+
 
 def tearDownModule():
     shutil.rmtree(osp.join(HERE, 'data', 'project', '.hg'))