Mercurial > hgsubversion
changeset 1342:c6b01fd34694 stable
trying to fix progress output
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Wed, 08 Jul 2015 19:45:04 -0400 |
parents | 74e82a7da393 |
children | e597714cb420 |
files | tests/comprehensive/test_custom_layout.py tests/comprehensive/test_rebuildmeta.py tests/comprehensive/test_stupid_pull.py tests/comprehensive/test_updatemeta.py tests/comprehensive/test_verify_and_startrev.py tests/test_diff.py tests/test_single_dir_push.py tests/test_util.py |
diffstat | 8 files changed, 10 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/comprehensive/test_custom_layout.py +++ b/tests/comprehensive/test_custom_layout.py @@ -31,17 +31,14 @@ def _do_case(self, name, stupid): checkout_path = repo_path if subdir: checkout_path += '/' + subdir - u = ui.ui() - if stupid: - u.setconfig('hgsubversion', 'stupid', '1') - u.setconfig('hgsubversion', 'layout', 'custom') + u = test_util.testui(stupid=stupid, layout='custom') for branch, path in test_util.custom.get(name, {}).iteritems(): u.setconfig('hgsubversionbranch', branch, path) test_util.hgclone(u, test_util.fileurl(checkout_path), wc2_path, update=False) - self.repo2 = hg.repository(ui.ui(), wc2_path) + self.repo2 = hg.repository(test_util.testui(), wc2_path) self.assertEqual(self.repo.heads(), self.repo2.heads())
--- a/tests/comprehensive/test_rebuildmeta.py +++ b/tests/comprehensive/test_rebuildmeta.py @@ -36,7 +36,7 @@ expect_youngest_skew = [('file_mixed_wit def _do_case(self, name, layout): subdir = test_util.subdir.get(name, '') single = layout == 'single' - u = ui.ui() + u = test_util.testui() config = {} if layout == 'custom': for branch, path in test_util.custom.get(name, {}).iteritems():
--- a/tests/comprehensive/test_stupid_pull.py +++ b/tests/comprehensive/test_stupid_pull.py @@ -19,7 +19,7 @@ from hgsubversion import wrappers def _do_case(self, name, layout): subdir = test_util.subdir.get(name, '') config = {} - u = ui.ui() + u = test_util.testui() for branch, path in test_util.custom.get(name, {}).iteritems(): config['hgsubversionbranch.%s' % branch] = path u.setconfig('hgsubversionbranch', branch, path) @@ -38,7 +38,7 @@ def _do_case(self, name, layout): test_util.hgclone(u, test_util.fileurl(checkout_path), wc2_path, update=False) if layout == 'single': self.assertEqual(len(self.repo.heads()), 1) - self.repo2 = hg.repository(ui.ui(), wc2_path) + self.repo2 = hg.repository(test_util.testui(), wc2_path) self.assertEqual(self.repo.heads(), self.repo2.heads())
--- a/tests/comprehensive/test_updatemeta.py +++ b/tests/comprehensive/test_updatemeta.py @@ -26,7 +26,7 @@ from hgsubversion import svnmeta def _do_case(self, name, layout): subdir = test_util.subdir.get(name, '') single = layout == 'single' - u = ui.ui() + u = test_util.testui() config = {} if layout == 'custom': config['hgsubversion.layout'] = 'custom'
--- a/tests/comprehensive/test_verify_and_startrev.py +++ b/tests/comprehensive/test_verify_and_startrev.py @@ -74,8 +74,7 @@ def _do_case(self, name, layout): rev=shallowtip.node(), stupid=False)) - stupidui = ui.ui(repo.ui) - stupidui.config('hgsubversion', 'stupid', True) + stupidui = test_util.testui(stupid=True) self.assertEqual(verify.verify(stupidui, repo, rev=ctx.node(), stupid=True), 0) self.assertEqual(verify.verify(stupidui, repo, rev=ctx.node(),
--- a/tests/test_diff.py +++ b/tests/test_diff.py @@ -31,7 +31,7 @@ class DiffTests(test_util.TestBase): self.commitchanges([('foo', 'foo', 'This is missing a newline.'), ('alpha', 'alpha', 'alpha\n\nadded line\n'), ]) - u = ui.ui() + u = test_util.testui() u.pushbuffer() wrappers.diff(lambda x, y, z: None, u, self.repo, svn=True) self.assertEqual(u.popbuffer(), expected_diff_output)
--- a/tests/test_single_dir_push.py +++ b/tests/test_single_dir_push.py @@ -158,7 +158,7 @@ class TestSingleDirPush(test_util.TestBa self.assertTrue('foo' in test_util.svnls(repo_path, '')) self.assertEqual(compathacks.branchset(repo), set(['default'])) # Have to cross to another branch head, so hg.update doesn't work - commands.update(ui.ui(), + commands.update(self.ui(), self.repo, self.repo.branchheads('default')[1], clean=True)
--- a/tests/test_util.py +++ b/tests/test_util.py @@ -746,7 +746,7 @@ class TestBase(unittest.TestCase): useful when debugging comprehensive tests. """ # Could be more elegant, but it works with stock hg - _ui = ui.ui() + _ui = testui() _ui.setconfig('extensions', 'graphlog', '') extensions.loadall(_ui) graphlog = extensions.find('graphlog')