changeset 1346:538bbb927609

Merge with stable.
author Augie Fackler <raf@durin42.com>
date Tue, 11 Aug 2015 17:07:59 -0400
parents 7e10891666fe (current diff) 2fdf16f2d4dd (diff)
children bb9b886090e8
files
diffstat 10 files changed, 24 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags
+++ b/.hgtags
@@ -16,3 +16,4 @@ 46523cdfd3b0cee0bf1366ab587686bb65211747
 139a44a63090b2c0f8e05d7d1104d3d9c9e26f57 1.7
 c1756971f8828a59c859513f208c6d79bf34c275 1.8
 dde1ade36a49d3d0e1b4b8bd384a6797665b5081 1.8.1
+38be7a6b6def3298fe9ffff141eb58e1370a53cc 1.8.2
--- 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)
@@ -171,7 +171,7 @@ class TestSingleDirPush(test_util.TestBa
         # Tests pulling and pushing with a renamed branch
         # Based on test_push_single_dir
         repo_path = self.load_svndump('branch_from_tag.svndump')
-        cmd = ['clone', '--layout=single', '--branch=flaf']
+        cmd = ['clone', '--quiet', '--layout=single', '--branch=flaf']
         if self.stupid:
             cmd.append('--stupid')
         cmd += [test_util.fileurl(repo_path), self.wc_path]
--- a/tests/test_unaffected_core.py
+++ b/tests/test_unaffected_core.py
@@ -11,6 +11,7 @@ from mercurial import node
 from mercurial import ui
 
 def _dispatch(ui, cmd):
+    assert '--quiet' in cmd
     try:
         req = dispatch.request(cmd, ui=ui)
         dispatch._dispatch(req)
@@ -26,7 +27,7 @@ class TestMercurialCore(test_util.TestBa
     def test_update(self):
         ''' Test 'clone --updaterev' '''
         ui = self.ui()
-        _dispatch(ui, ['init', self.wc_path])
+        _dispatch(ui, ['init', '--quiet', self.wc_path])
         repo = self.repo
         repo.ui.setconfig('ui', 'username', 'anonymous')
 
@@ -46,8 +47,9 @@ class TestMercurialCore(test_util.TestBa
         self.assertEqual(test_util.repolen(repo), 3)
 
         updaterev = 1
-        _dispatch(ui, ['clone', self.wc_path, self.wc_path + '2',
-                                '--updaterev=%s' % updaterev])
+        _dispatch(ui, ['clone', '--quiet',
+                       self.wc_path, self.wc_path + '2',
+                       '--updaterev=%s' % updaterev])
 
         repo2 = hg.repository(ui, self.wc_path + '2')
 
@@ -57,7 +59,7 @@ class TestMercurialCore(test_util.TestBa
     def test_branch(self):
         ''' Test 'clone --branch' '''
         ui = self.ui()
-        _dispatch(ui, ['init', self.wc_path])
+        _dispatch(ui, ['init', '--quiet', self.wc_path])
         repo = self.repo
         repo.ui.setconfig('ui', 'username', 'anonymous')
 
@@ -80,8 +82,10 @@ class TestMercurialCore(test_util.TestBa
         self.assertEqual(test_util.repolen(repo), 3)
 
         branch = 'B1'
-        _dispatch(ui, ['clone', self.wc_path, self.wc_path + '2',
-                                '--branch', branch])
+        _dispatch(ui, [
+            'clone', '--quiet',
+            self.wc_path, self.wc_path + '2',
+            '--branch', branch])
 
         repo2 = hg.repository(ui, self.wc_path + '2')
 
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -290,6 +290,7 @@ def testui(stupid=False, layout='auto', 
     return u
 
 def dispatch(cmd):
+    assert '--quiet' in cmd
     cmd = getattr(dispatchmod, 'request', lambda x: x)(cmd)
     return dispatchmod.dispatch(cmd)
 
@@ -567,6 +568,7 @@ class TestBase(unittest.TestCase):
 
         cmd = [
             'clone',
+            '--quiet',
             '--layout=%s' % layout,
             '--startrev=%s' % startrev,
             fileurl(projectpath),
@@ -746,7 +748,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')